Class DeploymentAdminPermission

java.lang.Object
java.security.Permission
org.osgi.service.deploymentadmin.DeploymentAdminPermission
All Implemented Interfaces:
Serializable, Guard

public final class DeploymentAdminPermission extends Permission
DeploymentAdminPermission controls access to the Deployment Admin service.

The permission uses a filter string formatted similarly to the Filter. The filter determines the target of the permission. The DeploymentAdminPermission uses the name and the signer filter attributes only. The value of the signer attribute is matched against the signer chain (represented with its semicolon separated Distinguished Name chain) of the Deployment Package, and the value of the name attribute is matched against the value of the "DeploymentPackage-Name" manifest header of the Deployment Package. Example:

  • (signer=cn = Bugs Bunny, o = ACME, c = US)
  • (name=org.osgi.ExampleApp)
Wildcards also can be used:

 (signer=cn=*,o=ACME,c=*)
 
"cn" and "c" may have an arbitrary value
 (signer=*, o=ACME, c=US)
 
Only the value of "o" and "c" are significant
 (signer=* ; ou=S & V, o=Tweety Inc., c=US)
 
The first element of the certificate chain is not important, only the second (the Distinguished Name of the root certificate)
 (signer=- ; *, o=Tweety Inc., c=US)
 
The same as the previous but '-' represents zero or more certificates, whereas the asterisk only represents a single certificate
 (name=*)
 
The name of the Deployment Package doesn't matter
 (name=org.osgi.*)
 
The name has to begin with "org.osgi."

The following actions are allowed:

list

A holder of this permission can access the inventory information of the deployment packages selected by the <filter> string. The filter selects the deployment packages on which the holder of the permission can acquire detailed inventory information. See DeploymentAdmin.getDeploymentPackage(Bundle), DeploymentAdmin.getDeploymentPackage(String) and DeploymentAdmin.listDeploymentPackages().

install

A holder of this permission can install/update deployment packages if the deployment package satisfies the <filter> string. See DeploymentAdmin.installDeploymentPackage(java.io.InputStream).

uninstall

A holder of this permission can uninstall deployment packages if the deployment package satisfies the <filter> string. See DeploymentPackage.uninstall().

uninstall_forced

A holder of this permission can forcefully uninstall deployment packages if the deployment package satisfies the <filter> string. See DeploymentPackage.uninstallForced().

cancel

A holder of this permission can cancel an active deployment action. This action being canceled could correspond to the install, update or uninstall of a deployment package that satisfies the <filter> string. See DeploymentAdmin.cancel()

metadata

A holder of this permission is able to retrieve metadata information about a Deployment Package (e.g. is able to ask its manifest headers). See DeploymentPackage.getBundle(String), DeploymentPackage.getBundleInfos(), DeploymentPackage.getHeader(String), DeploymentPackage.getResourceHeader(String, String), DeploymentPackage.getResourceProcessor(String), DeploymentPackage.getResources()

The actions string is converted to lower case before processing.

See Also: