You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by sn...@apache.org on 2014/10/24 05:31:54 UTC
git commit: ARGUS-130:Added Ability to specify bind user and referral
Repository: incubator-argus
Updated Branches:
refs/heads/master e57ee6c51 -> a6aab65eb
ARGUS-130:Added Ability to specify bind user and referral
Signed-off-by: sneethiraj <sn...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/a6aab65e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/a6aab65e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/a6aab65e
Branch: refs/heads/master
Commit: a6aab65eb85d0b888130e613b73803bf4bc207bc
Parents: e57ee6c
Author: vperiasamy <vp...@hortonworks.com>
Authored: Thu Oct 23 21:32:45 2014 -0400
Committer: sneethiraj <sn...@apache.org>
Committed: Thu Oct 23 23:31:41 2014 -0400
----------------------------------------------------------------------
.../META-INF/contextXML/ldap_bean_settings.xml | 29 +++++++++++++++++++-
.../contextXML/ldap_security_settings.xml | 7 +----
2 files changed, 29 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/a6aab65e/security-admin/src/main/webapp/META-INF/contextXML/ldap_bean_settings.xml
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/META-INF/contextXML/ldap_bean_settings.xml b/security-admin/src/main/webapp/META-INF/contextXML/ldap_bean_settings.xml
index 42d1aae..fd380f1 100644
--- a/security-admin/src/main/webapp/META-INF/contextXML/ldap_bean_settings.xml
+++ b/security-admin/src/main/webapp/META-INF/contextXML/ldap_bean_settings.xml
@@ -1 +1,28 @@
-<security:ldap-server url="${xa_ldap_url}"/>
+ <beans:bean id="ldapContextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
+ <beans:constructor-arg value="${xa_ldap_url}"/>
+ <!-- Set bind user values and uncomment below two lines, if your LDAP settings require this -->
+ <!-- <beans:property name="userDn" value="***"/>
+ <beans:property name="password" value="***"/> -->
+ <!-- Uncomment the below line, if your LDAP settings require referral following -->
+ <!-- <beans:property name="referral" value="follow"/> -->
+ </beans:bean>
+ <beans:bean id="ldapAuthProvider" class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider">
+ <beans:constructor-arg>
+ <beans:bean class="org.springframework.security.ldap.authentication.BindAuthenticator">
+ <beans:constructor-arg ref="ldapContextSource"/>
+ <beans:property name="userDnPatterns">
+ <beans:list>
+ <beans:value>${xa_ldap_userDNpattern}</beans:value>
+ </beans:list>
+ </beans:property>
+ </beans:bean>
+ </beans:constructor-arg>
+ <beans:constructor-arg>
+ <beans:bean class="org.springframework.security.ldap.userdetails.DefaultLdapAuthoritiesPopulator">
+ <beans:constructor-arg ref="ldapContextSource"/>
+ <beans:constructor-arg value="${xa_ldap_groupSearchBase}"/>
+ <beans:property name="groupSearchFilter" value="${xa_ldap_groupSearchFilter}"/>
+ <beans:property name="groupRoleAttribute" value="${xa_ldap_groupRoleAttribute}"/>
+ </beans:bean>
+ </beans:constructor-arg>
+ </beans:bean>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/a6aab65e/security-admin/src/main/webapp/META-INF/contextXML/ldap_security_settings.xml
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/META-INF/contextXML/ldap_security_settings.xml b/security-admin/src/main/webapp/META-INF/contextXML/ldap_security_settings.xml
index 7952d57..54b28d3 100644
--- a/security-admin/src/main/webapp/META-INF/contextXML/ldap_security_settings.xml
+++ b/security-admin/src/main/webapp/META-INF/contextXML/ldap_security_settings.xml
@@ -1,6 +1 @@
- <security:ldap-authentication-provider
- user-dn-pattern="${xa_ldap_userDNpattern}"
- group-search-base="${xa_ldap_groupSearchBase}"
- group-search-filter="${xa_ldap_groupSearchFilter}"
- group-role-attribute="${xa_ldap_groupRoleAttribute}"
- />
+<security:authentication-provider ref="ldapAuthProvider" />
\ No newline at end of file