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

I got a solution for my problem, if I modify the common policy file in JVM directory,  instead of changing in my policy file (into my program directory), and there I write:

 grant {
permission java.security.AllPermission;
};

then If I launch Equinox with security parameters I do not get any exception at all.

 

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

 

Why do I have to modify in the JVR directory policy file instead of doing in my policy file?

I mean , If I like to fix some permissions for my bundle I should not  write them in JVR Policy file but in my policy file.

 

Thanks in advance

 

 

 

De: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] En nombre de Thomas Watson
Enviado el: viernes, 24 de abril de 2009 16:59
Para: Equinox development mailing list
Asunto: Re: [equinox-dev] Problem with security in Equinox

 

This works for me. What VM are you using? I suggest you open a bug with details on your OS and java version etc.

Tom



Inactive hide details for "David Conde" ---04/24/2009 07:17:52 AM---Hi,"David Conde" ---04/24/2009 07:17:52 AM---Hi,


From:


"David Conde" <dconde@xxxxxxxx>


To:


<equinox-dev@xxxxxxxxxxx>


Date:


04/24/2009 07:17 AM


Subject:


[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

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

GIF image

PNG image

PNG image