简体   繁体   English

为什么需要在 OSGi Security 中为 java 安全管理器授予所有权限

[英]Why it is necessary to grant All Permission for java security manager in OSGi Security

I want to enable Java Security Manager in my server.我想在我的服务器中启用 Java 安全管理器。 But, by doing that, as stated in the question [1], it grants all permission to the OSGI bundles.但是,通过这样做,如问题 [1] 中所述,它会授予 OSGI 包的所有权限。

When trying to enable Security for OSGi bundles, it is mentioned that to grant all permission from the Java Security Manager.在尝试为 OSGi 包启用安全性时,提到要从 Java 安全管理器授予所有权限。 [2] [2]

Does anyone know the actual reason for this configuration?有谁知道这种配置的实际原因?

Can we use both Java Security Manager and OSGi security simultaneously when we have OSGi bundles as well as other jars and war files in the server?当服务器中有 OSGi 包以及其他 jar 和 war 文件时,我们可以同时使用 Java 安全管理器和 OSGi 安全吗?

[1] Enable Java Security Manager OSGi Equinox and Restrict Bundle Permissions [1] 启用 Java Security Manager OSGi Equinox 并限制捆绑权限

[2] https://felix.apache.org/documentation/subprojects/apache-felix-framework-security.html [2] https://felix.apache.org/documentation/subprojects/apache-felix-framework-security.html

When using Java security in an OSGi framework, you typically have the OSGi framework install and configure its own Security Manager.在 OSGi 框架中使用 Java 安全性时,您通常让 OSGi 框架安装并配置其自己的安全管理器。 See Security Layer and Conditional Permission Admin .请参阅安全层条件权限管理 Permission Admin is the precursor to Conditional Permission Admin and it still fully supported. Permission Admin是 Conditional Permission Admin 的前身,它仍然受到完全支持。

The OSGi framework itself needs AllPermission due to the many functions it must perform and also because it must be able to assign permissions to installed bundles. OSGi 框架本身需要 AllPermission,因为它必须执行许多功能,还因为它必须能够为已安装的包分配权限。

According to Permissions you can use the normal Java Security Manager with OSGi security but support for postponed conditions will not be possible.根据权限,您可以使用具有 OSGi 安全性的普通 Java 安全管理器,但无法支持延迟条件

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

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