The Felix Framework Security subproject is an implementation of the security part of the OSGi R4.2 core specification.
Support for the OSGi r4.2 security specifications including PermissionAdmin and ConditionalPermissionAdmin is provided by the framework.security extension bundle. The bundle provides both, the packages as well as the services when it is installed.
All that needs to be done is to install the org.apache.felix.framework.security bundle into the framework.
Besides installing the security bundle three properties should be specified:
- org.osgi.framework.trust.repositories=<list of keystores)
The first installs a security manager on framework init (which in combination with the installed security bundle enables security).
The second, points to a security policy file that gives allpermission like so,
The third, allows to specify a File.pathseparater separated list of JKS keystores without a password. The certificates found inside the keystores are the trusted root certificates of the framework (setting this property is optional).