--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.argeo.commons.security.demo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+#Wed Sep 16 19:11:49 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
--- /dev/null
+#Wed Sep 16 19:09:41 CEST 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
log4j.logger.org.hibernate=WARN
log4j.logger.org.springframework=WARN
-log4j.logger.org.springframework.web=DEBUG
+#log4j.logger.org.springframework.web=DEBUG
#log4j.logger.org.springframework.jms=WARN
-#log4j.logger.org.springframework.security=WARN
-
-log4j.logger.org.apache.activemq=WARN
-log4j.logger.org.apache.activemq.transport=WARN
-log4j.logger.org.apache.activemq.ActiveMQMessageConsumer=INFO
-log4j.logger.org.apache.activemq.ActiveMQMessageProducer=INFO
+log4j.logger.org.springframework.security=DEBUG
log4j.logger.org.apache.catalina=INFO
log4j.logger.org.apache.coyote=INFO
<plugin>
<groupId>org.argeo.maven.plugins</groupId>
<artifactId>maven-argeo-osgi-plugin</artifactId>
+ <version>${version.maven-argeo-osgi}</version>
<extensions>true</extensions>
<configuration>
<bundlesPomArtifactId>org.argeo.security.demo</bundlesPomArtifactId>
<plugin>
<groupId>org.argeo.maven.plugins</groupId>
<artifactId>maven-argeo-osgi-plugin</artifactId>
+ <version>${version.maven-argeo-osgi}</version>
<configuration>
<execDir>target/exec</execDir>
<osgiBootArtifactId>org.argeo.osgi.boot</osgiBootArtifactId>
ActiveMQ <dependency> <groupId>org.argeo.dep.osgi</groupId>
<artifactId>org.argeo.dep.osgi.activemq</artifactId> </dependency>
-->
+
+ <!-- Apache Directory -->
+ <dependency>
+ <groupId>org.apache.directory</groupId>
+ <artifactId>com.springsource.org.apache.directory.server.core</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.directory</groupId>
+ <artifactId>com.springsource.org.apache.directory.server.jndi</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.jdbm</groupId>
+ <artifactId>com.springsource.jdbm</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <!--
+ TODO: version 2.4.0 is required by Spring-LDAP while Apache Directory
+ takes 2.1.0
+ -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>com.springsource.org.apache.commons.lang</artifactId>
+ <version>2.4.0</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
org.springframework.web.context,
org.springframework.web.context.support,
org.springframework.web.filter,
- org.springframework.web.servlet
+ org.springframework.web.servlet,
+ org.springframework.security.ldap,
+ org.springframework.security.providers.ldap,
+ org.springframework.security.providers.ldap.authenticator,
+ org.springframework.security.ldap.populator,
+ org.springframework.security.userdetails.ldap,
+ org.springframework.security,
+ org.springframework.ldap.core.support
<import resource="classpath:/org/argeo/slc/server/spring/jmx.xml" />
-->
<import resource="security.xml" />
+ <import resource="ldap.xml" />
<import resource="osgi.xml" />
--- /dev/null
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:security="http://www.springframework.org/schema/security"
+ 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.4.xsd">
+ <security:ldap-server url="ldap://localhost:389/dc=argeo,dc=org"
+ manager-dn="cn=Manager,dc=argeo,dc=org" manager-password="secret" />
+ <security:ldap-authentication-provider
+ user-dn-pattern="uid={0},ou=users" group-search-base="ou=groups">
+ <security:password-compare hash="{sha}" />
+ </security:ldap-authentication-provider>
+
+ <!--
+ <bean id="contextSource"
+ class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
+ <constructor-arg value="ldap://localhost:389/dc=argeo,dc=org" />
+ <property name="userDn" value="cn=Manager,dc=argeo,dc=org" />
+ <property name="password" value="secret" />
+ </bean>
+
+ <bean id="ldapAuthProvider"
+ class="org.springframework.security.providers.ldap.LdapAuthenticationProvider">
+ <constructor-arg>
+ <bean
+ class="org.springframework.security.providers.ldap.authenticator.PasswordComparisonAuthenticator">
+ <constructor-arg ref="contextSource" />
+ <property name="userDnPatterns">
+ <list>
+ <value>uid={0},ou=users</value>
+ </list>
+ </property>
+ <property name="passwordEncoder">
+ <bean
+ class="org.springframework.security.providers.ldap.authenticator.LdapShaPasswordEncoder"></bean>
+ </property>
+ </bean>
+ </constructor-arg>
+ <constructor-arg>
+ <bean
+ class="org.springframework.security.ldap.populator.DefaultLdapAuthoritiesPopulator">
+ <constructor-arg ref="contextSource" />
+ <constructor-arg value="ou=groups" />
+ <property name="groupRoleAttribute" value="ou" />
+ </bean>
+ </constructor-arg>
+ </bean>
+
+ -->
+</beans>
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
<http realm="User Interface" >
- <intercept-url pattern="/**" access="ROLE_USER,ROLE_ADMIN" />
+ <intercept-url pattern="/**" access="ROLE_REGISTEREDUSERS,ROLE_USER,ROLE_ADMIN" />
<http-basic />
<anonymous />
</http>
-
+
+<!--
<authentication-provider>
<user-service>
<user name="mbaudier" password="mbaudier" authorities="ROLE_USER,ROLE_ADMIN" />
<user name="demo" password="demo" authorities="ROLE_USER" />
</user-service>
</authentication-provider>
-
+ -->
</beans:beans>
<dependency>
<groupId>org.argeo.dep.osgi</groupId>
<artifactId>org.argeo.dep.osgi.springframework.ldap</artifactId>
- <version>1.3.0.0002</version>
+ <version>1.3.0.0003-SNAPSHOT</version>
</dependency>
<!-- Security -->
--- /dev/null
+Bundle-Version: 0.1.1.SNAPSHOT
+Bundle-SymbolicName: org.argeo.server.ads.server
+Import-Package: org.apache.directory.server.configuration,
+ org.apache.directory.server.core.partition.impl.btree,
+ org.apache.directory.server.jndi,
+ org.apache.directory.shared.asn1.codec,
+ org.springframework.security.config,
+ org.springframework.security.ldap
--- /dev/null
+<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.4.xsd">
+
+ <!-- <ldap-server ldif="classpath:base.ldif" /> -->
+ <ldap-server root="dc=argeo,dc=org" port="10389"/>
+
+</beans:beans>