简体   繁体   English

Java安全管理器的使用

[英]Uses of Java Security Manager

I was reading some article on Java Security, and came across uses of java.policy files for granting permission to the source code coming from different code sources. 我正在阅读一些关于Java安全性的文章,并且遇到了java.policy文件的使用,用于授予来自不同代码源的源代码的许可。

My question is, do we still use the Policy files for granting permissions to the source code? 我的问题是,我们是否仍然使用策略文件授予源代码权限?

Or use Java Security manager for restricting the code from accessing certain resources? 或者使用Java安全管理器来限制代码访问某些资源?

I do not see uses of java -Djava.security.Manager anywhere in even my App-server (JBoss) start up script. 我甚java -Djava.security.Manager在我的App-server(JBoss)启动脚本的任何地方都看不到java -Djava.security.Manager

Yes, java still uses the java security manager for controlling access. 是的,java仍然使用java安全管理器来控制访问。 However, most application servers, including JBoss and Tomcat, don't enable support for it out of the box. 但是,大多数应用程序服务器(包括JBoss和Tomcat)都不支持开箱即用。 JBoss has a standard configuration that allows you to enable the security manager. JBoss有一个标准配置,允许您启用安全管理器。

The policy file(s) will be read by the security manager, if one is installed. 如果安装了策略文件,安全管理器将读取策略文件。 Without the manager, the policy is ignored; 没有经理,政策就会被忽视; without a policy, the manager will block pretty much every action. 没有政策,经理几乎会阻止每一个行动。

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

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