Never used it and not too familiar with the security manager, but maybe you
should look at the com.ibm.as400.access.Permission?

Hope this helps,
--
James R. Perkins


On Wed, Jun 24, 2009 at 14:34, Blalock, Bill <Bill.Blalock@xxxxxxxx> wrote:

Hi all!



I am being forced by our security <multiple expletives deleted> to add
SecurityManager to an application running with the i5 classic (64 bit
JVM), Java 1.5.



This program uses IFSFiles.listFiles() to get a list of file in an IFS
folder.



SecurityManager blocked access to the folder which the program checks
for files.



java.security.AccessControlException: access denied
(java.io.FilePermission /127.0.0.1/ftp/yada..yada read)



I understand that one. I got around that with the permission



permission java.io.FilePermission "/127.0.0.1/ftp/", "read";



Now I am getting errors like this when IFSFile.listsFiles() and other
methods of IFSFile tries to access



2009-06-24 16:10:09,748 ERROR [Thread-0]: (ConvertIfsCheckLog.java:239)
- Error getting IFSFile object

com.ibm.as400.access.ExtendedIOException: Access to request was denied.

at java.lang.Throwable.<init>(Throwable.java:196)

at java.lang.Exception.<init>(Exception.java:41)

at java.io.IOException.<init>(IOException.java:40)

at
com.ibm.as400.access.ExtendedIOException.<init>(ExtendedIOException.java
:211)

at com.ibm.as400.access.IFSFile.listFiles(IFSFile.java:2215)

at com.ibm.as400.access.IFSFile.listFiles(IFSFile.java:2170)



Does anyone have suggestions how to get around this?



As an aside I am trying to

- protect the application from being hounded into nervous
breakdowns by penetration tests.



This is a server application. It listens to port 3111 for requests for
desktop clients. When it gets a valid request it responds otherwise it
logs the invalid connection attempt. When big brother is running a
random penetration test the server gets flooded with invalid. As a by
product it gets overloaded and misses check points.



My thought was to use security manager to

- allow it to listen only on port 3111

- allow it only to accept connections from a list of desktop
client names in the policy file



Is there a better way than using SecurityManager?



Thanks all

Bill Blalock



_____________

The information contained in this message is proprietary and/or
confidential. If you are not the
intended recipient, please: (i) delete the message and all copies; (ii) do
not disclose,
distribute or use the message in any manner; and (iii) notify the sender
immediately. In addition,
please be aware that any message addressed to our domain is subject to
archiving and review by
persons other than the intended recipient. Thank you.
_____________
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.