用户权限问题是绝大部分应用都要考虑的问题,在这些应用中想必都会定义role,user等来控制资源的访问。今天这里要说的并不是如何去设计权限的管理系统,而是来说明一下Web应用的安全域等。 在与Java web相关的JSR中,对于Ja ...
用户权限问题是绝大部分应用都要考虑的问题,在这些应用中想必都会定义role,user等来控制资源的访问。今天这里要说的并不是如何去设计权限的管理系统,而是来说明一下Web应用的安全域等。
在与Java web相关的JSR中,对于Java Web的安全访问有也相关规定,具体内容就不再这里阐述。与些相关的配置有:security-constraint,security-role,login-config。
Web安全访问的机制其实就是一套权限处理系统。它包括了:role、user、resources、group等概念。接下来就心Tomcat的manager应用为例来了解一下web安全相关内容。
1、在Web.中使用security-role定义角色
在Manager应用在web.
<security-role> <description> The role that is required to access the HTML Manager pages </description> <role-name>manager-gui</role-name> </security-role> <security-role> <description> The role that is required to access the text Manager pages </description> <role-name>manager-script</role-name> </security-role> <security-role> <description> The role that is required to access the HTML JMX Proxy </description> <role-name>manager-jmx</role-name> </security-role> <security-role> <description> The role that is required to access to the Manager Status pages </description> <role-name>manager-status</role-name> </security-role> <security-role> <description> Deprecated role that can access all Manager functionality </description> <role-name>manager</role-name> </security-role>
原标题:Java WEB Security Authentication
关键词:JAVA
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。