简体   繁体   English

启用Java Security Manager OSGi Equinox并限制捆绑包权限

[英]Enable Java Security Manager OSGi Equinox and Restrict Bundle Permissions

I want to add Java Security Manager for a OSGi equinox based system. 我想为基于OSGi春分的系统添加Java安全管理器。 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. 我的问题是,启用JSM后,每个捆绑包都会从框架获取BundlePermission,这将导致对所有捆绑包的java.lang.AllPermission。

How can I restrict for bundles for different policies?, eg restrict some permissions based on the install location. 如何限制用于不同策略的捆绑软件?例如,根据安装位置限制某些权限。 etc.. 等等..

You should use the ConditionalPermissionAdmin service to set the desired permissions for the bundles. 您应该使用ConditionalPermissionAdmin服务来为捆绑软件设置所需的权限。 See https://osgi.org/javadoc/r4v43/core/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.html . 参见https://osgi.org/javadoc/r4v43/core/org/osgi/service/condpermadmin/ConditionalPermissionAdmin.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM