Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

Extending SecurityManager

Thread view: 
oziris - 07 Dec 2005 14:50 GMT
Hi !

-- I'm investigating the java security features for possible use in an
application I am writing.

-- One area that I have been experimenting with is extending the
SecurityManager class and overriding the checkPermission(Permission
perm) method.

-- When I do this and call

System.setSecurityManager(new MySecurityManager()),

java returns an AccessControlException for the
java.security.SecurityPermission
[getProperty.networkaddress.cache.ttl].

-- I've expected a lack in my java.policy (I'm a novice, I try...) so
I've add the line

permission java.security.SecurityPermission
"getProperty.networkaddress.cache.ttl"

but without effect.

-- I success in accessing the os.arch property, which is by default
defined in the java.policy file, but remove the line has no effect
(that still works).

-- Could anyone help me to override the defaut SystemManager and
understand the interaction that imply with the java.policy file.

Thanks a lot.

-o--
abigale_carson@yahoo.com - 07 Dec 2005 15:03 GMT
Read this:

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#setSecurityManager
(java.lang.SecurityManager
)

or if you like,

http://linkfrog.net/dabc

Especially the part under "throws SecurityException"

Abigale.
oziris - 07 Dec 2005 17:15 GMT
Thanks Abigale. Major part works now.

It remains one stuff. The KeyStore JKS became unknown.In others words,

KeyStore.getInstance("JKS") returns a KeyStoreException.

If I turn back to the default SecurityManager, that works. I expect the
java.security file is no longer take into account, or badly.

Could you help me once again? :-)

-o--


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.