tomcat DOD STIG修复Java安全管理器不工作

camsedfj  于 2023-11-19  发布在  Java
关注(0)|答案(1)|浏览(114)

我正在尝试为Java Security Manager应用DOD STIG修复程序。修复程序要求我修改*/etc/systemd/system/tomcat. service * 文件并将"ExecStart"参数设置为:ExecStart=/opt/tomcat/bin/startup.sh -security
在我应用这个修复程序后,tomcat将无法启动。其他人有没有遇到过这个问题?
我在ExecStart=/opt/tomcat/bin/startup.sh的末尾添加了-security。在保存/退出tomcat.service文件后,我应用了systemctl daemon-reload命令。我希望tomcat能按预期运行,但过了一段时间它无法启动。
当我重新启动tomcat时, Catalina . out显示如下:
2023年10月19日14:16:26.412 SEVERE [acop-startStop-1] org. apache. Catalina . core. ContainerBase. start Internal启动java时子容器失败。util. concurrent. ExecutionException:org. apache. Catalina . LifecycleException:无法在www.example.com上启动组件[StandardEngine [a2]. StandardHost [localhost]. StandardContext [/a2]](FutureTask.java:122)在java. util. concurrent. FutureTask. get(FutureTask.java:192)在org. apache. Catalina . core. ContainerBase. startInternal(ContainerBase.java:892)at org. apache. Catalina . core. StandardHost. startInternal(StandardHost.java:java.util.concurrent.FutureTask.report440)at org. apache. catalina. util. Lifecycle. base. start(Lifecycle. java:198). 6 more Caused by:java. security. Lifecycle ControlException:access denied("java. lang. RuntimePermission""accessClassInPackage. org. apache. catalina. connector")at java. security. Lifecycle ControlContext. checkPermission("java. lang. RuntimePermission""accessClassInPackage. org. apache. catalina. connector")at java. security. Lifecycle ControlContext. checkPermission("java. lang. RuntimePermission""accessClassInPackage. org. apache. catalina. connector")472)在java. security. socket Controller. checkPermission(javaController.java:886)位于java. lang. SecurityManager. checkPermission(SecurityManager.java:549),位于java. lang. SecurityManager. checkPackageAccess(SecurityManager.java:1564),位于java. lang. ClassLoader $www.example.com(ClassLoader.java:496),位于java. lang. ClassLoader $www.example.com(ClassLoader.java:java.security.serviceController.documented上的(本机方法),位于java. lang. ClassLoader. checkPackageAccess(ClassLoader.java:494)位于java.lang.Class.getDeclaredFields 0(Native Method)at java. lang. Class. privateGetDeclaredFields(Class.java:2583)at java. lang. Class. getDeclaredFields(Class.java:StartChild.call

bq9c1y66

bq9c1y661#

您可能需要修改您的conf/catalina.policy并包括一些额外的权限,例如:

permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.connector";

字符串

相关问题