Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
configadmin-1.6.0
Description
Most of felix bundles should have a permissions file.
For ConfigAdmin bundle, I suggest the following content for "OSGI-INF/permissions.perm" file:
- Apache Felix Configuration Admin Service
- Bundle permissions
#
- Imported/Exported packages
- -> MANIFEST.MF
(org.osgi.framework.PackagePermission "org.osgi.service.log" "import")
(org.osgi.framework.PackagePermission "org.osgi.framework" "import")
(org.osgi.framework.PackagePermission "org.osgi.service.cm" "import,exportonly")
(org.osgi.framework.PackagePermission "org.apache.felix.cm" "import,exportonly")
(org.osgi.framework.PackagePermission "org.apache.felix.cm.file" "import,exportonly")
- General bundle permissions
(java.util.PropertyPermission "felix.cm.*" "read")
(org.osgi.framework.ServicePermission "org.apache.felix.cm.*" "get,register")
(org.osgi.framework.ServicePermission "org.osgi.service.cm.*" "get,register")
(org.osgi.framework.ServicePermission "org.osgi.service.log.LogService" "get")
- Manage configurations
- -> ConfigurationAdminImpl
(org.osgi.framework.AdminPermission "*" "metadata")
(org.osgi.service.cm.ConfigurationPermission "*" "configure,target")
- Handle persistent configuration files
- -> FilePersistenceManager
(java.util.PropertyPermission "user.dir" "read")
(java.io.FilePermission "-" "read,write,execute,delete") - -> ConfigurationManager
(org.osgi.framework.ServicePermission "org.apache.felix.cm.PersistenceManager" "register")
Note: I have extracted those permissions from code analysis then tested the suggested file in simple examples.
Attachments
Issue Links
- is related to
-
FELIX-4513 Add Permissions file in EventAdmin bundle
- Open
-
FELIX-4514 Add Permissions file in fileinstaller bundle
- Closed
- relates to
-
FELIX-4362 Security ConfigAdmin permissions are inherited on the stack
- Closed