Package org.apache.felix.framework
Class SecurityProviderImpl
- java.lang.Object
-
- org.apache.felix.framework.SecurityProviderImpl
-
- All Implemented Interfaces:
org.apache.felix.framework.ext.SecurityProvider
public final class SecurityProviderImpl extends java.lang.Object implements org.apache.felix.framework.ext.SecurityProviderThis class is the entry point to the security. It is used to determine whether a given bundle is signed correctely and has permissions based on PermissionAdmin or ConditionalPermissionAdmin.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckBundle(org.osgi.framework.Bundle bundle)If the given bundle is signed but can not be verified (e.g., missing files) then throw an exception.java.lang.ObjectgetSignerMatcher(org.osgi.framework.Bundle bundle, int signersType)Get a signer matcher that can be used to match digital signed bundles.booleanhasBundlePermission(java.security.ProtectionDomain bundleProtectionDomain, java.security.Permission permission, boolean direct)If we have a permissionadmin then ask that one first and have it decide in case there is a location bound.
-
-
-
Method Detail
-
checkBundle
public void checkBundle(org.osgi.framework.Bundle bundle) throws java.lang.ExceptionIf the given bundle is signed but can not be verified (e.g., missing files) then throw an exception.- Specified by:
checkBundlein interfaceorg.apache.felix.framework.ext.SecurityProvider- Throws:
java.lang.Exception
-
getSignerMatcher
public java.lang.Object getSignerMatcher(org.osgi.framework.Bundle bundle, int signersType)Get a signer matcher that can be used to match digital signed bundles.- Specified by:
getSignerMatcherin interfaceorg.apache.felix.framework.ext.SecurityProvider
-
hasBundlePermission
public boolean hasBundlePermission(java.security.ProtectionDomain bundleProtectionDomain, java.security.Permission permission, boolean direct)If we have a permissionadmin then ask that one first and have it decide in case there is a location bound. If not then either use its default permission in case there is no conditional permission admin or else ask that one.- Specified by:
hasBundlePermissionin interfaceorg.apache.felix.framework.ext.SecurityProvider
-
-