[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Fw: [equinox-dev] Enable SecurityManager

Please remove  'dstevens'  from the Equinox development mailing list
<equinox-dev@xxxxxxxxxxx>  and  equinox-dev-bounces@xxxxxxxxxxx

Dave Stevens

----- Forwarded by Dave Stevens/Rochester/Contr/IBM on 02/19/2010 01:01 PM
  From:       Saul Goode <saulgoode@xxxxxxxxxxx>                                                                        
  To:         Equinox development mailing list <equinox-dev@xxxxxxxxxxx>                                                
  Date:       02/19/2010 12:56 PM                                                                                       
  Subject:    Re: [equinox-dev] Enable SecurityManager                                                                  
  Sent by:    equinox-dev-bounces@xxxxxxxxxxx                                                                           

saulgoode@xxxxxxxxxxx wrote:
> Hi,
> I'm trying to use Equinox' Conditional Permission Admin (CPA), which
> requires a security manager. The OSGi spec defines the framework property
> "org.osgi.framework.security" with value "osgi" to enable the frameworks
> security manager. When launching Equinox via the FrameworkFactory
> interface with the above property set, I get the appended exception.
> Is there another way of starting Equinox with an enabled security
> which supports CPA? Maybe without the FrameworkFactory interface?
> I'm using Equinox 3.5.1.R35x_v20090827.
> Thanks in advance!
> Regards,
> Saul
> java.lang.ExceptionInInitializerError
> 		 at java.lang.System.setSecurityManager0(System.java:296)
> 		 at java.lang.System.setSecurityManager(System.java:264)
> 		 [...]

I figured it out myself. I need to specify a policy file via the system
property "java.security.policy" which grants AllPermission like this:

grant {
		 permission java.security.AllPermission;

I did this before. But unfortunately I copy&pasted a wrong version of
the above from the slides "Building Secure OSGi Applications" [1,2].
(The fully-qualified name of AllPermission is wrong in the slides [3])


[1] <http://felix.apache.org/site/presentations.data/Building%20Secure%
[2] <http://felix.apache.org/site/presentations.data/Building%20Secure%
[3] <http://www.mail-archive.com/users@xxxxxxxxxxxxxxxx/msg02607.html>

equinox-dev mailing list