[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Problem with security in Equinox

 

Hi,

 

I have been looking for documentation about make secure a bundle running on Equinox Framework without using Eclipse.

 

I have tried to put ON the security features of Equinox typing the next commands:

 

 

java

-Djava.security.manager=org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager

 -Djava.security.policy=policy -jar org.eclipse.osgi_3.4.0.v20080107.jar -console

 

 

Previously I created text file called policy in which I had written :

 

grant {

        permission java.security.AllPermission;

};

 

But when I do this I got the next Exception:

 

Errror occurred during initialization of VM

java.lang.ExceptionInInitializerError

      at java.lang.System.setSecurityManager0(Unknown Source)

      at java.lang.System.setSecurityManager(Unknown Source)

      at sun.misc.Launcher.<init>(Unknown Source)

      at sun.misc.Launcher.<clinit>(Unknown Source)

      at java.lang.ClassLoader.initSystemClassLoader(Unknown Source)

      at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)

Caused by: java.security.AccessControlException: access denied (java.security.Se

curityPermission getProperty.networkaddress.cache.ttl)

      at java.security.AccessControlContext.checkPermission(Unknown Source)

      at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager.int

ernalCheckPermission(FrameworkSecurityManager.java:119)

      at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager$Che

ckPermissionAction.run(FrameworkSecurityManager.java:84)

      at java.security.AccessController.doPrivileged(Native Method)

      at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager.che

ckPermission(FrameworkSecurityManager.java:90)

      at org.eclipse.osgi.framework.internal.core.FrameworkSecurityManager.che

ckPermission(FrameworkSecurityManager.java:219)

      at java.security.Security.getProperty(Unknown Source)

      at sun.net.InetAddressCachePolicy$1.run(Unknown Source)

      at java.security.AccessController.doPrivileged(Native Method)

      at sun.net.InetAddressCachePolicy.<clinit>(Unknown Source)

      at java.lang.System.setSecurityManager0(Unknown Source)

      at java.lang.System.setSecurityManager(Unknown Source)

      at sun.misc.Launcher.<init>(Unknown Source)

      at sun.misc.Launcher.<clinit>(Unknown Source)

      at java.lang.ClassLoader.initSystemClassLoader(Unknown Source)

 

I do not have any idea about why I got this exception, I have looked for that in Internet but there was no result

 

Any idea about this problem?

 

Thank you in advance

 

David