org.apache.felix.framework
Class SecurityActivator

java.lang.Object
  extended by org.apache.felix.framework.SecurityActivator
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public final class SecurityActivator
extends java.lang.Object
implements org.osgi.framework.BundleActivator

This Felix specific activator installs a security provider with the Felix framework. The security settings can be changed via the PermissionAdmin and/or the ConditionalPermissionAdmin services that may be published by this class.

Permission informations as well as caching data will be stored in several files in a directory called security obtained by a call to BundleContext#getDataFile(String)).

The following properties are recognized:

SecurityConstants.ENABLE_PERMISSIONADMIN_PROP - Whether or not ( true|false) to publish aConditionalPermissionAdmin service. The default is SecurityConstants.ENABLE_PERMISSIONADMIN_VALUE.

SecurityConstants.ENABLE_CONDPERMADMIN_PROP - Whether or not ( true|false) to publish aConditionalPermissionAdmin service. The default is SecurityConstants.ENABLE_CONDPERMADMIN_VALUE.

SecurityConstants.KEYSTORE_FILE_PROP - The keystore URL(s) to use as trusted CA stores. The urls must be separated by a guard (i.e., |). The default is SecurityConstants.KEYSTORE_FILE_VALUE.

SecurityConstants.KEYSTORE_PASS_PROP - The keystore password(s) to use for the given keystores. The passwords must be separated by a guard (i.e., |).The default is SecurityConstants.KEYSTORE_PASS_VALUE.

SecurityConstants.KEYSTORE_TYPE_PROP - The keystore type(s) to use for the given keystores. The types must be separated by a guard (i.e., |).The default is SecurityConstants.KEYSTORE_TYPE_VALUE.

SecurityConstants.CRL_FILE_PROP - The CRL URL(s) to use for revoked certificates. The urls must be separated by a guard (i.e., |). The default is SecurityConstants.CRL_FILE_VALUE.


Constructor Summary
SecurityActivator()
           
 
Method Summary
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityActivator

public SecurityActivator()
Method Detail

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface org.osgi.framework.BundleActivator
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Specified by:
stop in interface org.osgi.framework.BundleActivator
Throws:
java.lang.Exception


Copyright © 2006-2013 The Apache Software Foundation. All Rights Reserved.