| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <beans:bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource"> |
| <beans:constructor-arg value="${xa_ldap_url}"/> |
| <!-- Set bind user values and uncomment below two lines, if your LDAP settings require this --> |
| <!-- <beans:property name="userDn" value="***"/> |
| <beans:property name="password" value="***"/> --> |
| <!-- Uncomment the below line, if your LDAP settings require referral following --> |
| <!-- <beans:property name="referral" value="follow"/> --> |
| </beans:bean> |
| <beans:bean id="ldapAuthProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider"> |
| <beans:constructor-arg> |
| <beans:bean class="org.springframework.security.ldap.authentication.BindAuthenticator"> |
| <beans:constructor-arg ref="ldapContextSource"/> |
| <beans:property name="userDnPatterns"> |
| <beans:list> |
| <beans:value>${xa_ldap_userDNpattern}</beans:value> |
| </beans:list> |
| </beans:property> |
| </beans:bean> |
| </beans:constructor-arg> |
| <beans:constructor-arg> |
| <beans:bean class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator"> |
| <beans:constructor-arg ref="ldapContextSource"/> |
| <beans:constructor-arg value="${xa_ldap_groupSearchBase}"/> |
| <beans:property name="groupSearchFilter" value="${xa_ldap_groupSearchFilter}"/> |
| <beans:property name="groupRoleAttribute" value="${xa_ldap_groupRoleAttribute}"/> |
| </beans:bean> |
| </beans:constructor-arg> |
| </beans:bean> |