Repository: incubator-ranger Updated Branches: refs/heads/master 148eb5e64 -> d2a0f1132
RANGER-1164 - Remove PMD "unused" restrictions - Reviewed by Vel. Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/d2a0f113 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/d2a0f113 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/d2a0f113 Branch: refs/heads/master Commit: d2a0f113223603a5a4e19cf741fc3fc1c8c52170 Parents: 148eb5e Author: Colm O hEigeartaigh <cohei...@apache.org> Authored: Wed Oct 19 15:23:02 2016 +0100 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Wed Oct 19 15:23:02 2016 +0100 ---------------------------------------------------------------------- .../audit/destination/HDFSAuditDestination.java | 7 +- .../ranger/audit/provider/DbAuditProvider.java | 3 - .../admin/client/datatype/GrantRevokeData.java | 9 -- .../RangerFileBasedGeolocationProvider.java | 5 - .../contextenricher/RangerTagRetriever.java | 3 - .../ranger/plugin/geo/GeolocationMetadata.java | 12 +- .../RangerResourceAccessCacheImpl.java | 8 +- dev-support/ranger-pmd-ruleset.xml | 5 +- .../ranger/services/hdfs/client/HdfsClient.java | 2 - .../services/hive/client/HiveResourceMgr.java | 1 - .../kafka/client/ServiceKafkaConnectionMgr.java | 4 - .../solr/client/ServiceSolrConnectionMgr.java | 3 - .../services/yarn/client/YarnConnectionMgr.java | 5 - .../atlas/authorizer/RangerAtlasAuthorizer.java | 3 - .../hbase/RangerAuthorizationCoprocessor.java | 2 - .../hadoop/RangerHdfsAuthorizer.java | 1 - .../authorizer/RangerHiveAuthorizerFactory.java | 4 +- .../kafka/authorizer/RangerKafkaAuthorizer.java | 1 - .../storm/authorizer/RangerStormAuthorizer.java | 1 - .../yarn/authorizer/RangerYarnAuthorizer.java | 3 +- .../org/apache/ranger/common/SearchField.java | 14 +- .../org/apache/ranger/common/ServiceUtil.java | 4 - .../java/org/apache/ranger/rest/AssetREST.java | 4 - .../apache/ranger/service/XAgentService.java | 133 ------------------- .../apache/ranger/service/XTrxLogService.java | 76 ----------- .../ranger/ldapconfigcheck/LdapConfig.java | 4 - .../poc/RangerUpdateUserGroupMapping.java | 75 ----------- .../process/PolicyMgrUserGroupBuilder.java | 2 - .../unix/jaas/RemoteUnixLoginModule.java | 6 - 29 files changed, 22 insertions(+), 378 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java ---------------------------------------------------------------------- diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java b/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java index 290a6e6..7c37cfa 100644 --- a/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java +++ b/agents-audit/src/main/java/org/apache/ranger/audit/destination/HDFSAuditDestination.java @@ -62,9 +62,7 @@ public class HDFSAuditDestination extends AuditDestination { private String logFolder; - PrintWriter logWriter = null; - - private Date fileCreateTime = null; + private PrintWriter logWriter = null; private String currentFileName; @@ -72,7 +70,7 @@ public class HDFSAuditDestination extends AuditDestination { private RollingTimeUtil rollingTimeUtil = null; - private Date nextRollOverTime = null; + private Date nextRollOverTime = null; private boolean rollOverByDuration = false; @@ -280,7 +278,6 @@ public class HDFSAuditDestination extends AuditDestination { logger.info("Creating new log file. hdfPath=" + fullPath); FSDataOutputStream ostream = fileSystem.create(hdfPath); logWriter = new PrintWriter(ostream); - fileCreateTime = new Date(); currentFileName = fullPath; } return logWriter; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-audit/src/main/java/org/apache/ranger/audit/provider/DbAuditProvider.java ---------------------------------------------------------------------- diff --git a/agents-audit/src/main/java/org/apache/ranger/audit/provider/DbAuditProvider.java b/agents-audit/src/main/java/org/apache/ranger/audit/provider/DbAuditProvider.java index 0987688..1490c27 100644 --- a/agents-audit/src/main/java/org/apache/ranger/audit/provider/DbAuditProvider.java +++ b/agents-audit/src/main/java/org/apache/ranger/audit/provider/DbAuditProvider.java @@ -62,7 +62,6 @@ public class DbAuditProvider extends AuditDestination { private int mCommitBatchSize = 1; private int mDbRetryMinIntervalMs = 60 * 1000; - private long mLastCommitTime = System.currentTimeMillis(); private ArrayList<AuditEventBase> mUncommitted = new ArrayList<AuditEventBase>(); private Map<String, String> mDbProperties = null; private long mLastDbFailedTime = 0; @@ -305,8 +304,6 @@ public class DbAuditProvider extends AuditDestination { cleanUp(); // so that next insert will try to init() } finally { - mLastCommitTime = System.currentTimeMillis(); - clearEntityManager(); } http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-common/src/main/java/org/apache/ranger/admin/client/datatype/GrantRevokeData.java ---------------------------------------------------------------------- diff --git a/agents-common/src/main/java/org/apache/ranger/admin/client/datatype/GrantRevokeData.java b/agents-common/src/main/java/org/apache/ranger/admin/client/datatype/GrantRevokeData.java index e13a6bb..855758a 100644 --- a/agents-common/src/main/java/org/apache/ranger/admin/client/datatype/GrantRevokeData.java +++ b/agents-common/src/main/java/org/apache/ranger/admin/client/datatype/GrantRevokeData.java @@ -47,9 +47,6 @@ public class GrantRevokeData implements java.io.Serializable { private String tables; private String columns; private String columnFamilies; - private boolean isEnabled; - private boolean isAuditEnabled; - private boolean replacePerm; private List<PermMap> permMapList = new ArrayList<PermMap>(); private static String WILDCARD_ASTERISK = "*"; @@ -135,9 +132,6 @@ public class GrantRevokeData implements java.io.Serializable { this.databases = StringUtil.isEmpty(databases) ? WILDCARD_ASTERISK : databases; this.tables = StringUtil.isEmpty(tables) ? WILDCARD_ASTERISK : tables; this.columns = StringUtil.isEmpty(columns) ? WILDCARD_ASTERISK : columns; - this.isAuditEnabled = true; - this.isEnabled = true; - this.replacePerm = false; this.permMapList.add(permMap); } @@ -153,9 +147,6 @@ public class GrantRevokeData implements java.io.Serializable { this.tables = StringUtil.isEmpty(tables) ? WILDCARD_ASTERISK : tables; this.columns = StringUtil.isEmpty(columns) ? WILDCARD_ASTERISK : columns; this.columnFamilies = StringUtil.isEmpty(columnFamilies) ? WILDCARD_ASTERISK : columnFamilies; - this.isAuditEnabled = true; - this.isEnabled = true; - this.replacePerm = true; this.permMapList.add(permMap); } http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedGeolocationProvider.java ---------------------------------------------------------------------- diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedGeolocationProvider.java b/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedGeolocationProvider.java index ea599c7..e22afe8 100644 --- a/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedGeolocationProvider.java +++ b/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerFileBasedGeolocationProvider.java @@ -19,13 +19,8 @@ package org.apache.ranger.plugin.contextenricher; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - public class RangerFileBasedGeolocationProvider extends RangerAbstractGeolocationProvider { - private static final Log LOG = LogFactory.getLog(RangerFileBasedGeolocationProvider.class); - public static final String GEOLOCATION_SOURCE_LOADER_FILELOADER = "org.apache.ranger.plugin.store.file.GeolocationFileStore"; @Override http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagRetriever.java ---------------------------------------------------------------------- diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagRetriever.java b/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagRetriever.java index b6ab8dd..3ec1754 100644 --- a/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagRetriever.java +++ b/agents-common/src/main/java/org/apache/ranger/plugin/contextenricher/RangerTagRetriever.java @@ -19,15 +19,12 @@ package org.apache.ranger.plugin.contextenricher; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.ranger.plugin.model.RangerServiceDef; import org.apache.ranger.plugin.util.ServiceTags; import java.util.Map; public abstract class RangerTagRetriever { - private static final Log LOG = LogFactory.getLog(RangerTagRetriever.class); protected String serviceName; protected RangerServiceDef serviceDef; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-common/src/main/java/org/apache/ranger/plugin/geo/GeolocationMetadata.java ---------------------------------------------------------------------- diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/geo/GeolocationMetadata.java b/agents-common/src/main/java/org/apache/ranger/plugin/geo/GeolocationMetadata.java index 02f4940..d27a030 100644 --- a/agents-common/src/main/java/org/apache/ranger/plugin/geo/GeolocationMetadata.java +++ b/agents-common/src/main/java/org/apache/ranger/plugin/geo/GeolocationMetadata.java @@ -79,16 +79,6 @@ public class GeolocationMetadata { return sb.toString(); } - private StringBuilder toString(StringBuilder sb) { - sb.append("locationDataItems={"); - - for (int i = 0; i < locationDataItemNames.length; i++) { - sb.append(locationDataItemNames[i]).append(", "); - } - - sb.append("}"); - return sb; - } private StringBuilder toStringDump(StringBuilder sb) { sb.append("FROM_IP,TO_IP,"); @@ -98,4 +88,4 @@ public class GeolocationMetadata { return sb; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerResourceAccessCacheImpl.java ---------------------------------------------------------------------- diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerResourceAccessCacheImpl.java b/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerResourceAccessCacheImpl.java index 074b08d..598d172 100644 --- a/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerResourceAccessCacheImpl.java +++ b/agents-common/src/main/java/org/apache/ranger/plugin/policyevaluator/RangerResourceAccessCacheImpl.java @@ -34,15 +34,13 @@ public class RangerResourceAccessCacheImpl implements RangerResourceAccessCache private static final Log LOG = LogFactory.getLog(RangerResourceAccessCacheImpl.class); public synchronized static RangerResourceAccessCache getInstance(RangerServiceDef serviceDef, RangerPolicy policy) { - return new RangerResourceAccessCacheImpl(serviceDef, policy); + return new RangerResourceAccessCacheImpl(policy); } - private RangerServiceDef serviceDef = null; - private Map<String, String> matchedResourceCache = null; private Map<String, String> notMatchedResourceCache = null; - private RangerResourceAccessCacheImpl(RangerServiceDef serviceDef, RangerPolicy policy) { + private RangerResourceAccessCacheImpl(RangerPolicy policy) { if(LOG.isDebugEnabled()) { LOG.debug("==> RangerResourceAccessCacheImpl.constructor(), policyName:" + policy.getName()); } @@ -50,8 +48,6 @@ public class RangerResourceAccessCacheImpl implements RangerResourceAccessCache int matchedCacheSize = RangerConfiguration.getInstance().getInt("ranger.policyengine.matched.cached.count", 1000); int notMatchedCacheSize = RangerConfiguration.getInstance().getInt("ranger.policyengine.not.matched.cached.count", matchedCacheSize * 10); - this.serviceDef = serviceDef; - matchedResourceCache = new CacheMap<String, String>(matchedCacheSize); notMatchedResourceCache = new CacheMap<String, String>(notMatchedCacheSize); http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/dev-support/ranger-pmd-ruleset.xml ---------------------------------------------------------------------- diff --git a/dev-support/ranger-pmd-ruleset.xml b/dev-support/ranger-pmd-ruleset.xml index d4335a9..f03cda3 100644 --- a/dev-support/ranger-pmd-ruleset.xml +++ b/dev-support/ranger-pmd-ruleset.xml @@ -30,10 +30,7 @@ <exclude name="DoubleCheckedLocking" /> <exclude name="OverrideBothEqualsAndHashcode" /> </rule> - <rule ref="rulesets/java/unusedcode.xml"> - <exclude name="UnusedPrivateField" /> - <exclude name="UnusedPrivateMethod" /> - </rule> + <rule ref="rulesets/java/unusedcode.xml" /> <rule ref="rulesets/java/imports.xml" /> <rule ref="rulesets/java/braces.xml"> <exclude name="ForLoopsMustUseBraces" /> http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/client/HdfsClient.java ---------------------------------------------------------------------- diff --git a/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/client/HdfsClient.java b/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/client/HdfsClient.java index 15c1253..d712b08 100644 --- a/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/client/HdfsClient.java +++ b/hdfs-agent/src/main/java/org/apache/ranger/services/hdfs/client/HdfsClient.java @@ -45,8 +45,6 @@ public class HdfsClient extends BaseClient { private static final Log LOG = LogFactory.getLog(HdfsClient.class); private Configuration conf; - private static List<String> rangerInternalPropertyKeys = Arrays.asList("username", - "password", "keytabfile"); public HdfsClient(String serviceName, Map<String,String> connectionProperties) { super(serviceName,connectionProperties, "hdfs-client"); http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/hive-agent/src/main/java/org/apache/ranger/services/hive/client/HiveResourceMgr.java ---------------------------------------------------------------------- diff --git a/hive-agent/src/main/java/org/apache/ranger/services/hive/client/HiveResourceMgr.java b/hive-agent/src/main/java/org/apache/ranger/services/hive/client/HiveResourceMgr.java index 1a7b987..0a15f70 100644 --- a/hive-agent/src/main/java/org/apache/ranger/services/hive/client/HiveResourceMgr.java +++ b/hive-agent/src/main/java/org/apache/ranger/services/hive/client/HiveResourceMgr.java @@ -35,7 +35,6 @@ public class HiveResourceMgr { private static final String DATABASE = "database"; private static final String TABLE = "table"; - private static final String UDF = "udf"; private static final String COLUMN = "column"; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/plugin-kafka/src/main/java/org/apache/ranger/services/kafka/client/ServiceKafkaConnectionMgr.java ---------------------------------------------------------------------- diff --git a/plugin-kafka/src/main/java/org/apache/ranger/services/kafka/client/ServiceKafkaConnectionMgr.java b/plugin-kafka/src/main/java/org/apache/ranger/services/kafka/client/ServiceKafkaConnectionMgr.java index e2832d8..0056c84 100644 --- a/plugin-kafka/src/main/java/org/apache/ranger/services/kafka/client/ServiceKafkaConnectionMgr.java +++ b/plugin-kafka/src/main/java/org/apache/ranger/services/kafka/client/ServiceKafkaConnectionMgr.java @@ -22,11 +22,7 @@ package org.apache.ranger.services.kafka.client; import java.util.HashMap; import java.util.Map; -import org.apache.log4j.Logger; - public class ServiceKafkaConnectionMgr { - private static final Logger LOG = Logger - .getLogger(ServiceKafkaConnectionMgr.class); static public ServiceKafkaClient getKafkaClient(String serviceName, Map<String, String> configs) throws Exception { http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/plugin-solr/src/main/java/org/apache/ranger/services/solr/client/ServiceSolrConnectionMgr.java ---------------------------------------------------------------------- diff --git a/plugin-solr/src/main/java/org/apache/ranger/services/solr/client/ServiceSolrConnectionMgr.java b/plugin-solr/src/main/java/org/apache/ranger/services/solr/client/ServiceSolrConnectionMgr.java index 2465aaf..81b664c 100644 --- a/plugin-solr/src/main/java/org/apache/ranger/services/solr/client/ServiceSolrConnectionMgr.java +++ b/plugin-solr/src/main/java/org/apache/ranger/services/solr/client/ServiceSolrConnectionMgr.java @@ -22,13 +22,10 @@ package org.apache.ranger.services.solr.client; import java.util.HashMap; import java.util.Map; -import org.apache.log4j.Logger; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClient; public class ServiceSolrConnectionMgr { - private static final Logger LOG = Logger - .getLogger(ServiceSolrConnectionMgr.class); static public ServiceSolrClient getSolrClient(String serviceName, Map<String, String> configs) throws Exception { http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/plugin-yarn/src/main/java/org/apache/ranger/services/yarn/client/YarnConnectionMgr.java ---------------------------------------------------------------------- diff --git a/plugin-yarn/src/main/java/org/apache/ranger/services/yarn/client/YarnConnectionMgr.java b/plugin-yarn/src/main/java/org/apache/ranger/services/yarn/client/YarnConnectionMgr.java index 99cafd2..f480bea 100644 --- a/plugin-yarn/src/main/java/org/apache/ranger/services/yarn/client/YarnConnectionMgr.java +++ b/plugin-yarn/src/main/java/org/apache/ranger/services/yarn/client/YarnConnectionMgr.java @@ -21,13 +21,8 @@ package org.apache.ranger.services.yarn.client; import java.util.Map; -import org.apache.log4j.Logger; - - public class YarnConnectionMgr { - private static final Logger LOG = Logger.getLogger(YarnConnectionMgr.class); - public static YarnClient getYarnClient(String serviceName, Map<String, String> configs) { return new YarnClient(serviceName, configs); } http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-atlas-plugin-shim/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java ---------------------------------------------------------------------- diff --git a/ranger-atlas-plugin-shim/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java b/ranger-atlas-plugin-shim/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java index 407d258..e51749e 100644 --- a/ranger-atlas-plugin-shim/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java +++ b/ranger-atlas-plugin-shim/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java @@ -23,17 +23,14 @@ import org.apache.atlas.authorize.AtlasAccessRequest; import org.apache.atlas.authorize.AtlasAuthorizationException; import org.apache.atlas.authorize.AtlasAuthorizer; import org.apache.ranger.plugin.classloader.RangerPluginClassLoader; -import org.apache.ranger.plugin.service.RangerBasePlugin; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class RangerAtlasAuthorizer implements AtlasAuthorizer { private static final Logger LOG = LoggerFactory.getLogger(RangerAtlasAuthorizer.class); private static boolean isDebugEnabled = LOG.isDebugEnabled(); - private static volatile RangerBasePlugin atlasPlugin = null; private static final String RANGER_PLUGIN_TYPE = "atlas"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-atlas-plugin"}; private static final String RANGER_ATLAS_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.atlas.authorizer.RangerAtlasAuthorizer"; private AtlasAuthorizer rangerAtlasAuthorizerImpl = null; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-hbase-plugin-shim/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java ---------------------------------------------------------------------- diff --git a/ranger-hbase-plugin-shim/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java b/ranger-hbase-plugin-shim/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java index eef355f..7069f58 100644 --- a/ranger-hbase-plugin-shim/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java +++ b/ranger-hbase-plugin-shim/src/main/java/org/apache/ranger/authorization/hbase/RangerAuthorizationCoprocessor.java @@ -106,9 +106,7 @@ public class RangerAuthorizationCoprocessor implements MasterObserver, RegionObs public static final Log LOG = LogFactory.getLog(RangerAuthorizationCoprocessor.class); private static final String RANGER_PLUGIN_TYPE = "hbase"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-hbase-plugin"}; private static final String RANGER_HBASE_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.hbase.RangerAuthorizationCoprocessor"; - private static final String ACCESSCONTROLLISTS_CLASSNAME = "org.apache.hadoop.hbase.security.access.AccessControlLists"; private static RangerPluginClassLoader rangerPluginClassLoader = null; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-hdfs-plugin-shim/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java ---------------------------------------------------------------------- diff --git a/ranger-hdfs-plugin-shim/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java b/ranger-hdfs-plugin-shim/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java index e70285f..1a5efb8 100644 --- a/ranger-hdfs-plugin-shim/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java +++ b/ranger-hdfs-plugin-shim/src/main/java/org/apache/ranger/authorization/hadoop/RangerHdfsAuthorizer.java @@ -30,7 +30,6 @@ public class RangerHdfsAuthorizer extends INodeAttributeProvider { private static final Log LOG = LogFactory.getLog(RangerHdfsAuthorizer.class); private static final String RANGER_PLUGIN_TYPE = "hdfs"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-hdfs-plugin"}; private static final String RANGER_HDFS_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer"; private INodeAttributeProvider rangerHdfsAuthorizerImpl = null; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java ---------------------------------------------------------------------- diff --git a/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java b/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java index f809fbb..87c45cc 100644 --- a/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java +++ b/ranger-hive-plugin-shim/src/main/java/org/apache/ranger/authorization/hive/authorizer/RangerHiveAuthorizerFactory.java @@ -36,7 +36,6 @@ public class RangerHiveAuthorizerFactory implements HiveAuthorizerFactory { private static final Log LOG = LogFactory.getLog(RangerHiveAuthorizerFactory.class); private static final String RANGER_PLUGIN_TYPE = "hive"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-hive-plugin"}; private static final String RANGER_HIVE_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.hive.authorizer.RangerHiveAuthorizerFactory"; private HiveAuthorizerFactory rangerHiveAuthorizerFactoryImpl = null; @@ -122,4 +121,5 @@ public class RangerHiveAuthorizerFactory implements HiveAuthorizerFactory { } } -} \ No newline at end of file +} + http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-kafka-plugin-shim/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java ---------------------------------------------------------------------- diff --git a/ranger-kafka-plugin-shim/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java b/ranger-kafka-plugin-shim/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java index e0aad96..c16a57e 100644 --- a/ranger-kafka-plugin-shim/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java +++ b/ranger-kafka-plugin-shim/src/main/java/org/apache/ranger/authorization/kafka/authorizer/RangerKafkaAuthorizer.java @@ -38,7 +38,6 @@ public class RangerKafkaAuthorizer implements Authorizer { private static final Logger LOG = Logger.getLogger(RangerKafkaAuthorizer.class); private static final String RANGER_PLUGIN_TYPE = "kafka"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-kafka-plugin"}; private static final String RANGER_KAFKA_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.kafka.authorizer.RangerKafkaAuthorizer"; private Authorizer rangerKakfaAuthorizerImpl = null; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-storm-plugin-shim/src/main/java/org/apache/ranger/authorization/storm/authorizer/RangerStormAuthorizer.java ---------------------------------------------------------------------- diff --git a/ranger-storm-plugin-shim/src/main/java/org/apache/ranger/authorization/storm/authorizer/RangerStormAuthorizer.java b/ranger-storm-plugin-shim/src/main/java/org/apache/ranger/authorization/storm/authorizer/RangerStormAuthorizer.java index d6ef345..a38d99f 100644 --- a/ranger-storm-plugin-shim/src/main/java/org/apache/ranger/authorization/storm/authorizer/RangerStormAuthorizer.java +++ b/ranger-storm-plugin-shim/src/main/java/org/apache/ranger/authorization/storm/authorizer/RangerStormAuthorizer.java @@ -34,7 +34,6 @@ public class RangerStormAuthorizer implements IAuthorizer { private static final Logger LOG = LoggerFactory.getLogger(RangerStormAuthorizer.class); private static final String RANGER_PLUGIN_TYPE = "storm"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-storm-plugin"}; private static final String RANGER_STORM_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.storm.authorizer.RangerStormAuthorizer"; private IAuthorizer rangerStormAuthorizerImpl = null; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ranger-yarn-plugin-shim/src/main/java/org/apache/ranger/authorization/yarn/authorizer/RangerYarnAuthorizer.java ---------------------------------------------------------------------- diff --git a/ranger-yarn-plugin-shim/src/main/java/org/apache/ranger/authorization/yarn/authorizer/RangerYarnAuthorizer.java b/ranger-yarn-plugin-shim/src/main/java/org/apache/ranger/authorization/yarn/authorizer/RangerYarnAuthorizer.java index 2184329..78b5390 100644 --- a/ranger-yarn-plugin-shim/src/main/java/org/apache/ranger/authorization/yarn/authorizer/RangerYarnAuthorizer.java +++ b/ranger-yarn-plugin-shim/src/main/java/org/apache/ranger/authorization/yarn/authorizer/RangerYarnAuthorizer.java @@ -38,7 +38,6 @@ public class RangerYarnAuthorizer extends YarnAuthorizationProvider { private static final Log LOG = LogFactory.getLog(RangerYarnAuthorizer.class); private static final String RANGER_PLUGIN_TYPE = "yarn"; - private static final String[] RANGER_PLUGIN_LIB_DIR = new String[] {"lib/ranger-yarn-plugin"}; private static final String RANGER_YARN_AUTHORIZER_IMPL_CLASSNAME = "org.apache.ranger.authorization.yarn.authorizer.RangerYarnAuthorizer"; private YarnAuthorizationProvider yarnAuthorizationProviderImpl = null; @@ -202,4 +201,4 @@ public class RangerYarnAuthorizer extends YarnAuthorizationProvider { } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/security-admin/src/main/java/org/apache/ranger/common/SearchField.java ---------------------------------------------------------------------- diff --git a/security-admin/src/main/java/org/apache/ranger/common/SearchField.java b/security-admin/src/main/java/org/apache/ranger/common/SearchField.java index 279c1e4..a53a75c 100644 --- a/security-admin/src/main/java/org/apache/ranger/common/SearchField.java +++ b/security-admin/src/main/java/org/apache/ranger/common/SearchField.java @@ -137,6 +137,10 @@ public class SearchField { this.regEx = regEx; } + public String getRegEx() { + return regEx; + } + /** * @param enumName * the enumName to set @@ -145,6 +149,10 @@ public class SearchField { this.enumName = enumName; } + public String getEnumName() { + return enumName; + } + /** * @param maxValue * the maxValue to set @@ -153,6 +161,10 @@ public class SearchField { this.maxValue = maxValue; } + public int getMaxValue() { + return maxValue; + } + /** * @return the joinTables */ @@ -216,4 +228,4 @@ public class SearchField { public void setCustomCondition(String conditions) { customCondition=conditions; } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/security-admin/src/main/java/org/apache/ranger/common/ServiceUtil.java ---------------------------------------------------------------------- diff --git a/security-admin/src/main/java/org/apache/ranger/common/ServiceUtil.java b/security-admin/src/main/java/org/apache/ranger/common/ServiceUtil.java index 9e72f42..84675fc 100644 --- a/security-admin/src/main/java/org/apache/ranger/common/ServiceUtil.java +++ b/security-admin/src/main/java/org/apache/ranger/common/ServiceUtil.java @@ -1519,10 +1519,6 @@ public class ServiceUtil { return matched; } - private boolean matchNames(String target, String source) { - return matchNames(target,source,false); - } - private boolean wildcardMatch(String target, String source) { boolean matched = false; if(target != null && source != null) { http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java ---------------------------------------------------------------------- diff --git a/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java b/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java index 886caa0..3d2997b 100644 --- a/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java +++ b/security-admin/src/main/java/org/apache/ranger/rest/AssetREST.java @@ -62,7 +62,6 @@ import org.apache.ranger.plugin.util.SearchFilter; import org.apache.ranger.plugin.util.ServicePolicies; import org.apache.ranger.security.context.RangerAPIList; import org.apache.ranger.service.XAccessAuditService; -import org.apache.ranger.service.XAgentService; import org.apache.ranger.service.XAssetService; import org.apache.ranger.service.XCredentialStoreService; import org.apache.ranger.service.XPolicyExportAuditService; @@ -115,9 +114,6 @@ public class AssetREST { XCredentialStoreService xCredentialStoreService; @Autowired - XAgentService xAgentService; - - @Autowired RESTErrorUtil restErrorUtil; @Autowired http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/security-admin/src/main/java/org/apache/ranger/service/XAgentService.java ---------------------------------------------------------------------- diff --git a/security-admin/src/main/java/org/apache/ranger/service/XAgentService.java b/security-admin/src/main/java/org/apache/ranger/service/XAgentService.java deleted file mode 100644 index f4f75b6..0000000 --- a/security-admin/src/main/java/org/apache/ranger/service/XAgentService.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - package org.apache.ranger.service; - -import java.util.Date; - -import org.apache.log4j.Logger; -import org.apache.ranger.common.AppConstants; -import org.apache.ranger.common.DateUtil; -import org.apache.ranger.common.PropertiesUtil; -import org.apache.ranger.common.SearchCriteria; -import org.apache.ranger.common.StringUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Scope; -import org.springframework.stereotype.Service; - -@Service -@Scope("singleton") -public class XAgentService { - - @Autowired - StringUtil stringUtil; - - @Autowired - DateUtil dateUtil; - - private static Logger logger = Logger.getLogger(XAgentService.class); - - protected String defaultDBDateFormat="yyyy-MM-dd"; - protected boolean auditSupported = false; - - public XAgentService() { - defaultDBDateFormat = PropertiesUtil.getProperty("ranger.db.defaultDateformat", defaultDBDateFormat); - auditSupported = PropertiesUtil.getBooleanProperty("xa.audit.supported", - false); - } - - private boolean isHDFSLog(String loggerName, int fieldCount) { - boolean ret = false; - if (loggerName != null) { - ret = loggerName.startsWith("org."); - } - else { - ret = (fieldCount == 5); - } - return ret; - } - - private boolean isHiveLog(String loggerName, int fieldCount) { - boolean ret = false; - if (loggerName != null) { - ret = loggerName.startsWith("org.apache.ranger.authorization.hive") || loggerName.startsWith("org.apache.ranger.pdp.hive."); - } - else { - ret = (fieldCount == 11); - } - return ret; - } - - private boolean isHBaseLog(String loggerName, int fieldCount) { - boolean ret = false; - if (loggerName != null) { - ret = loggerName.startsWith("org.apache.ranger.authorization.hbase"); - } - else { - ret = ((fieldCount != 5) && (fieldCount != 11)); - } - return ret; - } - - - // The resource type field in the message has "@" at the start - // remove and then compare - - private int getResourceType(String field) { - field = field.startsWith("@") ? field.substring(1) : field; - - int resourceType = AppConstants.RESOURCE_UNKNOWN; - if (field.equals("db")) { - resourceType = AppConstants.RESOURCE_DB; - } else if (field.equals("table")) { - resourceType = AppConstants.RESOURCE_TABLE; - } else if (field.equals("column")) { - resourceType = AppConstants.RESOURCE_COLUMN; - } - - return resourceType; - } - - private String bulidWhereClause(SearchCriteria searchCriteria) { - StringBuilder whereClause = new StringBuilder(); - Date startDate = (Date) searchCriteria.getParamValue("startDate"); - Date endDate = (Date) searchCriteria.getParamValue("endDate"); - - if (startDate == null) { - startDate = new Date(0); - } - - if (endDate == null) { - endDate = DateUtil.getUTCDate(); - - } - String startDateString = DateUtil.dateToString(startDate, defaultDBDateFormat); - String endDateString = DateUtil.dateToString(endDate, defaultDBDateFormat); - - whereClause.append(" DATE(inserted_date) BETWEEN '" + startDateString - + "' AND '" + endDateString + "'"); - - if (whereClause.length() != 0) { - return "WHERE " + whereClause.toString(); - } - - return ""; - } - -} http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/security-admin/src/main/java/org/apache/ranger/service/XTrxLogService.java ---------------------------------------------------------------------- diff --git a/security-admin/src/main/java/org/apache/ranger/service/XTrxLogService.java b/security-admin/src/main/java/org/apache/ranger/service/XTrxLogService.java index 6f05d36..1c43445 100644 --- a/security-admin/src/main/java/org/apache/ranger/service/XTrxLogService.java +++ b/security-admin/src/main/java/org/apache/ranger/service/XTrxLogService.java @@ -308,82 +308,6 @@ public class XTrxLogService extends XTrxLogServiceBase<XXTrxLog, VXTrxLog> { return count; } - @SuppressWarnings({ "rawtypes", "unchecked" }) - private Predicate buildWhereClause(Predicate predicate, Map<String, Object> paramList, EntityType<XXTrxLog> trxLogEntity, - CriteriaBuilder criteriaBuilder, Root<XXTrxLog> root){ - - for(String key : paramList.keySet()) { - for(SearchField searchField : searchFields){ - - String fieldName = searchField.getFieldName(); - String clientFieldName = searchField.getClientFieldName(); - - Object paramValue = paramList.get(key); - boolean isListValue = false; - - if (paramValue != null && paramValue instanceof Collection) { - isListValue = true; - } - - if(fieldName != null){ - fieldName = fieldName.contains(".") ? fieldName.substring(fieldName.indexOf(".") + 1) : fieldName; - } - - if(key.equalsIgnoreCase(clientFieldName)){ - // build where clause depending upon given parameters - if(searchField.getDataType() == SearchField.DATA_TYPE.STRING) { - // build where clause for String datatypes - SingularAttribute attr = trxLogEntity.getSingularAttribute(fieldName); - if(attr != null){ - Predicate stringPredicate = criteriaBuilder.equal(root.get(attr), paramValue); - predicate = criteriaBuilder.and(predicate, stringPredicate); - } - } else if (searchField.getDataType() == SearchField.DATA_TYPE.INT_LIST || - isListValue && searchField.getDataType() == SearchField.DATA_TYPE.INTEGER) { - // build where clause for integer lists or integers datatypes - Collection<Number> intValueList = null; - if (paramValue != null && (paramValue instanceof Integer || paramValue instanceof Long)) { - intValueList = new ArrayList<Number>(); - intValueList.add((Number) paramValue); - } else { - intValueList = (Collection<Number>) paramValue; - } - for(Number value : intValueList){ - SingularAttribute attr = trxLogEntity.getSingularAttribute(fieldName); - if(attr != null){ - Predicate intPredicate = criteriaBuilder.equal(root.get(attr), value); - predicate = criteriaBuilder.and(predicate, intPredicate); - } - } - } else if (searchField.getDataType() == SearchField.DATA_TYPE.DATE){ - // build where clause for date datatypes - Date fieldValue = (Date) paramList.get(searchField - .getClientFieldName()); - SingularAttribute attr = trxLogEntity.getSingularAttribute(fieldName); - if (fieldValue != null) { - if (searchField.getCustomCondition() == null) { - Predicate datePredicate = criteriaBuilder.equal(root.get(attr), fieldValue); - if (searchField.getSearchType().equals(SearchField.SEARCH_TYPE.LESS_THAN)) { - datePredicate = criteriaBuilder.lessThan(root.get(attr), fieldValue); - } else if (searchField.getSearchType().equals(SearchField.SEARCH_TYPE.LESS_EQUAL_THAN)) { - datePredicate = criteriaBuilder.lessThanOrEqualTo(root.get(attr), fieldValue); - } else if (searchField.getSearchType().equals(SearchField.SEARCH_TYPE.GREATER_THAN)) { - datePredicate = criteriaBuilder.greaterThan(root.get(attr), fieldValue); - } else if (searchField.getSearchType().equals(SearchField.SEARCH_TYPE.GREATER_EQUAL_THAN)) { - datePredicate = criteriaBuilder.greaterThanOrEqualTo(root.get(attr), fieldValue); - } else { - datePredicate = criteriaBuilder.equal(root.get(attr), fieldValue); - } - predicate = criteriaBuilder.and(predicate, datePredicate); - } - } - } - } - } - } - return predicate; - } - private VXTrxLog mapCustomViewToViewObj(VXXTrxLog vXXTrxLog){ VXTrxLog vXTrxLog = new VXTrxLog(); vXTrxLog.setId(vXXTrxLog.getId()); http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/LdapConfig.java ---------------------------------------------------------------------- diff --git a/ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/LdapConfig.java b/ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/LdapConfig.java index 9689f25..b544638 100644 --- a/ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/LdapConfig.java +++ b/ugsync/ldapconfigchecktool/ldapconfigcheck/src/main/java/org/apache/ranger/ldapconfigcheck/LdapConfig.java @@ -38,10 +38,6 @@ public class LdapConfig { private static final String LGSYNC_LDAP_BIND_DN = "ranger.usersync.ldap.binddn"; - private static final String LGSYNC_LDAP_BIND_KEYSTORE = "ranger.usersync.credstore.filename"; - - private static final String LGSYNC_LDAP_BIND_ALIAS = "ranger.usersync.ldap.bindalias"; - private static final String LGSYNC_LDAP_BIND_PASSWORD = "ranger.usersync.ldap.ldapbindpassword"; private static final String LGSYNC_LDAP_AUTHENTICATION_MECHANISM = "ranger.usersync.ldap.authentication.mechanism"; http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java ---------------------------------------------------------------------- diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java deleted file mode 100644 index 2edf683..0000000 --- a/ugsync/src/main/java/org/apache/ranger/unixusersync/poc/RangerUpdateUserGroupMapping.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - package org.apache.ranger.unixusersync.poc; - - -import java.util.ArrayList; -import java.util.HashMap; - - -public class RangerUpdateUserGroupMapping { - - private static ArrayList<HashMap<String, String>> usergroupmapping = null; - - private static ArrayList<HashMap<String, String>> clientusergroupmapping = null; - - private static void compare_and_update(ArrayList<HashMap<String, String>> fromDB, ArrayList<HashMap<String, String>> fromFile ){ - - for(HashMap<String, String> hmap: fromDB) { - String dbuserid = hmap.get("id"); - String dbgroupid = hmap.get("userId"); - if ( !findMatchingUserGroupId(dbuserid,dbgroupid,fromFile)) { - System.out.println(dbuserid + " " + dbgroupid); - } - - } - } - - private static boolean findMatchingUserGroupId(String dbuserid, String dbgroupid,ArrayList<HashMap<String, String>> fromFile) { - - boolean matchFound = false; - - for(HashMap<String, String> fhmap: fromFile) { - String fileuserid = fhmap.get("id"); - String filegroupid = fhmap.get("userId"); - - if ( dbuserid.equals(fileuserid) && dbgroupid.equals(filegroupid) ) { - matchFound = true; - return matchFound; - } - } - return matchFound; - } - - public static void main(String[] args) { - - /* - //get user group mapping from DB - usergroupmapping = RangerUserGroupMapping.buildUserGroupMapping(url); - - //get user group mapping from client system file - clientusergroupmapping = RangerClientUserGroupMapping.buildClientUserGroupMapping(passwdfile); - - compare_and_update(usergroupmapping,clientusergroupmapping); - - */ - } -} - http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java ---------------------------------------------------------------------- diff --git a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java index 098d353..296d94f 100644 --- a/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java +++ b/ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java @@ -80,7 +80,6 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink { private static final String NAME_RULE = "hadoop.security.auth_to_local"; public static final String PM_USER_LIST_URI = "/service/xusers/users/"; // GET - private static final String PM_ADD_USER_URI = "/service/xusers/users/"; // POST private static final String PM_ADD_USER_GROUP_INFO_URI = "/service/xusers/users/userinfo"; // POST public static final String PM_GROUP_LIST_URI = "/service/xusers/groups/"; // GET @@ -88,7 +87,6 @@ public class PolicyMgrUserGroupBuilder implements UserGroupSink { public static final String PM_USER_GROUP_MAP_LIST_URI = "/service/xusers/groupusers/"; // GET - private static final String PM_ADD_USER_GROUP_LINK_URI = "/service/xusers/groupusers/"; // POST private static final String PM_DEL_USER_GROUP_LINK_URI = "/service/xusers/group/${groupName}/user/${userName}"; // DELETE http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/d2a0f113/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java ---------------------------------------------------------------------- diff --git a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java index 4b47ea7..635ad1f 100644 --- a/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java +++ b/unixauthclient/src/main/java/org/apache/ranger/authentication/unix/jaas/RemoteUnixLoginModule.java @@ -53,8 +53,6 @@ import javax.security.auth.spi.LoginModule; public class RemoteUnixLoginModule implements LoginModule { - private static final String REMOTE_UNIX_AUTHENICATION_CONFIG_FILE_PARAM = "configFile"; - private static final String DEBUG_PARAM = "ranger.unixauth.debug"; private static final String REMOTE_LOGIN_HOST_PARAM = "ranger.unixauth.service.hostname"; private static final String REMOTE_LOGIN_AUTH_SERVICE_PORT_PARAM = "ranger.unixauth.service.port"; @@ -528,8 +526,4 @@ public class RemoteUnixLoginModule implements LoginModule { } } - private void logError(String msg) { - System.err.println("RemoteUnixLoginModule: <ERROR> " + msg); - } - }