Authentication JBoss AS 7中web.xml中无角色的身份验证
对于RESTful企业应用程序,我需要对所有调用进行身份验证,但我不能提供系统所有用户都拥有的公共组/角色。我通过LDAP进行身份验证和授权(这不会对这个问题产生影响) 如果我在下面的web.xml中保留了注释掉的元素,那么我根本不会得到任何身份验证。如何在不需要公共角色的情况下进行身份验证?此外,空的auth consraint也不起作用Authentication JBoss AS 7中web.xml中无角色的身份验证,authentication,restful-authentication,web.xml,jboss7.x,Authentication,Restful Authentication,Web.xml,Jboss7.x,对于RESTful企业应用程序,我需要对所有调用进行身份验证,但我不能提供系统所有用户都拥有的公共组/角色。我通过LDAP进行身份验证和授权(这不会对这个问题产生影响) 如果我在下面的web.xml中保留了注释掉的元素,那么我根本不会得到任何身份验证。如何在不需要公共角色的情况下进行身份验证?此外,空的auth consraint也不起作用 <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<!-- fpe: This one is necessary. -->
<param-name>resteasy.role.based.security</param-name>
<param-value>true</param-value>
</context-param>
<security-constraint>
<web-resource-collection>
<web-resource-name>Resteasy</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<!-- <auth-constraint> -->
<!-- <role-name>*</role-name> -->
<!-- </auth-constraint> -->
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Login</realm-name>
</login-config>
<!-- <security-role> -->
<!-- <role-name>the_common_role</role-name> -->
<!-- </security-role> -->
</web-app>
resteasy.role.based.security
真的
放松
/*
得到
邮递
放
删除
保密的
基本的
登录
正确使用*可以实现以下目的:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<!-- fpe: This one is necessary. -->
<param-name>resteasy.role.based.security</param-name>
<param-value>true</param-value>
</context-param>
<security-constraint>
<web-resource-collection>
<web-resource-name>Resteasy</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Login</realm-name>
</login-config>
<security-role>
<role-name>*</role-name>
</security-role>
</web-app>
resteasy.role.based.security
真的
放松
/*
得到
邮递
放
删除
*
保密的
基本的
登录
*