Repository: incubator-sentry Updated Branches: refs/heads/master 5a827f6db -> 95b1e40e7
http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java ---------------------------------------------------------------------- diff --git a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java index 1b83c0d..3a648a5 100644 --- a/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java +++ b/sentry-provider/sentry-provider-file/src/main/java/org/apache/sentry/provider/file/SimpleFileProviderBackend.java @@ -16,10 +16,6 @@ */ package org.apache.sentry.provider.file; -import static org.apache.sentry.provider.common.PolicyFileConstants.DATABASES; -import static org.apache.sentry.provider.common.PolicyFileConstants.GROUPS; -import static org.apache.sentry.provider.common.PolicyFileConstants.ROLES; -import static org.apache.sentry.provider.common.PolicyFileConstants.USERS; import static org.apache.sentry.provider.common.ProviderConstants.ROLE_SPLITTER; import java.io.IOException; @@ -40,6 +36,7 @@ import org.apache.sentry.core.common.SentryConfigurationException; import org.apache.sentry.policy.common.PrivilegeUtils; import org.apache.sentry.policy.common.PrivilegeValidator; import org.apache.sentry.policy.common.PrivilegeValidatorContext; +import org.apache.sentry.provider.common.PolicyFileConstants; import org.apache.sentry.provider.common.ProviderBackend; import org.apache.sentry.provider.common.ProviderBackendContext; import org.apache.shiro.config.Ini; @@ -193,7 +190,7 @@ public class SimpleFileProviderBackend implements ProviderBackend { } List<String> localConfigErrors = Lists.newArrayList(configErrors); List<String> localConfigWarnings = Lists.newArrayList(configWarnings); - if ((strictValidation && !localConfigWarnings.isEmpty()) || !localConfigErrors.isEmpty()) { + if (strictValidation && !localConfigWarnings.isEmpty() || !localConfigErrors.isEmpty()) { localConfigErrors.add("Failed to process global policy file " + resourcePath); SentryConfigurationException e = new SentryConfigurationException(""); e.setConfigErrors(localConfigErrors); @@ -235,9 +232,9 @@ public class SimpleFileProviderBackend implements ProviderBackend { parseIni(null, ini, validators, resourcePath, groupRolePrivilegeTableTemp); mergeResult(groupRolePrivilegeTableTemp); groupRolePrivilegeTableTemp.clear(); - Ini.Section filesSection = ini.getSection(DATABASES); + Ini.Section filesSection = ini.getSection(PolicyFileConstants.DATABASES); if(filesSection == null) { - LOGGER.info("Section " + DATABASES + " needs no further processing"); + LOGGER.info("Section " + PolicyFileConstants.DATABASES + " needs no further processing"); } else if (!allowPerDatabaseSection) { String msg = "Per-db policy file is not expected in this configuration."; throw new SentryConfigurationException(msg); @@ -251,14 +248,14 @@ public class SimpleFileProviderBackend implements ProviderBackend { try { LOGGER.debug("Parsing " + perDbPolicy); Ini perDbIni = PolicyFiles.loadFromPath(perDbPolicy.getFileSystem(conf), perDbPolicy); - if(perDbIni.containsKey(USERS)) { - configErrors.add("Per-db policy file cannot contain " + USERS + " section in " + perDbPolicy); - throw new SentryConfigurationException("Per-db policy files cannot contain " + USERS + " section"); + if(perDbIni.containsKey(PolicyFileConstants.USERS)) { + configErrors.add("Per-db policy file cannot contain " + PolicyFileConstants.USERS + " section in " + perDbPolicy); + throw new SentryConfigurationException("Per-db policy files cannot contain " + PolicyFileConstants.USERS + " section"); } - if(perDbIni.containsKey(DATABASES)) { - configErrors.add("Per-db policy files cannot contain " + DATABASES + if(perDbIni.containsKey(PolicyFileConstants.DATABASES)) { + configErrors.add("Per-db policy files cannot contain " + PolicyFileConstants.DATABASES + " section in " + perDbPolicy); - throw new SentryConfigurationException("Per-db policy files cannot contain " + DATABASES + " section"); + throw new SentryConfigurationException("Per-db policy files cannot contain " + PolicyFileConstants.DATABASES + " section"); } parseIni(database, perDbIni, validators, perDbPolicy, groupRolePrivilegeTableTemp); } catch (Exception e) { @@ -301,17 +298,17 @@ public class SimpleFileProviderBackend implements ProviderBackend { private void parseIni(String database, Ini ini, List<? extends PrivilegeValidator> validators, Path policyPath, Table<String, String, Set<String>> groupRolePrivilegeTable) { - Ini.Section privilegesSection = ini.getSection(ROLES); + Ini.Section privilegesSection = ini.getSection(PolicyFileConstants.ROLES); boolean invalidConfiguration = false; if (privilegesSection == null) { - String errMsg = String.format("Section %s empty for %s", ROLES, policyPath); + String errMsg = String.format("Section %s empty for %s", PolicyFileConstants.ROLES, policyPath); LOGGER.warn(errMsg); configErrors.add(errMsg); invalidConfiguration = true; } - Ini.Section groupsSection = ini.getSection(GROUPS); + Ini.Section groupsSection = ini.getSection(PolicyFileConstants.GROUPS); if (groupsSection == null) { - String warnMsg = String.format("Section %s empty for %s", GROUPS, policyPath); + String warnMsg = String.format("Section %s empty for %s", PolicyFileConstants.GROUPS, policyPath); LOGGER.warn(warnMsg); configErrors.add(warnMsg); invalidConfiguration = true; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/RollingFileWithoutDeleteAppender.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/RollingFileWithoutDeleteAppender.java b/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/RollingFileWithoutDeleteAppender.java index ec26ef3..f749740 100644 --- a/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/RollingFileWithoutDeleteAppender.java +++ b/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/RollingFileWithoutDeleteAppender.java @@ -22,7 +22,6 @@ import java.io.File; import java.io.IOException; import java.io.InterruptedIOException; import java.io.Writer; -import java.nio.file.Files; import org.apache.log4j.FileAppender; import org.apache.log4j.Layout; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SecureRequestHandlerUtil.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SecureRequestHandlerUtil.java b/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SecureRequestHandlerUtil.java index 1f46835..be9642b 100644 --- a/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SecureRequestHandlerUtil.java +++ b/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SecureRequestHandlerUtil.java @@ -20,7 +20,6 @@ import java.util.EnumSet; import java.util.Set; import org.apache.sentry.core.model.search.SearchModelAction; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.response.SolrQueryResponse; /** * Utility functions for Secure (sentry-aware) versions of RequestHandlers http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SentryIndexAuthorizationSingleton.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SentryIndexAuthorizationSingleton.java b/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SentryIndexAuthorizationSingleton.java index 185884b..c9d2414 100644 --- a/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SentryIndexAuthorizationSingleton.java +++ b/sentry-solr/solr-sentry-core/src/main/java/org/apache/solr/sentry/SentryIndexAuthorizationSingleton.java @@ -134,7 +134,7 @@ public class SentryIndexAuthorizationSingleton { try { ipAddress = sreq.getRemoteAddr(); } catch (AssertionError e) { - ; // ignore + // ignore // This is a work-around for "Unexpected method call getRemoteAddr()" // exception during unit test mocking at // com.sun.proxy.$Proxy28.getRemoteAddr(Unknown Source) @@ -212,7 +212,7 @@ public class SentryIndexAuthorizationSingleton { throw new SolrException(SolrException.ErrorCode.UNAUTHORIZED, builder.toString()); } - String superUser = (System.getProperty("solr.authorization.superuser", "solr")); + String superUser = System.getProperty("solr.authorization.superuser", "solr"); // If a local request, treat it like a super user request; i.e. it is equivalent to an // http request from the same process. return req instanceof LocalSolrQueryRequest? http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureAdminHandlers.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureAdminHandlers.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureAdminHandlers.java index 6192dff..98354e5 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureAdminHandlers.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureAdminHandlers.java @@ -17,14 +17,11 @@ package org.apache.solr.handler.admin; import java.io.IOException; -import java.util.EnumSet; import java.util.Map; import org.apache.solr.common.SolrException; import org.apache.solr.core.CoreContainer; import org.apache.solr.core.SolrCore; -import org.apache.sentry.core.model.search.SearchModelAction; -import org.apache.solr.handler.RequestHandlerBase; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.response.SolrQueryResponse; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureCollectionsHandler.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureCollectionsHandler.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureCollectionsHandler.java index dc96698..7490ad0 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureCollectionsHandler.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureCollectionsHandler.java @@ -17,11 +17,9 @@ package org.apache.solr.handler.admin; * limitations under the License. */ -import java.util.EnumSet; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.params.CollectionParams.CollectionAction; import org.apache.solr.common.params.CoreAdminParams; -import org.apache.sentry.core.model.search.SearchModelAction; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.sentry.SecureRequestHandlerUtil; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureInfoHandler.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureInfoHandler.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureInfoHandler.java index 90b898b..628d1d7 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureInfoHandler.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/admin/SecureInfoHandler.java @@ -17,9 +17,6 @@ package org.apache.solr.handler.admin; * limitations under the License. */ -import java.util.EnumSet; -import org.apache.sentry.core.model.search.SearchModelAction; -import org.apache.solr.handler.RequestHandlerBase; import org.apache.solr.core.CoreContainer; /** http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryDocAuthorizationComponent.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryDocAuthorizationComponent.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryDocAuthorizationComponent.java index 371787d..666c088 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryDocAuthorizationComponent.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryDocAuthorizationComponent.java @@ -24,13 +24,9 @@ import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.SolrParams; import org.apache.solr.common.util.NamedList; import org.apache.solr.sentry.SentryIndexAuthorizationSingleton; -import org.apache.solr.request.LocalSolrQueryRequest; import com.google.common.annotations.VisibleForTesting; import java.io.IOException; -import java.util.EnumSet; -import java.util.Iterator; import java.util.Set; -import java.net.URLEncoder; public class QueryDocAuthorizationComponent extends SearchComponent { @@ -75,10 +71,12 @@ public class QueryDocAuthorizationComponent extends SearchComponent @Override public void prepare(ResponseBuilder rb) throws IOException { - if (!enabled) return; + if (!enabled) { + return; + } String userName = sentryInstance.getUserName(rb.req); - String superUser = (System.getProperty("solr.authorization.superuser", "solr")); + String superUser = System.getProperty("solr.authorization.superuser", "solr"); if (superUser.equals(userName)) { return; } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryIndexAuthorizationComponent.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryIndexAuthorizationComponent.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryIndexAuthorizationComponent.java index 8f68f40..5fbb743 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryIndexAuthorizationComponent.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/handler/component/QueryIndexAuthorizationComponent.java @@ -20,8 +20,6 @@ package org.apache.solr.handler.component; import org.apache.solr.common.util.StrUtils; import org.apache.solr.sentry.SentryIndexAuthorizationSingleton; import org.apache.sentry.core.model.search.SearchModelAction; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import com.google.common.annotations.VisibleForTesting; import java.io.IOException; import java.util.EnumSet; @@ -30,8 +28,6 @@ import java.util.List; public class QueryIndexAuthorizationComponent extends SearchComponent { private static final String OPERATION_NAME = "query"; - private static Logger log = - LoggerFactory.getLogger(QueryIndexAuthorizationComponent.class); private SentryIndexAuthorizationSingleton sentryInstance; public QueryIndexAuthorizationComponent() { http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessor.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessor.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessor.java index 5e60645..d995a7d 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessor.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessor.java @@ -39,13 +39,13 @@ public class UpdateIndexAuthorizationProcessor extends UpdateRequestProcessor { private SentryIndexAuthorizationSingleton sentryInstance; public UpdateIndexAuthorizationProcessor(SolrQueryRequest req, - SolrQueryResponse rsp, UpdateRequestProcessor next) { - this(SentryIndexAuthorizationSingleton.getInstance(), req, rsp, next); + SolrQueryResponse rsp, UpdateRequestProcessor next) { //NOPMD + this(SentryIndexAuthorizationSingleton.getInstance(), req, next); } @VisibleForTesting public UpdateIndexAuthorizationProcessor(SentryIndexAuthorizationSingleton sentryInstance, - SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) { + SolrQueryRequest req, UpdateRequestProcessor next) { super(next); this.sentryInstance = sentryInstance; this.req = req; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorFactory.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorFactory.java b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorFactory.java index 945dbc4..07f7f28 100644 --- a/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorFactory.java +++ b/sentry-solr/solr-sentry-handlers/src/main/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorFactory.java @@ -20,7 +20,6 @@ package org.apache.solr.update.processor; import org.apache.solr.common.util.NamedList; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.response.SolrQueryResponse; -import org.apache.solr.update.processor.UpdateRequestProcessorFactory; /** * Factory for Sentry's index-level update authorization. http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/TestSecureReplicationHandler.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/TestSecureReplicationHandler.java b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/TestSecureReplicationHandler.java index 9387677..6367814 100644 --- a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/TestSecureReplicationHandler.java +++ b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/TestSecureReplicationHandler.java @@ -18,7 +18,6 @@ package org.apache.solr.handler; import org.apache.solr.cloud.CloudDescriptor; import org.apache.solr.core.SolrCore; -import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.request.SolrRequestHandler; import org.apache.solr.sentry.SentryTestBase; import org.apache.solr.sentry.SentrySingletonTestInstance; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureAdminHandlersTest.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureAdminHandlersTest.java b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureAdminHandlersTest.java index 3cb2597..aea44f7 100644 --- a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureAdminHandlersTest.java +++ b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureAdminHandlersTest.java @@ -31,8 +31,6 @@ import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class SecureAdminHandlersTest extends SentryTestBase { @@ -146,10 +144,6 @@ public class SecureAdminHandlersTest extends SentryTestBase { verifyQueryAccess("/admin/luke", true); } - private void verifySystem() throws Exception { - verifyQueryAccess("/admin/system", true); - } - private void verifyMBeans() throws Exception { verifyQueryAccess("/admin/mbeans", true); } http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureCoreAdminHandlerTest.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureCoreAdminHandlerTest.java b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureCoreAdminHandlerTest.java index 2a19902..a145bc5 100644 --- a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureCoreAdminHandlerTest.java +++ b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureCoreAdminHandlerTest.java @@ -27,7 +27,6 @@ import net.sf.cglib.proxy.MethodProxy; import org.apache.solr.cloud.CloudDescriptor; import org.apache.solr.common.params.CoreAdminParams; -import org.apache.solr.common.params.CoreAdminParams.CoreAdminAction; import org.apache.solr.common.params.ModifiableSolrParams; import org.apache.solr.common.params.CoreAdminParams.CoreAdminAction; import org.apache.solr.core.CoreContainer; @@ -35,7 +34,6 @@ import org.apache.solr.core.SolrCore; import org.apache.solr.request.SolrQueryRequest; import org.apache.solr.sentry.SentryTestBase; import org.apache.solr.sentry.SentrySingletonTestInstance; -import org.eclipse.jetty.util.log.Log; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureInfoHandlerTest.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureInfoHandlerTest.java b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureInfoHandlerTest.java index 7221fa0..54784f4 100644 --- a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureInfoHandlerTest.java +++ b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/handler/admin/SecureInfoHandlerTest.java @@ -17,15 +17,11 @@ package org.apache.solr.handler.admin; import org.apache.solr.cloud.CloudDescriptor; -import org.apache.solr.common.SolrException; import org.apache.solr.core.SolrCore; -import org.apache.solr.handler.RequestHandlerBase; import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.response.SolrQueryResponse; import org.apache.solr.sentry.SentryTestBase; import org.apache.solr.sentry.SentrySingletonTestInstance; import org.junit.AfterClass; -import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; http://git-wip-us.apache.org/repos/asf/incubator-sentry/blob/95b1e40e/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorTest.java ---------------------------------------------------------------------- diff --git a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorTest.java b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorTest.java index 8feb5a7..630ca7c 100644 --- a/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorTest.java +++ b/sentry-solr/solr-sentry-handlers/src/test/java/org/apache/solr/update/processor/UpdateIndexAuthorizationProcessorTest.java @@ -135,7 +135,7 @@ public class UpdateIndexAuthorizationProcessorTest extends SentryTestBase { SolrQueryRequest request = getRequest(); prepareCollAndUser(core, request, collection, user); return new UpdateIndexAuthorizationProcessor( - SentrySingletonTestInstance.getInstance().getSentryInstance(), request, null, null); + SentrySingletonTestInstance.getInstance().getSentryInstance(), request, null); } /**