在Tomcat7上配置安全管理器

时间:2015-10-07 15:11:35

标签: security tomcat

尝试为Tomcat 7配置Security Manager。我们在64位Windows 2008服务器上运行Java 1.8.0_51并将Tomcat作为服务运行。我已将以下行添加为Java选项:

-Djava.security.manager
-Djava.security.policy=D:\Program Files\Apache Software Foundation\Tomcat7.0\conf\catalina.policy

安全策略文件是默认文件,尚未修改。添加行后,我无法再启动Tomcat。我收到以下错误消息:

2015-10-07 08:58:31 Commons Daemon procrun stderr initialized properties: reading security properties file: C:\Program Files\Java\jre1.8.0_51\lib\security\java.security jar: beginEntry META-INF/MANIFEST.MF jar: done with meta! jar: nothing to verify! scl: getPermissions ProtectionDomain  (file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat7.0/bin/tomcat-juli.jar <no signer certificates>)  sun.misc.Launcher$AppClassLoader@c387f44  <no principals>  java.security.Permissions@28d93b30 (  ("java.lang.RuntimePermission" "exitVM")  ("java.io.FilePermission" "\D:\Program Files\Apache Software Foundation\Tomcat7.0\bin\tomcat-juli.jar" "read") ) scl:  policy: reading file:/D:/Program%20Files/Apache%20Software%20Foundation/Tomcat7.0/conf/catalina.policy     [Policy Parser]: sun.security.util.PropertyExpander$ExpandException: unable to expand property catalina.home    [Policy Parser]: sun.security.util.PropertyExpander$ExpandException: unable to expand property catalina.base

我也看到如下错误: java.lang.IllegalArgumentException:null KeyStore name

如果删除新的配置行,一切都很顺利。

有什么想法吗?

0 个答案:

没有答案