0
如何允许AD中的所有用户登录到我的应用程序(强制他们登录)?不只是由组定义。Tomcat AD身份验证 - 允许所有AD用户
这是我的web.xml。
<security-constraint>
<web-resource-collection>
<web-resource-name>MyApplication</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
</security-constraint>
<security-role>
<role-name>some-ad-role</role-name>
</security-role>
<security-role>
<role-name>another-ad-role</role-name>
</security-role>
<!-- Basic Authentication using a JNDIRealm -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>Login</realm-name>
</login-config>
我还是想用request.isUserInRole使用AD组进行授权我的应用程序中(),但起初每个人都可以登录到应用程序,以便我能有自己的检查目的的用户名。
可能dublicate:HTTP://stackoverflow.com/questions/3720343/ldap-authentication-via-web-xml-in-tomcat – Cratylus
@Cratylus那些例子谈话包括使用限制登录到唯一定义的角色的在安全约束中......我的问题稍有不同 - 我需要允许所有用户,无论他们在哪个组,只要他们在AD中。 –
user1277546
我们在wiki上放置了[Tomcat And LDAP](http://ldapwiki.willeke.com/wiki/Tomcat%20And%20LDAP),它应该有所帮助。 – jwilleke