<properties>
<developmentCycle>0.1</developmentCycle>
<version.slc>0.12.1-SNAPSHOT</version.slc>
+ <version.argeo-ria>0.12.1-SNAPSHOT</version.argeo-ria>
<version.maven-argeo-osgi>0.1.21</version.maven-argeo-osgi>
<version.maven-bundle-plugin>2.0.0</version.maven-bundle-plugin>
<version.maven-argeo-qooxdoo>0.8.2.1</version.maven-argeo-qooxdoo>
org.springframework.osgi.extender,
org.springframework.osgi.web.extender,
org.argeo.dep.osgi.catalina.start,
+ org.argeo.security.manager.ldap,
org.argeo.security.webapp,
+ org.argeo.security.ria,
org.argeo.server.ads.server
</slc.osgi.start>
<slc.osgi.bundles>
- ${basedir};in=*;ex=pom.xml;ex=target;ex=.*,
+ ${basedir};in=*;ex=pom.xml;ex=target;ex=.*;ex=*.ldif,
${basedir}/../modules;in=*;ex=pom.xml;ex=target;ex=.*,
${basedir}/../../server/modules;in=*;ex=pom.xml;ex=target;ex=.*,
</slc.osgi.bundles>
<artifactId>org.argeo.security.mvc</artifactId>
<version>0.1.1-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.argeo.commons.security</groupId>
+ <artifactId>org.argeo.security.ria</artifactId>
+ <version>0.1.1-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.argeo.commons.server</groupId>
<artifactId>org.argeo.server.json</artifactId>
--- /dev/null
+Bundle-SymbolicName: org.argeo.security.manager.ldap
+Bundle-Version: 0.1.1.SNAPSHOT
+Import-Package: org.springframework.security.ldap,
+ org.springframework.security.providers,
+ 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
--- /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">
+
+
+ <bean id="_authenticationManager" class="org.springframework.security.providers.ProviderManager">
+ <property name="providers">
+ <list>
+ <ref bean="authenticationProvider" />
+ </list>
+ </property>
+ </bean>
+
+ <!--
+ <security:ldap-server
+ url="ldap://localhost:10389/dc=demo,dc=argeo,dc=org"
+ manager-dn="uid=admin,ou=system" manager-password="secret" />
+
+ <security:ldap-authentication-provider
+ user-details-class="inetOrgPerson" 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:10389/dc=demo,dc=argeo,dc=org" />
+ <property name="userDn" value="uid=admin,ou=system" />
+ <property name="password" value="secret" />
+ </bean>
+
+ <bean id="authenticationProvider"
+ 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="defaultRole" value="ROLE_USER" /> -->
+ <property name="groupSearchFilter" value="uniqueMember={0}" />
+ </bean>
+ </constructor-arg>
+ </bean>
+
+</beans>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
+ http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+ http://www.springframework.org/schema/beans \r
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
+\r
+ <service ref="_authenticationManager"\r
+ interface="org.springframework.security.AuthenticationManager" />\r
+ <!-- <service ref="authenticationProvider"\r
+ interface="org.springframework.security.providers.AuthenticationProvider" /> -->\r
+</beans:beans>
\ No newline at end of file
javax.servlet.resources,
org.argeo.security.mvc,
org.argeo.server.json.mvc,
+ org.springframework.ldap.core.support,
org.springframework.osgi.web.context.support,
- org.springframework.security.userdetails.memory,
+ org.springframework.security,
org.springframework.web.context,
org.springframework.web.context.support,
org.springframework.web.filter,
- 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
+ org.springframework.web.servlet
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
- <!--
- <import resource="classpath:/org/argeo/slc/server/spring/jmx.xml" />
- -->
<import resource="security.xml" />
- <import resource="ldap.xml" />
-
<import resource="osgi.xml" />
<!-- Properties -->
+++ /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:10389/dc=demo,dc=argeo,dc=org"
- manager-dn="uid=admin,ou=system" manager-password="secret" />
-
- <security:ldap-authentication-provider
- user-details-class="inetOrgPerson" 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/beans \r
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">\r
\r
+ <reference id="_authenticationManager"\r
+ interface="org.springframework.security.AuthenticationManager" />\r
</beans:beans>
\ No newline at end of file
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">
- <http realm="User Interface" >
+ <http realm="User Interface">
<intercept-url pattern="/**" access="ROLE_USER,ROLE_ADMIN" />
<http-basic />
<anonymous />
org.springframework.web.context,
org.springframework.osgi.web.context.support,
org.springframework.web.filter,
- org.springframework.security.context
+ org.springframework.ldap.core.support,
+ org.springframework.security
</Import-Package>
<Web-ContextPath>org.argeo.security.ria</Web-ContextPath>
</instructions>
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+ <import resource="osgi.xml" />
<import resource="security.xml" />
</beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans:beans xmlns="http://www.springframework.org/schema/osgi"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"\r
+ xmlns:security="http://www.springframework.org/schema/security"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi \r
+ http://www.springframework.org/schema/osgi/spring-osgi-1.1.xsd\r
+ http://www.springframework.org/schema/beans \r
+ http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">\r
+\r
+ <reference id="_authenticationManager"\r
+ interface="org.springframework.security.AuthenticationManager" />\r
+</beans:beans>
\ No newline at end of file
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">
- <http realm="User Interface">
- <intercept-url pattern="/**" access="ROLE_ANONYMOUS" />
+ <http realm="User Interface" >
+ <intercept-url pattern="/**" access="ROLE_USER" />
<http-basic />
</http>
- <authentication-provider>
- <user-service>
- <user name="test" password="test" authorities="ROLE_USER" />
- <user name="demo" password="demo" authorities="ROLE_USER" />
- </user-service>
- </authentication-provider>
</beans:beans>