Extending SecurityManager

Discussion in 'Java' started by oziris, Dec 7, 2005.

  1. oziris

    oziris Guest

    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--
    oziris, Dec 7, 2005
    #1
    1. Advertising

  2. oziris

    Guest

    , Dec 7, 2005
    #2
    1. Advertising

  3. oziris

    oziris Guest

    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--
    oziris, Dec 7, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francis Shanahan

    Re: Extending DataGrid

    Francis Shanahan, Aug 26, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    898
    Francis Shanahan
    Aug 26, 2003
  2. Ken Dopierala Jr.

    Extending page time out length.

    Ken Dopierala Jr., Nov 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    392
    Oliver
    Nov 9, 2003
  3. ndario

    extending and editing user control

    ndario, Jan 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    312
    ndario
    Jan 30, 2004
  4. =?Utf-8?B?cG9wc292eUBydXNtZXguY29t?=

    Code Reusability -- Extending web Application

    =?Utf-8?B?cG9wc292eUBydXNtZXguY29t?=, Jan 31, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    424
    Kevin Spencer
    Feb 2, 2004
  5. Mike Matthews
    Replies:
    0
    Views:
    714
    Mike Matthews
    Jul 23, 2003
Loading...

Share This Page