Improvements to LDAP namespace configuration - splitting "ldap" element into ldap-server and ldap-authentication-provider. Also some minor changes to authentication-provider.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/security"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
|
||||
|
||||
<!-- All combinations should authenticate as bob/password -->
|
||||
|
||||
<authentication-provider>
|
||||
<user-service>
|
||||
<user name="bob" password="bobspassword" authorities="ROLE_A" />
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
|
||||
<authentication-provider user-service-ref="myUserService" />
|
||||
|
||||
<user-service id="myUserService">
|
||||
<user name="bob" password="bobspassword" authorities="ROLE_A" />
|
||||
</user-service>
|
||||
|
||||
<authentication-provider>
|
||||
<password-encoder hash="md5"/>
|
||||
<user-service>
|
||||
<user name="bob" password="12b141f35d58b8b3a46eea65e6ac179e" authorities="ROLE_A" />
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
|
||||
<authentication-provider>
|
||||
<password-encoder hash="{sha}"/>
|
||||
<user-service>
|
||||
<user name="bob" password="{SSHA}PpuEwfdj7M1rs0C2W4ssSM2XEN/Y6S5U" authorities="ROLE_A" />
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
|
||||
</beans:beans>
|
||||
@@ -32,7 +32,7 @@ http://www.springframework.org/schema/security http://www.springframework.org/sc
|
||||
</user-service>
|
||||
</authentication-provider>
|
||||
|
||||
<beans:bean name="tokenRepo" class="org.springframework.security.ui.rememberme.InMemoryTokenRepositoryImpl"/>
|
||||
<beans:bean id="tokenRepo" class="org.springframework.security.ui.rememberme.InMemoryTokenRepositoryImpl"/>
|
||||
|
||||
<!-- bean name="rememberMeServices" class="org.springframework.security.ui.rememberme.NullRememberMeServices"/ -->
|
||||
|
||||
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:security="http://www.springframework.org/schema/security"
|
||||
<b:beans xmlns="http://www.springframework.org/schema/security"
|
||||
xmlns:b="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
|
||||
|
||||
|
||||
<security:ldap />
|
||||
|
||||
<ldap-server ldif="classpath*:test-server2.xldif" root="dc=monkeymachine,dc=co,dc=uk" />
|
||||
|
||||
</beans>
|
||||
|
||||
</b:beans>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
|
||||
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
|
||||
|
||||
<security:ldap port="53389" ldif="classpath:test-server.ldif"/>
|
||||
<security:ldap-server port="53389" ldif="classpath:test-server.ldif"/>
|
||||
|
||||
<!--<import resource="classpath:/org/springframework/security/ldap/apacheDsContext.xml"/>-->
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
dn: ou=gorillas,dc=monkeymachine,dc=co,dc=uk
|
||||
objectclass: top
|
||||
objectclass: organizationalUnit
|
||||
ou: gorillas
|
||||
|
||||
dn: uid=pg,ou=gorillas,dc=monkeymachine,dc=co,dc=uk
|
||||
objectclass: top
|
||||
objectclass: person
|
||||
objectclass: organizationalPerson
|
||||
objectclass: inetOrgPerson
|
||||
cn: Pierre
|
||||
sn: Gorille
|
||||
uid: pg
|
||||
userPassword: password
|
||||
|
||||
|
||||
Reference in New Issue
Block a user