Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Extending SecurityManager

Reply
Thread Tools

Extending SecurityManager

 
 
oziris
Guest
Posts: n/a
 
      12-07-2005
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--

 
Reply With Quote
 
 
 
 
abigale_carson@yahoo.com
Guest
Posts: n/a
 
      12-07-2005
Read this:

http://java.sun.com/j2se/1.4.2/docs/...ecurityManager)

or if you like,

http://linkfrog.net/dabc

Especially the part under "throws SecurityException"

Abigale.

 
Reply With Quote
 
 
 
 
oziris
Guest
Posts: n/a
 
      12-07-2005
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--

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SecurityManager 99 problem Dave Croft Computer Support 0 01-10-2007 10:26 AM
Extending the reception of a network yar Wireless Networking 3 06-15-2005 05:16 PM
extending a wireless Stuart Turrell Wireless Networking 6 11-30-2004 10:18 PM
Extending SecurityManager gives ExceptionInInitializerError Mike Matthews Java 0 07-23-2003 03:30 PM
Extending a T1 over Ethernet / Fiber link Rick G Cisco 2 07-11-2003 09:22 PM



Advertisments