From: Mathieu Baudier Date: Thu, 8 Dec 2011 23:03:49 +0000 (+0000) Subject: Introduce security manager X-Git-Tag: argeo-commons-2.1.30~1067 X-Git-Url: https://git.argeo.org/?a=commitdiff_plain;h=747287fd2bc5b5ccf007e403947065acdaa5ef19;p=lgpl%2Fargeo-commons.git Introduce security manager git-svn-id: https://svn.argeo.org/commons/trunk@4914 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/security/modules/org.argeo.security.manager/.project b/security/modules/org.argeo.security.manager/.project new file mode 100644 index 000000000..964176d62 --- /dev/null +++ b/security/modules/org.argeo.security.manager/.project @@ -0,0 +1,22 @@ + + + org.argeo.security.auth + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/security/modules/org.argeo.security.manager/META-INF/MANIFEST.MF b/security/modules/org.argeo.security.manager/META-INF/MANIFEST.MF new file mode 100644 index 000000000..8e0713c1d --- /dev/null +++ b/security/modules/org.argeo.security.manager/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Manager +Bundle-SymbolicName: org.argeo.security.auth +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: Argeo +Bundle-RequiredExecutionEnvironment: J2SE-1.5 diff --git a/security/modules/org.argeo.security.manager/META-INF/spring/auth-jcr.xml b/security/modules/org.argeo.security.manager/META-INF/spring/auth-jcr.xml new file mode 100644 index 000000000..c8eff5b1b --- /dev/null +++ b/security/modules/org.argeo.security.manager/META-INF/spring/auth-jcr.xml @@ -0,0 +1,22 @@ + + + + + + + /org/argeo/jcr/argeo.cnd + + + + + + diff --git a/security/modules/org.argeo.security.manager/META-INF/spring/auth-ldap-jcr.xml b/security/modules/org.argeo.security.manager/META-INF/spring/auth-ldap-jcr.xml new file mode 100644 index 000000000..43794f6f8 --- /dev/null +++ b/security/modules/org.argeo.security.manager/META-INF/spring/auth-ldap-jcr.xml @@ -0,0 +1,65 @@ + + + + + + + + + ${argeo.ldap.userClass} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/security/modules/org.argeo.security.manager/META-INF/spring/auth-ldap.xml b/security/modules/org.argeo.security.manager/META-INF/spring/auth-ldap.xml new file mode 100644 index 000000000..a42553f85 --- /dev/null +++ b/security/modules/org.argeo.security.manager/META-INF/spring/auth-ldap.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/security/modules/org.argeo.security.manager/META-INF/spring/auth-osgi.xml b/security/modules/org.argeo.security.manager/META-INF/spring/auth-osgi.xml new file mode 100644 index 000000000..d0bcd6222 --- /dev/null +++ b/security/modules/org.argeo.security.manager/META-INF/spring/auth-osgi.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/security/modules/org.argeo.security.manager/META-INF/spring/auth-services.xml b/security/modules/org.argeo.security.manager/META-INF/spring/auth-services.xml new file mode 100644 index 000000000..158b18fb4 --- /dev/null +++ b/security/modules/org.argeo.security.manager/META-INF/spring/auth-services.xml @@ -0,0 +1,62 @@ + + + + + + + + osgibundle:auth.properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/security/modules/org.argeo.security.manager/auth.properties b/security/modules/org.argeo.security.manager/auth.properties new file mode 100644 index 000000000..b00b5261f --- /dev/null +++ b/security/modules/org.argeo.security.manager/auth.properties @@ -0,0 +1,33 @@ +argeo.node.repo.securityWorkspace=security + +argeo.security.defaultRole=ROLE_USER +argeo.security.rolePrefix=ROLE_ + +argeo.security.systemKey=argeo + +argeo.ldap.rootdn=dc=demo,dc=argeo,dc=org +argeo.ldap.protocol=ldap +argeo.ldap.host=localhost +# default are for Apache Directory Server +argeo.ldap.port=10389 +argeo.ldap.manager.userdn=uid=admin,ou=system +argeo.ldap.manager.password=secret + +# USER +argeo.ldap.userClass=inetOrgPerson +argeo.ldap.osUserClass=posixAccount +argeo.ldap.userBase=ou=People +argeo.ldap.usernameAttribute=uid +argeo.ldap.passwordAttribute=userPassword +# ROLES +argeo.ldap.groupClass=groupOfNames +argeo.ldap.groupBase=ou=Roles +argeo.ldap.groupRoleAttribute=cn +argeo.ldap.groupMemberAttribute=member +# OS GROUPS +argeo.ldap.osGroupClass=posixGroup +argeo.ldap.osGroupBase=ou=Group +argeo.ldap.osGroupNameAttribute=cn +argeo.ldap.osGroupMemberAttribute=memberUid + +argeo.ldap.password.useSalt=false \ No newline at end of file diff --git a/security/modules/org.argeo.security.manager/build.properties b/security/modules/org.argeo.security.manager/build.properties new file mode 100644 index 000000000..5fc538bc8 --- /dev/null +++ b/security/modules/org.argeo.security.manager/build.properties @@ -0,0 +1,4 @@ +source.. = src/main/java/ +output.. = target/classes/ +bin.includes = META-INF/,\ + . diff --git a/security/modules/org.argeo.security.manager/pom.xml b/security/modules/org.argeo.security.manager/pom.xml new file mode 100644 index 000000000..c95067c65 --- /dev/null +++ b/security/modules/org.argeo.security.manager/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + + org.argeo.commons.security + 0.3.4-SNAPSHOT + modules + .. + + org.argeo.security.auth + Commons Security Default Authentication + + + + org.apache.felix + maven-bundle-plugin + + + + *, + org.argeo.jcr, + com.sun.jndi.ldap;resolution:=optional, + org.springframework.ldap.core.support, + org.springframework.security + + + + + + + \ No newline at end of file