Aruna Karunarathna
Aruna Karunarathna

Reputation: 1021

Enable Java Security Manager OSGi Equinox and Restrict Bundle Permissions

I want to add Java Security Manager for a OSGi equinox based system. My problem is that after enabling the JSM, every bundle get the BundlePermission from the framework, which result in java.lang.AllPermission to all the bundles.

How can I restrict for bundles for different policies?, e.g restrict some permissions based on the install location. etc..

Upvotes: 0

Views: 429

Answers (1)

BJ Hargrave
BJ Hargrave

Reputation: 9384

You should use the ConditionalPermissionAdmin service to set the desired permissions for the bundles. See https://osgi.org/javadoc/r4v43/core/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.html.

Upvotes: 1

Related Questions