You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ma...@apache.org on 2015/09/09 05:46:30 UTC
[1/7] incubator-ranger git commit: RANGER-618 : KMS gets slower in
key creation once Database grows
Repository: incubator-ranger
Updated Branches:
refs/heads/tag-policy c18f8bf74 -> 0e47fbf65
RANGER-618 : KMS gets slower in key creation once Database grows
Signed-off-by: Velmurugan Periasamy <ve...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/6784a66e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/6784a66e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/6784a66e
Branch: refs/heads/tag-policy
Commit: 6784a66e2b0e03482e0fca272c3465822811db04
Parents: 13cdf4f
Author: Gautam Borad <gb...@gmail.com>
Authored: Tue Aug 18 16:27:14 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Sun Sep 6 10:02:12 2015 -0400
----------------------------------------------------------------------
.../hadoop/crypto/key/RangerKeyStore.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6784a66e/kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java
----------------------------------------------------------------------
diff --git a/kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java b/kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java
index dc8efde..ff82f53 100644
--- a/kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java
+++ b/kms/src/main/java/org/apache/hadoop/crypto/key/RangerKeyStore.java
@@ -83,6 +83,7 @@ public class RangerKeyStore extends KeyStoreSpi {
}
private Hashtable<String, Object> keyEntries = new Hashtable<String, Object>();
+ private Hashtable<String, Object> deltaEntries = new Hashtable<String, Object>();
RangerKeyStore() {
}
@@ -136,7 +137,7 @@ public class RangerKeyStore extends KeyStoreSpi {
public void addKeyEntry(String alias, Key key, char[] password, String cipher, int bitLength, String description, int version, String attributes)
throws KeyStoreException
{
- synchronized(keyEntries) {
+ synchronized(deltaEntries) {
try {
Class<?> c = null;
@@ -163,7 +164,8 @@ public class RangerKeyStore extends KeyStoreSpi {
entry.description = description;
entry.version = version;
entry.attributes = attributes;
- keyEntries.put(alias.toLowerCase(), entry);
+ deltaEntries.put(alias.toLowerCase(), entry);
+ keyEntries.put(alias.toLowerCase(), entry);
} catch (Exception e) {
logger.error(e.getMessage());
throw new KeyStoreException(e.getMessage());
@@ -177,7 +179,8 @@ public class RangerKeyStore extends KeyStoreSpi {
{
synchronized(keyEntries) {
dbOperationDelete(convertAlias(alias));
- keyEntries.remove(convertAlias(alias));
+ keyEntries.remove(convertAlias(alias));
+ deltaEntries.remove(convertAlias(alias));
}
}
@@ -214,7 +217,7 @@ public class RangerKeyStore extends KeyStoreSpi {
public void engineStore(OutputStream stream, char[] password)
throws IOException, NoSuchAlgorithmException, CertificateException
{
- synchronized(keyEntries) {
+ synchronized(deltaEntries) {
// password is mandatory when storing
if (password == null) {
throw new IllegalArgumentException("Ranger Master Key can't be null");
@@ -223,7 +226,7 @@ public class RangerKeyStore extends KeyStoreSpi {
MessageDigest md = getKeyedMessageDigest(password);
byte digest[] = md.digest();
- for (Enumeration<String> e = keyEntries.keys(); e.hasMoreElements();) {
+ for (Enumeration<String> e = deltaEntries.keys(); e.hasMoreElements();) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(new DigestOutputStream(baos, md));
@@ -231,7 +234,7 @@ public class RangerKeyStore extends KeyStoreSpi {
try{
String alias = e.nextElement();
- Object entry = keyEntries.get(alias);
+ Object entry = deltaEntries.get(alias);
oos = new ObjectOutputStream(dos);
oos.writeObject(((SecretKeyEntry)entry).sealedKey);
@@ -250,6 +253,7 @@ public class RangerKeyStore extends KeyStoreSpi {
}
}
}
+ clearDeltaEntires();
}
}
@@ -537,4 +541,8 @@ public class RangerKeyStore extends KeyStoreSpi {
}
}
+ public void clearDeltaEntires(){
+ deltaEntries.clear();
+ }
+
}
\ No newline at end of file
[6/7] incubator-ranger git commit: RANGER-639 Package commons-lang,
which is a required dependency, as part of storm plugin
Posted by ma...@apache.org.
RANGER-639 Package commons-lang, which is a required dependency, as part of storm plugin
Signed-off-by: sneethiraj <sn...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/b5fca957
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/b5fca957
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/b5fca957
Branch: refs/heads/tag-policy
Commit: b5fca95734a06d794daf88cc08ed16b6794d5ea7
Parents: 034e9de
Author: Alok Lal <al...@apache.org>
Authored: Tue Sep 8 12:31:08 2015 -0700
Committer: sneethiraj <sn...@apache.org>
Committed: Tue Sep 8 16:16:55 2015 -0400
----------------------------------------------------------------------
src/main/assembly/storm-agent.xml | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/b5fca957/src/main/assembly/storm-agent.xml
----------------------------------------------------------------------
diff --git a/src/main/assembly/storm-agent.xml b/src/main/assembly/storm-agent.xml
index aacdb78..22a75a7 100644
--- a/src/main/assembly/storm-agent.xml
+++ b/src/main/assembly/storm-agent.xml
@@ -42,27 +42,28 @@
<include>org.eclipse.persistence:eclipselink</include>
<include>org.eclipse.persistence:javax.persistence</include>
<include>commons-collections:commons-collections</include>
- <include>com.sun.jersey:jersey-bundle</include>
+ <include>com.sun.jersey:jersey-bundle</include>
<include>commons-logging:commons-logging:jar:${commons.logging.version}</include>
<include>com.google.guava:guava:jar:${guava.version}</include>
<include>org.codehaus.jackson:jackson-jaxrs:jar:${codehaus.jackson.version}</include>
<include>org.codehaus.jackson:jackson-core-asl:jar:${codehaus.jackson.storm.version}</include>
<include>org.codehaus.jackson:jackson-mapper-asl:jar:${codehaus.jackson.storm.version}</include>
- <include>org.apache.httpcomponents:httpclient:jar:${httpcomponent.httpclient.version}</include>
- <include>org.apache.httpcomponents:httpcore:jar:${httpcomponent.httpcore.version}</include>
- <include>org.apache.httpcomponents:httpmime:jar:${httpcomponent.httpmime.version}</include>
- <include>org.noggit:noggit:jar:${noggit.version}</include>
- <include>com.google.protobuf:protobuf-java:jar:${protobuf-java.version}</include>
- <include>org.apache.hadoop:hadoop-hdfs:jar:${hadoop.version}</include>
- <include>org.apache.htrace:htrace-core:jar:${htrace-core.version}</include>
- <include>commons-cli:commons-cli:jar:${commons.cli.version}</include>
+ <include>org.apache.httpcomponents:httpclient:jar:${httpcomponent.httpclient.version}</include>
+ <include>org.apache.httpcomponents:httpcore:jar:${httpcomponent.httpcore.version}</include>
+ <include>org.apache.httpcomponents:httpmime:jar:${httpcomponent.httpmime.version}</include>
+ <include>org.noggit:noggit:jar:${noggit.version}</include>
+ <include>com.google.protobuf:protobuf-java:jar:${protobuf-java.version}</include>
+ <include>org.apache.hadoop:hadoop-hdfs:jar:${hadoop.version}</include>
+ <include>org.apache.htrace:htrace-core:jar:${htrace-core.version}</include>
+ <include>commons-cli:commons-cli:jar:${commons.cli.version}</include>
+ <include>commons-lang:commons-lang:jar:${commons.lang.version}</include>
</includes>
</dependencySet>
<dependencySet>
<outputDirectory>/install/lib</outputDirectory>
<unpack>false</unpack>
- <directoryMode>755</directoryMode>
- <fileMode>644</fileMode>
+ <directoryMode>755</directoryMode>
+ <fileMode>644</fileMode>
<includes>
<include>commons-cli:commons-cli</include>
<include>commons-collections:commons-collections</include>
@@ -76,8 +77,8 @@
<include>org.slf4j:slf4j-api:jar:${slf4j-api.version}</include>
<include>org.apache.hadoop:hadoop-common:jar:${hadoop-common.version}</include>
<include>org.apache.hadoop:hadoop-auth:jar:${hadoop-common.version}</include>
- <include>security_plugins.ranger-plugins-cred:ranger-plugins-cred</include>
- <include>org.apache.ranger:credentialbuilder</include>
+ <include>security_plugins.ranger-plugins-cred:ranger-plugins-cred</include>
+ <include>org.apache.ranger:credentialbuilder</include>
</includes>
</dependencySet>
</dependencySets>
[7/7] incubator-ranger git commit: Merge branch 'master' into
tag-policy
Posted by ma...@apache.org.
Merge branch 'master' into tag-policy
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/0e47fbf6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/0e47fbf6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/0e47fbf6
Branch: refs/heads/tag-policy
Commit: 0e47fbf659f94ca8b0ab3d2f3a9ab639d7d7e1fd
Parents: c18f8bf b5fca95
Author: Madhan Neethiraj <ma...@apache.org>
Authored: Tue Sep 8 20:29:41 2015 -0700
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Tue Sep 8 20:29:41 2015 -0700
----------------------------------------------------------------------
agents-common/scripts/enable-agent.sh | 4 +++
.../main/java/org/apache/util/sql/Jisql.java | 1 -
.../hadoop/crypto/key/RangerKeyStore.java | 20 ++++++++++-----
security-admin/scripts/install.properties | 6 ++++-
security-admin/scripts/setup.sh | 8 ++++++
.../handler/RangerAuthenticationProvider.java | 18 +++++++++----
.../resources/conf.dist/ranger-admin-site.xml | 10 ++++++++
.../src/main/webapp/scripts/utils/XAUtils.js | 3 +++
src/main/assembly/storm-agent.xml | 27 ++++++++++----------
.../process/LdapUserGroupBuilder.java | 7 ++---
.../config/UserGroupSyncConfig.java | 14 ++++++++++
unixauthservice/scripts/install.properties | 2 ++
.../templates/installprop2xml.properties | 1 +
.../templates/ranger-ugsync-template.xml | 4 +++
14 files changed, 96 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/0e47fbf6/security-admin/src/main/resources/conf.dist/ranger-admin-site.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/0e47fbf6/security-admin/src/main/webapp/scripts/utils/XAUtils.js
----------------------------------------------------------------------
[5/7] incubator-ranger git commit: RANGER-638 : Ranger admin should
redirect back to login page when login cookies are no longer valid.
Posted by ma...@apache.org.
RANGER-638 : Ranger admin should redirect back to login page when login cookies are no longer valid.
Signed-off-by: Velmurugan Periasamy <ve...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/034e9de4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/034e9de4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/034e9de4
Branch: refs/heads/tag-policy
Commit: 034e9de4b41ba44fb03248bbad08339e9b74c69e
Parents: ab6494e
Author: Gautam Borad <gb...@gmail.com>
Authored: Wed Sep 2 16:59:30 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Mon Sep 7 01:41:43 2015 -0400
----------------------------------------------------------------------
security-admin/src/main/webapp/scripts/utils/XAUtils.js | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/034e9de4/security-admin/src/main/webapp/scripts/utils/XAUtils.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/utils/XAUtils.js b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
index a83b22a..6d84d1c 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAUtils.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
@@ -1012,6 +1012,9 @@ define(function(require) {
var XAGlobals = require('utils/XAGlobals');
var that = this;
var vXPortalUser = SessionMgr.getUserProfile();
+ if(_.isEmpty(vXPortalUser.attributes)){
+ return controller;
+ }
var denyControllerActions = [];
var denyModulesObj = [];
var userModuleNames = _.pluck(vXPortalUser.get('userPermList'),'moduleName');
[4/7] incubator-ranger git commit: RANGER-637 : Make REFERRAL
property in Ranger User sync configurable
Posted by ma...@apache.org.
RANGER-637 : Make REFERRAL property in Ranger User sync configurable
Signed-off-by: Velmurugan Periasamy <ve...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/ab6494ed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/ab6494ed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/ab6494ed
Branch: refs/heads/tag-policy
Commit: ab6494eddccec0e620762d21292b7dff0ea12ae7
Parents: 44246ae
Author: Gautam Borad <gb...@gmail.com>
Authored: Thu Sep 3 03:25:19 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Mon Sep 7 01:28:55 2015 -0400
----------------------------------------------------------------------
jisql/src/main/java/org/apache/util/sql/Jisql.java | 1 -
.../ldapusersync/process/LdapUserGroupBuilder.java | 7 ++++---
.../unixusersync/config/UserGroupSyncConfig.java | 14 ++++++++++++++
unixauthservice/scripts/install.properties | 2 ++
.../scripts/templates/installprop2xml.properties | 1 +
.../scripts/templates/ranger-ugsync-template.xml | 4 ++++
6 files changed, 25 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ab6494ed/jisql/src/main/java/org/apache/util/sql/Jisql.java
----------------------------------------------------------------------
diff --git a/jisql/src/main/java/org/apache/util/sql/Jisql.java b/jisql/src/main/java/org/apache/util/sql/Jisql.java
index 9c74356..cf7563c 100644
--- a/jisql/src/main/java/org/apache/util/sql/Jisql.java
+++ b/jisql/src/main/java/org/apache/util/sql/Jisql.java
@@ -755,7 +755,6 @@ public class Jisql {
+ sqle.getErrorCode());
sqle = sqle.getNextException();
}
- System.out.println("java.library.path:"+System.getProperty("java.library.path"));
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ab6494ed/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
index 93893ef..66c6e28 100644
--- a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
@@ -57,7 +57,7 @@ public class LdapUserGroupBuilder implements UserGroupSource {
private String ldapBindDn;
private String ldapBindPassword;
private String ldapAuthenticationMechanism;
-
+ private String ldapReferral;
private String searchBase;
private String userSearchBase;
@@ -135,7 +135,7 @@ public class LdapUserGroupBuilder implements UserGroupSource {
ldapBindPassword = config.getLdapBindPassword();
//ldapBindPassword = "admin-password";
ldapAuthenticationMechanism = config.getLdapAuthenticationMechanism();
-
+ ldapReferral = config.getContextReferral();
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.sun.jndi.ldap.LdapCtxFactory");
@@ -144,7 +144,7 @@ public class LdapUserGroupBuilder implements UserGroupSource {
env.put(Context.SECURITY_PRINCIPAL, ldapBindDn);
env.put(Context.SECURITY_CREDENTIALS, ldapBindPassword);
env.put(Context.SECURITY_AUTHENTICATION, ldapAuthenticationMechanism);
- env.put(Context.REFERRAL, "follow") ;
+ env.put(Context.REFERRAL, ldapReferral) ;
ldapContext = new InitialLdapContext(env, null);
@@ -235,6 +235,7 @@ public class LdapUserGroupBuilder implements UserGroupSource {
+ ", groupMemberAttributeName: " + groupMemberAttributeName
+ ", groupNameAttribute: " + groupNameAttribute
+ ", groupUserMapSyncEnabled: " + groupUserMapSyncEnabled
+ + ", ldapReferral: " + ldapReferral
);
}
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ab6494ed/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java
index f8b68f2..7240fce 100644
--- a/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java
+++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/config/UserGroupSyncConfig.java
@@ -172,6 +172,8 @@ public class UserGroupSyncConfig {
private static final String DEFAULT_POLICYMGR_PASSWORD = "rangerusersync";
private static final String SYNC_SOURCE = "ranger.usersync.sync.source";
+ private static final String LGSYNC_REFERRAL = "ranger.usersync.ldap.referral";
+ private static final String DEFAULT_LGSYNC_REFERRAL = "ignore";
private Properties prop = new Properties() ;
private static volatile UserGroupSyncConfig me = null ;
@@ -715,4 +717,16 @@ public class UserGroupSyncConfig {
}
return syncSource;
}
+ public String getContextReferral() {
+ String referral="ignore";
+ if(prop!=null && prop.containsKey(LGSYNC_REFERRAL)){
+ referral=prop.getProperty(LGSYNC_REFERRAL);
+ if(referral==null||referral.trim().isEmpty()){
+ referral=DEFAULT_LGSYNC_REFERRAL;
+ }else{
+ referral=referral.trim().toLowerCase();
+ }
+ }
+ return referral;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ab6494ed/unixauthservice/scripts/install.properties
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/install.properties b/unixauthservice/scripts/install.properties
index 5215620..f206d0a 100644
--- a/unixauthservice/scripts/install.properties
+++ b/unixauthservice/scripts/install.properties
@@ -169,3 +169,5 @@ SYNC_PAGED_RESULTS_ENABLED=
# search results would be returned page by page with the specified number of entries per page
# default value: 500
SYNC_PAGED_RESULTS_SIZE=
+#LDAP context referral could be ignore or follow
+SYNC_LDAP_REFERRAL =ignore
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ab6494ed/unixauthservice/scripts/templates/installprop2xml.properties
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/templates/installprop2xml.properties b/unixauthservice/scripts/templates/installprop2xml.properties
index f102b52..77b8eac 100644
--- a/unixauthservice/scripts/templates/installprop2xml.properties
+++ b/unixauthservice/scripts/templates/installprop2xml.properties
@@ -48,3 +48,4 @@ AUTH_SSL_KEYSTORE_PASSWORD = ranger.usersync.keystore.password
AUTH_SSL_TRUSTSTORE_FILE = ranger.usersync.truststore.file
AUTH_SSL_TRUSTSTORE_PASSWORD = ranger.usersync.truststore.password
AUTH_SSL_ENABLED = ranger.usersync.enabled
+SYNC_LDAP_REFERRAL = ranger.usersync.ldap.referral
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ab6494ed/unixauthservice/scripts/templates/ranger-ugsync-template.xml
----------------------------------------------------------------------
diff --git a/unixauthservice/scripts/templates/ranger-ugsync-template.xml b/unixauthservice/scripts/templates/ranger-ugsync-template.xml
index 268deb3..2bf5562 100644
--- a/unixauthservice/scripts/templates/ranger-ugsync-template.xml
+++ b/unixauthservice/scripts/templates/ranger-ugsync-template.xml
@@ -181,4 +181,8 @@
<name>ranger.usersync.sync.source</name>
<value></value>
</property>
+ <property>
+ <name>ranger.usersync.ldap.referral</name>
+ <value></value>
+ </property>
</configuration>
[3/7] incubator-ranger git commit: RANGER-628 : Make filters for
ranger-admin search binds configurable
Posted by ma...@apache.org.
RANGER-628 : Make filters for ranger-admin search binds configurable
Signed-off-by: Velmurugan Periasamy <ve...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/44246aec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/44246aec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/44246aec
Branch: refs/heads/tag-policy
Commit: 44246aec4388525e14f0730aa231521fe2f7d637
Parents: c4b9499
Author: Gautam Borad <gb...@gmail.com>
Authored: Mon Aug 31 15:34:09 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Sun Sep 6 23:24:16 2015 -0400
----------------------------------------------------------------------
security-admin/scripts/install.properties | 6 +++++-
security-admin/scripts/setup.sh | 8 ++++++++
.../handler/RangerAuthenticationProvider.java | 18 +++++++++++++-----
.../resources/conf.dist/ranger-admin-site.xml | 10 ++++++++++
4 files changed, 36 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/44246aec/security-admin/scripts/install.properties
----------------------------------------------------------------------
diff --git a/security-admin/scripts/install.properties b/security-admin/scripts/install.properties
index 4618ee3..eb0c7ec 100644
--- a/security-admin/scripts/install.properties
+++ b/security-admin/scripts/install.properties
@@ -47,7 +47,7 @@ SQL_CONNECTOR_JAR=/usr/share/java/mysql-connector-java.jar
# DB password for the DB admin user-id
# **************************************************************************
# ** If the password is left empty or not-defined here,
-# ** it will be prompted to enter the password during installation process
+# ** it will try with blank password during installation process
# **************************************************************************
#
#db_root_user=root|SYS|postgres|sa|dba
@@ -138,6 +138,7 @@ authServicePort=5151
#xa_ldap_bind_dn="cn=admin,ou=users,dc=xasecure,dc=net"
#xa_ldap_bind_password=
#xa_ldap_referral=follow|ignore
+#xa_ldap_userSearchFilter="(uid={0})"
xa_ldap_url=
xa_ldap_userDNpattern=
@@ -148,6 +149,7 @@ xa_ldap_base_dn=
xa_ldap_bind_dn=
xa_ldap_bind_password=
xa_ldap_referral=
+xa_ldap_userSearchFilter=
####ACTIVE_DIRECTORY settings - Required only if have selected AD authentication ####
#
# Sample Settings
@@ -158,6 +160,7 @@ xa_ldap_referral=
#xa_ldap_ad_bind_dn="cn=administrator,ou=users,dc=xasecure,dc=net"
#xa_ldap_ad_bind_password=
#xa_ldap_ad_referral=follow|ignore
+#xa_ldap_ad_userSearchFilter="(sAMAccountName={0})"
xa_ldap_ad_domain=
xa_ldap_ad_url=
@@ -165,6 +168,7 @@ xa_ldap_ad_base_dn=
xa_ldap_ad_bind_dn=
xa_ldap_ad_bind_password=
xa_ldap_ad_referral=
+xa_ldap_ad_userSearchFilter=
# -----------------------------------------------------------
#
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/44246aec/security-admin/scripts/setup.sh
----------------------------------------------------------------------
diff --git a/security-admin/scripts/setup.sh b/security-admin/scripts/setup.sh
index e0b14c5..bae6298 100755
--- a/security-admin/scripts/setup.sh
+++ b/security-admin/scripts/setup.sh
@@ -1330,6 +1330,10 @@ do_authentication_setup(){
newPropertyValue="${xa_ldap_referral}"
updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file
+ propertyName=ranger.ldap.user.searchfilter
+ newPropertyValue="${xa_ldap_userSearchFilter}"
+ updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file
+
keystore="${cred_keystore_filename}"
if [ "${keystore}" != "" ]
@@ -1411,6 +1415,10 @@ do_authentication_setup(){
newPropertyValue="${xa_ldap_ad_referral}"
updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file
+ propertyName=ranger.ldap.ad.user.searchfilter
+ newPropertyValue="${xa_ldap_ad_userSearchFilter}"
+ updatePropertyToFilePy $propertyName $newPropertyValue $ldap_file
+
keystore="${cred_keystore_filename}"
if [ "${keystore}" != "" ]
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/44246aec/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java b/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
index 1f1d957..abf4db4 100644
--- a/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
+++ b/security-admin/src/main/java/org/apache/ranger/security/handler/RangerAuthenticationProvider.java
@@ -363,6 +363,7 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
String rangerADBindPassword = PropertiesUtil.getProperty("ranger.ldap.ad.bind.password", "");
String rangerLdapDefaultRole = PropertiesUtil.getProperty("ranger.ldap.default.role", "ROLE_USER");
String rangerLdapReferral = PropertiesUtil.getProperty("ranger.ldap.ad.referral", "follow");
+ String rangerLdapUserSearchFilter = PropertiesUtil.getProperty("ranger.ldap.ad.user.searchfilter", "(sAMAccountName={0})");
String userName = authentication.getName();
String userPassword = "";
if (authentication.getCredentials() != null) {
@@ -378,8 +379,11 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
ldapContextSource.setPooled(true);
ldapContextSource.afterPropertiesSet();
- String searchFilter="(sAMAccountName={0})";
- FilterBasedLdapUserSearch userSearch=new FilterBasedLdapUserSearch(rangerLdapADBase, searchFilter,ldapContextSource);
+ //String searchFilter="(sAMAccountName={0})";
+ if(rangerLdapUserSearchFilter==null||rangerLdapUserSearchFilter.trim().isEmpty()){
+ rangerLdapUserSearchFilter="(sAMAccountName={0})";
+ }
+ FilterBasedLdapUserSearch userSearch=new FilterBasedLdapUserSearch(rangerLdapADBase, rangerLdapUserSearchFilter,ldapContextSource);
userSearch.setSearchSubtree(true);
BindAuthenticator bindAuthenticator = new BindAuthenticator(ldapContextSource);
@@ -417,6 +421,7 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
String rangerLdapBindDN = PropertiesUtil.getProperty("ranger.ldap.bind.dn", "");
String rangerLdapBindPassword = PropertiesUtil.getProperty("ranger.ldap.bind.password", "");
String rangerLdapReferral = PropertiesUtil.getProperty("ranger.ldap.referral", "follow");
+ String rangerLdapUserSearchFilter = PropertiesUtil.getProperty("ranger.ldap.user.searchfilter", "(uid={0})");
String userName = authentication.getName();
String userPassword = "";
if (authentication.getCredentials() != null) {
@@ -428,7 +433,7 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
ldapContextSource.setPassword(rangerLdapBindPassword);
ldapContextSource.setReferral(rangerLdapReferral);
ldapContextSource.setCacheEnvironmentProperties(false);
- ldapContextSource.setAnonymousReadOnly(true);
+ ldapContextSource.setAnonymousReadOnly(false);
ldapContextSource.setPooled(true);
ldapContextSource.afterPropertiesSet();
@@ -437,8 +442,11 @@ public class RangerAuthenticationProvider implements AuthenticationProvider {
defaultLdapAuthoritiesPopulator.setGroupSearchFilter(rangerLdapGroupSearchFilter);
defaultLdapAuthoritiesPopulator.setIgnorePartialResultException(true);
- String searchFilter="(uid={0})";
- FilterBasedLdapUserSearch userSearch=new FilterBasedLdapUserSearch(rangerLdapBase, searchFilter,ldapContextSource);
+ //String searchFilter="(uid={0})";
+ if(rangerLdapUserSearchFilter==null||rangerLdapUserSearchFilter.trim().isEmpty()){
+ rangerLdapUserSearchFilter="(uid={0})";
+ }
+ FilterBasedLdapUserSearch userSearch=new FilterBasedLdapUserSearch(rangerLdapBase, rangerLdapUserSearchFilter,ldapContextSource);
userSearch.setSearchSubtree(true);
BindAuthenticator bindAuthenticator = new BindAuthenticator(ldapContextSource);
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/44246aec/security-admin/src/main/resources/conf.dist/ranger-admin-site.xml
----------------------------------------------------------------------
diff --git a/security-admin/src/main/resources/conf.dist/ranger-admin-site.xml b/security-admin/src/main/resources/conf.dist/ranger-admin-site.xml
index 822a507..6009693 100644
--- a/security-admin/src/main/resources/conf.dist/ranger-admin-site.xml
+++ b/security-admin/src/main/resources/conf.dist/ranger-admin-site.xml
@@ -217,4 +217,14 @@
<value></value>
<description></description>
</property>
+ <property>
+ <name>ranger.ldap.user.searchfilter</name>
+ <value>(uid={0})</value>
+ <description></description>
+ </property>
+ <property>
+ <name>ranger.ldap.ad.user.searchfilter</name>
+ <value>(sAMAccountName={0})</value>
+ <description></description>
+ </property>
</configuration>
[2/7] incubator-ranger git commit: RANGER-623 : Enable plugin scripts
should handle file permissions for certain umask value
Posted by ma...@apache.org.
RANGER-623 : Enable plugin scripts should handle file permissions for certain umask value
Signed-off-by: Velmurugan Periasamy <ve...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/c4b9499a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/c4b9499a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/c4b9499a
Branch: refs/heads/tag-policy
Commit: c4b9499a95791ef20725d6724e54cfaeb665889b
Parents: 6784a66
Author: Gautam Borad <gb...@gmail.com>
Authored: Tue Aug 25 09:56:37 2015 +0530
Committer: Velmurugan Periasamy <ve...@apache.org>
Committed: Sun Sep 6 22:21:11 2015 -0400
----------------------------------------------------------------------
agents-common/scripts/enable-agent.sh | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/c4b9499a/agents-common/scripts/enable-agent.sh
----------------------------------------------------------------------
diff --git a/agents-common/scripts/enable-agent.sh b/agents-common/scripts/enable-agent.sh
index 9f67709..55130a5 100755
--- a/agents-common/scripts/enable-agent.sh
+++ b/agents-common/scripts/enable-agent.sh
@@ -454,6 +454,10 @@ then
fi
fi
done
+ if [ "${HCOMPONENT_NAME}" = "hbase" ] || [ "${HCOMPONENT_NAME}" = "storm" ];
+ then
+ chmod 644 ${HCOMPONENT_CONF_DIR}/*
+ fi
fi
#