tomcat安全管理策略
2010-12-17 18:44
288 查看
这段时间在使用apache.xmlrpc和pgsql-jdbc碰到tomcat安全问题
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
SQLException: Your security policy has prevented the connection from being attempted. You probably need to grant the connect java.net.SocketPermission to the database server host and port that you wish to connect to.
SQLState: 99999
VendorError: 0
#原来etc/init.d/tomcat6在ubuntu8.0+服务器默认开启保护,设置关闭就可以访问xmlrpc.
sudo vim /etc/init.d/tomcat6
# Use the Java security manager? (yes/no)
TOMCAT6_SECURITY=yes
#但关闭后tomcat环境安全级别比较低,易找到漏洞,后来找到了解决方案!
#更改策略文件
sudo vim /var/lib/tomcat6/conf/policy.d/50local.policy
#然后在最后一行添加, database是我的项目文件配置有所有权限
grant codeBase "file:${catalina.base}/webapps/database/-" {
permission java.security.AllPermission;
};
#ok搞定jdbc连接和xmlrpc访问
参考:http://www.jaxmao.org/tomcat-docs/security-manager-howto.html
HTTP Status 500 -
type Exception reportmessage
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Could not initialize class org.apache.xmlrpc.webserver.XmlRpcServletServer org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:324) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Thread.java:662)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Apache Tomcat/6.0.24
#postgresql-jdbc-error:SQLException: Your security policy has prevented the connection from being attempted. You probably need to grant the connect java.net.SocketPermission to the database server host and port that you wish to connect to.
SQLState: 99999
VendorError: 0
#原来etc/init.d/tomcat6在ubuntu8.0+服务器默认开启保护,设置关闭就可以访问xmlrpc.
sudo vim /etc/init.d/tomcat6
# Use the Java security manager? (yes/no)
TOMCAT6_SECURITY=yes
#但关闭后tomcat环境安全级别比较低,易找到漏洞,后来找到了解决方案!
#更改策略文件
sudo vim /var/lib/tomcat6/conf/policy.d/50local.policy
#然后在最后一行添加, database是我的项目文件配置有所有权限
grant codeBase "file:${catalina.base}/webapps/database/-" {
permission java.security.AllPermission;
};
#ok搞定jdbc连接和xmlrpc访问
参考:http://www.jaxmao.org/tomcat-docs/security-manager-howto.html
相关文章推荐
- Tomcat容器管理安全的几种验证方式
- 启动获取安全策略文件服务出错-tomcat
- SQL Server数据库的安全和管理策略
- 启动获取安全策略文件服务出错-tomcat
- Tomcat 6 --- 你很少使用的安全管理SecurityManager
- win2008 域安全策略管理
- Tomcat的系统安全管理
- 关于企业级安全管理策略的探讨
- 安全管理器及策略
- Tomcat 6 --- 你很少使用的安全管理SecurityManager
- Tomcat安全管理规范
- Tomcat 6 --- 你很少使用的安全管理SecurityManager
- 关于企业级安全管理策略的探讨
- 设置Office 365移动设备管理MDM服务——创建设备安全策略
- Tomcat的系统安全管理
- Java安全管理——策略文件介绍
- linux新加坡专有网络部署tomcat以后外部浏览器无法访问--专线网络安全组策略
- Android中如何通过强制设备管理策略创建一个安全敏感的应用程序
- Tomcat容器管理安全的几种验证方式
- Tomcat的系统安全管理