管理对OSGI捆绑软件的访问 [英] Managing access to OSGI bundles

查看:81
本文介绍了管理对OSGI捆绑软件的访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何控制对捆绑软件的访问.我有一组捆绑包,这些捆绑包通过 MANIFEST.MF 中的导出来暴露软件包.公开的软件包应该仅在我的捆绑包中使用.不允许任何其他外部捆绑包通过导入包"使用这些包.

How can i control access to my bundles. I have a set of bundles that expose packages through export in MANIFEST.MF. Packages exposed are supposed to be used only within my set of bundles. No other external bundles should be allowed to use these packages using "import package".

有什么办法可以施加这些限制吗?

Is there any way i can impose these restrictions?

推荐答案

您可以查看OSGi安全性(2.Security Layer OSGi核心规范)来管理对各种资源(捆绑,包,服务等)的限制.

You can take a look at OSGi Security (2.Security Layer OSGi Core Spec) to manage restrictions to various resources (bundles, packages, services etc.).

根据您的情况,您可以将 PackagePermission 设置为将IMPORT/EXPORT操作导入您的捆绑包.其他捆绑软件将没有任何导入包的权限.

In your case you can set PackagePermission with IMPORT/EXPORT actions to your bundles. The other bundles will not have any permissions to import your packages.

这篇关于管理对OSGI捆绑软件的访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆