In the OSGi model, a bundle's ProtectionDomain is created based only upon consulting the ConditionalPermissionAdmin (or PermissionAdmin if CPA is not present). No policy file is used. So, in effect, the policy for establishing a bundle's permissions is described in the database of permission information managed via CPA.
A policy file may be used to set the permissions of the framework itself since that is implementation specific and the class loader which loads the framework may likely consult a policy file. So to bootstrap this situation, an empty CPA database will grant all bundles AllPermission. So the very first bundles will have AllPermission, It can then call CPA and alter the default permissions to a more restrictive set. For example based upon signer. Note, that whatever bundle will be calling CPA to manage the permission of bundles must itself have AllPermission. It is futile to expect it to only require less permission, since this bundle can modify its own permissions to have AllPermission :-) -- BJ Hargrave Senior Technical Staff Member, IBM OSGi Fellow and CTO of the OSGi Alliance [EMAIL PROTECTED] office: +1 386 848 1781 mobile: +1 386 848 3788 _______________________________________________ OSGi Developer Mail List [email protected] http://www2.osgi.org/mailman/listinfo/osgi-dev
