From d381a5ac264a5ef628ec78a0d91f128f9e58475d Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Tue, 20 May 2014 12:45:37 +0200 Subject: [PATCH 1/3] =?UTF-8?q?P=C5=99ihla=C5=A1ov=C3=A1n=C3=AD=20proti=20?= =?UTF-8?q?LDAP=20serveru-=20integrace=20s=20Active=20Directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 29 +++++++ .../info/bukova/isspst/DbInitListener.java | 13 +-- .../java/info/bukova/isspst/data/User.java | 3 + .../bukova/isspst/security/AuthPopulator.java | 76 ++++++++++++++++++ .../IsspstPermissionEvaluator.java | 4 +- .../{ => security}/LoginFailHandler.java | 2 +- .../isspst/services/AbstractOwnedService.java | 3 +- .../isspst/services/users/UserService.java | 2 + .../services/users/UserServiceImpl.java | 24 +++++- .../info/bukova/isspst/ui/ListViewModel.java | 2 +- src/main/resources/users.ldif | 71 ++++++++++++++++ src/main/webapp/WEB-INF/ldap.properties | 2 + .../webapp/WEB-INF/spring/database-auth.xml | 17 ++++ src/main/webapp/WEB-INF/spring/ldap-auth.xml | 46 +++++++++++ .../webapp/WEB-INF/spring/root-context.xml | 22 ++--- src/main/webapp/app/passwd.zul | 3 +- src/main/webapp/img/passwd.png | Bin 0 -> 2657 bytes 17 files changed, 292 insertions(+), 27 deletions(-) create mode 100644 src/main/java/info/bukova/isspst/security/AuthPopulator.java rename src/main/java/info/bukova/isspst/{ => security}/IsspstPermissionEvaluator.java (92%) rename src/main/java/info/bukova/isspst/{ => security}/LoginFailHandler.java (95%) create mode 100644 src/main/resources/users.ldif create mode 100644 src/main/webapp/WEB-INF/ldap.properties create mode 100644 src/main/webapp/WEB-INF/spring/database-auth.xml create mode 100644 src/main/webapp/WEB-INF/spring/ldap-auth.xml create mode 100644 src/main/webapp/img/passwd.png diff --git a/pom.xml b/pom.xml index e5e408c5..262766ee 100644 --- a/pom.xml +++ b/pom.xml @@ -70,6 +70,29 @@ spring-security-config ${org.springframework-version} + + org.springframework.security + spring-security-ldap + ${org.springframework-version} + + + + + + + + + + + + + + + + + + + + + ${ldap.userDNPattern} + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/webapp/WEB-INF/spring/root-context.xml b/src/main/webapp/WEB-INF/spring/root-context.xml index 13f46192..fe183541 100644 --- a/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/src/main/webapp/WEB-INF/spring/root-context.xml @@ -11,7 +11,14 @@ - + + + + /WEB-INF/jdbc.properties + /WEB-INF/ldap.properties + + + - + @@ -65,13 +72,8 @@ - - - - - - - + + @@ -81,7 +83,7 @@ - + diff --git a/src/main/webapp/app/passwd.zul b/src/main/webapp/app/passwd.zul index fbed95d7..d79f4b0a 100644 --- a/src/main/webapp/app/passwd.zul +++ b/src/main/webapp/app/passwd.zul @@ -2,9 +2,10 @@ - +