如何分析 .net 程序集需要哪些权限
我需要知道程序集请求哪些权限。经许可,我的意思是例如 WebPermission
背景:我有一个在沙箱中执行插件的服务。这些插件受到代码访问安全性的限制。例如:不允许他们访问文件系统或注册表。网络仅限于http,...
我想在我们的构建过程中分析这些插件,以确保只使用类,这些类被授予的权限所覆盖。
I need to know which permissions are requested by an assembly. With permission I mean for example the WebPermission
Background: I have a service which executes plugins in a sandbox. These plugins are restricted with code-access security. For example: they aren't allowed to access the file system or the registry. Networking is restricted to only http, ...
I would like to analyze these plugins in our build-process to ensure that only classes are used, which are covered by the granted permissions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 .NET 2.0 到 3.5 中,permcalc 工具允许您为程序集提取“最佳猜测”最小权限集。然而,该工具尚未针对 .NET 4.0 进行更新,例如,新的透明度方法将对分析结果产生相当大的影响。
AFAIK,.NET 4.0 没有可用的 permcalc 替代品(微软或第三方,商业或免费)。如果没有这样的工具,验证插件的最佳选择可能是在运行时权限集下运行一组适当的集成测试。
In .NET 2.0 through 3.5, the permcalc tool would have allowed you to extract a "best guess" minimum permission set for an assembly. However, the tool has not been updated for .NET 4.0 where, for example, the new transparency approach would have a considerable impact on the analysis results.
AFAIK, there is no permcalc substitute (Microsoft or third-party, commercial or free) available for .NET 4.0. In the absence of such a tool, your best bet for verifying the plug-ins would probably be an appropriate set of integration tests run under the runtime permission set.