1

大家好,我尝试在 glass fish 3.1 中配置 Relam Ldap 来解决这个问题,但我收到了这个错误

WARNING: SEC1106: Error during LDAP search with filter [uid=teuser].
WARNING: SEC1000: Caught exception.
javax.naming.NamingException: [LDAP: error code 1 - 000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this operation a successful bind must be completed on the connection., data 0, v1db1]; remaining name= 'DC=dev,DC=tcs,DC=com'
WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: javax.security.auth.login.LoginException: User MyUserName not found.

web.xml 看起来像这样:

<security-constraint>
<display-name>Constraint1</display-name>
    <web-resource-collection>
        <web-resource-name>Simple Web Resource</web-resource-name>
        <description/>
        <url-pattern>*</url-pattern>
    </web-resource-collection>
</security-constraint>

<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>ldapRealm</realm-name>
    <form-login-config>
        <form-login-page>/index.jsp</form-login-page>
        <form-error-page>/error.xhtml</form-error-page>
    </form-login-config>
</login-config>

glassfish 目录中的 domain.xml :

<auth-realm name="ldapRealm" classname="com.sun.enterprise.security.auth.realm.ldap.LDAPRealm">
      <property name="directory" value="ldap://10.0.???.???:389"></property>
      <property name="base-dn" value="DC=dev,DC=tcs,DC=com"></property>
      <property name="jaas-context" value="ldapRealm"></property>
    </auth-realm>

我需要知道那个错误是 glassfish 的配置问题还是什么?

4

1 回答 1

1

当我没有为 Active Directory 服务器指定正确的凭据时,我点击了这个。将凭据指定为其他领域属性:

  1. search-bind-dn 查找用户名
  2. search-bind-password 获取密码
于 2013-08-06T14:14:13.417 回答