2016-12-06 5 views
0

현재 Active Directory에서 Employee 데이터를 가져 와서 JSON으로 표시하는 Spring 부팅 응용 프로그램이 있습니다.Spring LDAP가 AD LDS에서 읽을 수 없습니다.

그러나 Active Directory에 직접 연결하고 싶지는 않지만 Active Directory Lightweight 서비스를 사용하고 싶습니다.

나는 연결을 설정하고 같은 방식으로 연결할 수 있다고 가정했지만 오류 49 (잘못된 자격 증명) 오류가 계속 발생합니다. Active Directory에서 작동하는 것과 동일한 자격 증명을 사용하고 있습니다.

이것은 Spring.xml 구성 자격 증명입니다 : 내가 시도하고 AD LDS URL로 URL을 (즉, 로컬 호스트를 사용합니다) 변경하는 경우

<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> 
     <property name="url" value="ldap://example.com:389" /> 
     <property name="base" value=" DC=example,DC=com" /> 
     <property name="userDn" value="[email protected]" /> 
     <property name="password" value="password" /> 
    </bean> 

    <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate"> 
     <constructor-arg ref="contextSource" /> 
     <property name="ignorePartialResultException" value="true" /> 
    </bean> 

, 나는 LDAP 오류 49이 사람이 경험이 있습니까 얻을 이 기술들? 도와주세요.

편집 :

내 Active Directory 도메인 이름을 사용하려고하면 내가 얻을 :

The authentication failed 
- [LDAP: error code 49 - 8009030C: LdapErr: DSID-0C0903C4, comment: AcceptSecurityContext error, data 2030, v295a 

나는 시도하고 사용자 DN을 사용하는 경우 내가 얻을 :

The authentication failed 
- [LDAP: error code 80 - 80090304: LdapErr: DSID-0C0903C4, comment: AcceptSecurityContext error, data 20ee, v295a 
+0

Apache Directory Studio와 같은 LDAP 브라우저를 사용하여 AD LDS에 연결을 시도 했습니까? – Roshith

+0

예. 있습니다. 그것은 내가 거기에 들어가는 것을 허락하지 않는다. 그러나 Softerra의 LDAP 브라우저를 사용하고 "현재 사용자"자격 증명을 사용하면 들어갈 수 있습니다. Softerra 브라우저에서 내 자격 증명을 수동으로 추가하면 불만이 제기됩니다. – Razor88

+0

전체 오류 스택으로 질문을 업데이트하십시오. 오류 코드 49에는 532, 533 등과 같은 하위 오류 코드와 연관된 오류의 특정 원인, 즉 계정 사용 불가능, 암호 만료 등이 표시됩니다. – Roshith

답변

0

당신이 필요 cn = jsmith @ example.com, ou = xyz, dc = abc, dc-com과 같이 "userDn"으로 사용자의 완전한 DN을 제공하십시오.