Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Example: pentahoadmin@mycompany.com

Code Block
nonenone
titleapplicationContext-security-ldap.properties
none
# backslash before colon to escape it
contextSource.providerUrl=ldap\://mycompany\:389
contextSource.userDn=pentahoadmin@mycompany.com
contextSource.password=secret

...

Example: MYCOMPANY\pentahoadmin

none
Code Block
none
titleapplicationContext-security-ldap.properties
none
# backslash before colon to escape it
contextSource.providerUrl=ldap\://mycompany\:389
# backslash before backslash to escape it
contextSource.userDn=MYCOMPANY\\pentahoadmin
contextSource.password=secret

...

The sAMAccountName attribute should be used as the username in user searches. The searchSubtree property (which influences the SearchControls) should most likely be true. Otherwise, it searches the specified base plus one level down.

none
Code Block
none
titleapplicationContext-security-ldap.properties
none
# backslash before opening and closing braces to escape them
userSearch.searchFilter=(sAMAccountName=\{0\})
xml
Code Block
xml
titleapplicationContext-spring-security-ldap.xml
xml
<bean id="userSearch" class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch">
<constructor-arg index="0" value="${userSearch.searchBase}" />
<constructor-arg index="1" value="${userSearch.searchFilter}" />
<constructor-arg index="2">
<ref local="contextSource" />
</constructor-arg>
  <property name="searchSubtree" value="true" />
</bean>

...