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 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 bundle into the framework.

Using security

Besides installing the security bundle three properties should be specified:

  •<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,

grant {

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).

$ java"osgi" -jar bin/felix.jar

Welcome to Felix

-> install
-> inspect s c 0
System Bundle (0) provides services:
objectClass = org.osgi.service.startlevel.StartLevel = 1
objectClass = org.osgi.service.packageadmin.PackageAdmin = 2
objectClass = org.osgi.service.permissionadmin.PermissionAdmin = 3
objectClass = org.osgi.service.condpermadmin.ConditionalPermissionAdmin = 4

  • No labels