Merge branch 'master' into akolb-cli
Project: http://git-wip-us.apache.org/repos/asf/sentry/repo Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/f951f094 Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/f951f094 Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/f951f094 Branch: refs/heads/master Commit: f951f0944b9e4b3ff4422b7c57b50c516a93d132 Parents: cd4c80d 24d8243 Author: Colm O hEigeartaigh <[email protected]> Authored: Thu Nov 16 09:56:29 2017 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Thu Nov 16 09:56:29 2017 +0000 ---------------------------------------------------------------------- pom.xml | 19 +- sentry-binding/sentry-binding-solr/pom.xml | 11 +- .../authz/SentrySolrAuthorizationException.java | 25 - .../solr/authz/SentrySolrPluginImpl.java | 408 ++++++++ .../binding/solr/authz/SolrAuthzBinding.java | 268 ++---- .../binding/solr/authz/SolrAuthzUtil.java | 271 ++++++ .../sentry/binding/solr/conf/SolrAuthzConf.java | 14 +- .../org/apache/solr/sentry/AuditLogger.java | 92 ++ .../RollingFileWithoutDeleteAppender.java | 182 ++++ .../sentry/binding/solr/HdfsTestUtil.java | 50 +- .../binding/solr/TestSolrAuthzBinding.java | 338 ++++--- .../solr/AbstractTestSearchPolicyEngine.java | 129 --- .../solr/AbstractTestSolrPolicyEngine.java | 129 +++ .../policy/solr/SearchPolicyTestUtil.java | 45 - .../sentry/policy/solr/SolrPolicyTestUtil.java | 45 + .../solr/TestCollectionRequiredInRole.java | 64 -- ...SearchAuthorizationProviderGeneralCases.java | 193 ---- ...SearchAuthorizationProviderSpecialCases.java | 84 -- .../solr/TestSearchModelAuthorizables.java | 54 -- .../policy/solr/TestSearchPolicyEngineDFS.java | 74 -- .../solr/TestSearchPolicyEngineLocalFS.java | 43 - .../policy/solr/TestSearchPolicyNegative.java | 101 -- ...stSolrAuthorizationProviderGeneralCases.java | 196 ++++ ...stSolrAuthorizationProviderSpecialCases.java | 84 ++ .../policy/solr/TestSolrModelAuthorizables.java | 54 ++ .../policy/solr/TestSolrPolicyEngineDFS.java | 74 ++ .../solr/TestSolrPolicyEngineLocalFS.java | 43 + .../policy/solr/TestSolrPolicyNegative.java | 101 ++ .../solr/TestCommonPrivilegeForSearch.java | 221 ----- .../solr/TestCommonPrivilegeForSolr.java | 293 ++++++ .../src/test/resources/test-authz-provider.ini | 4 +- sentry-core/pom.xml | 2 +- .../apache/sentry/core/common/utils/PubSub.java | 178 ++++ sentry-core/sentry-core-model-search/pom.xml | 43 - .../sentry/core/model/search/Collection.java | 51 - .../apache/sentry/core/model/search/Field.java | 54 -- .../core/model/search/SearchActionFactory.java | 80 -- .../core/model/search/SearchConstants.java | 35 - .../core/model/search/SearchModelAction.java | 39 - .../model/search/SearchModelAuthorizable.java | 29 - .../model/search/SearchModelAuthorizables.java | 50 - .../core/model/search/SearchPrivilegeModel.java | 60 -- .../AbstractSearchPrivilegeValidator.java | 52 -- .../CollectionRequiredInPrivilege.java | 43 - .../sentry/core/search/TestCollection.java | 50 - .../core/search/TestSearchBitFieldAction.java | 73 -- sentry-core/sentry-core-model-solr/pom.xml | 43 + .../sentry/core/model/solr/AdminOperation.java | 42 + .../sentry/core/model/solr/Collection.java | 29 + .../apache/sentry/core/model/solr/Config.java | 27 + .../apache/sentry/core/model/solr/Field.java | 30 + .../apache/sentry/core/model/solr/Schema.java | 27 + .../core/model/solr/SolrActionFactory.java | 80 ++ .../sentry/core/model/solr/SolrConstants.java | 39 + .../sentry/core/model/solr/SolrModelAction.java | 39 + .../core/model/solr/SolrModelAuthorizable.java | 60 ++ .../core/model/solr/SolrModelAuthorizables.java | 58 ++ .../core/model/solr/SolrPrivilegeModel.java | 66 ++ .../solr/validator/SolrPrivilegeValidator.java | 101 ++ .../apache/sentry/core/solr/TestCollection.java | 49 + .../core/solr/TestSolrBitFieldAction.java | 73 ++ sentry-dist/pom.xml | 14 +- .../apache/sentry/hdfs/ServiceConstants.java | 1 + .../org/apache/sentry/hdfs/SentryPlugin.java | 57 +- .../hdfs/TestSentryHDFSServiceProcessor.java | 46 +- sentry-provider/sentry-provider-db/pom.xml | 15 +- .../generic/SentryGenericProviderBackend.java | 7 + .../persistent/PrivilegeOperatePersistence.java | 4 +- .../tools/GenericPrivilegeConverter.java | 8 +- .../db/generic/tools/SentryConfigToolSolr.java | 4 +- .../db/generic/tools/SentryShellGeneric.java | 16 +- .../tools/command/GenericShellCommand.java | 63 +- .../db/service/persistent/SentryStore.java | 6 + .../db/service/thrift/PubSubServlet.java | 128 +++ .../db/service/thrift/SentryMetrics.java | 6 +- .../thrift/SentryPolicyStoreProcessor.java | 4 +- .../db/service/thrift/SentryWebServer.java | 5 + .../provider/db/tools/SentryShellCommon.java | 8 + .../provider/db/tools/SentryShellHive.java | 16 +- .../sentry/provider/db/tools/ShellCommand.java | 19 +- .../db/tools/command/hive/HiveShellCommand.java | 64 +- .../sentry/service/thrift/HMSFollower.java | 32 +- .../sentry/service/thrift/ServiceConstants.java | 8 +- .../TestSentryGenericProviderBackend.java | 47 + .../TestPrivilegeOperatePersistence.java | 108 +-- .../persistent/TestSentryGMPrivilege.java | 54 +- .../service/persistent/TestSentryRole.java | 2 +- .../TestSentryGenericPolicyProcessor.java | 14 +- .../TestSentryGenericServiceIntegration.java | 36 +- .../generic/tools/TestSentryConfigToolSolr.java | 2 +- .../db/generic/tools/TestSentryShellKafka.java | 9 + .../db/generic/tools/TestSentryShellSolr.java | 11 +- .../db/generic/tools/TestSentryShellSqoop.java | 9 + .../service/thrift/TestSentryServerPubSub.java | 181 ++++ .../provider/db/tools/TestSentryShellHive.java | 9 + .../thrift/SentryServiceIntegrationBase.java | 1 + .../sentry/service/thrift/TestHMSFollower.java | 98 ++ sentry-solr/pom.xml | 1 - sentry-solr/solr-sentry-core/pom.xml | 58 -- .../org/apache/solr/sentry/AuditLogger.java | 97 -- .../RollingFileWithoutDeleteAppender.java | 175 ---- .../solr/sentry/SecureRequestHandlerUtil.java | 83 -- .../SentryIndexAuthorizationSingleton.java | 255 ----- sentry-solr/solr-sentry-handlers/pom.xml | 10 +- .../SecureDocumentAnalysisRequestHandler.java | 33 - .../SecureFieldAnalysisRequestHandler.java | 33 - .../solr/handler/SecureRealTimeGetHandler.java | 36 - .../solr/handler/SecureReplicationHandler.java | 38 - .../solr/handler/admin/SecureAdminHandlers.java | 183 ---- .../handler/admin/SecureCollectionsHandler.java | 89 -- .../handler/admin/SecureCoreAdminHandler.java | 181 ---- .../solr/handler/admin/SecureInfoHandler.java | 36 - .../QueryDocAuthorizationComponent.java | 116 ++- .../QueryIndexAuthorizationComponent.java | 79 -- .../component/SecureRealTimeGetComponent.java | 356 ------- .../UpdateIndexAuthorizationProcessor.java | 103 --- ...pdateIndexAuthorizationProcessorFactory.java | 41 - .../lib/classes/empty-file-main-lib.txt | 1 - .../handler/TestSecureAnalysisHandlers.java | 82 -- .../handler/TestSecureReplicationHandler.java | 63 -- .../handler/admin/SecureAdminHandlersTest.java | 176 ---- .../admin/SecureCollectionsHandlerTest.java | 84 -- .../admin/SecureCoreAdminHandlerTest.java | 209 ----- .../handler/admin/SecureInfoHandlerTest.java | 101 -- .../QueryDocAuthorizationComponentTest.java | 265 ------ .../QueryIndexAuthorizationComponentTest.java | 127 --- .../SentryIndexAuthorizationSingletonTest.java | 256 ----- .../sentry/SentrySingletonTestInstance.java | 93 -- .../org/apache/solr/sentry/SentryTestBase.java | 187 ---- .../UpdateIndexAuthorizationProcessorTest.java | 193 ---- .../TestDbPrivilegeCleanupOnDrop.java | 142 +-- .../tests/e2e/hdfs/TestHDFSIntegrationBase.java | 2 + .../AbstractTestWithStaticConfiguration.java | 10 +- .../TestSentryListenerInBuiltDeserializer.java | 1 - .../TestSentryListenerSentryDeserializer.java | 1 - sentry-tests/sentry-tests-solr/pom.xml | 211 ++++- .../e2e/solr/AbstractSolrSentryTestBase.java | 923 ------------------- .../e2e/solr/AbstractSolrSentryTestCase.java | 600 ++++++++++++ .../tests/e2e/solr/DocLevelGenerator.java | 16 +- .../tests/e2e/solr/DummyAuthPluginImpl.java | 68 ++ .../ModifiableUserAuthenticationFilter.java | 73 -- .../e2e/solr/TestCollAdminCoreOperations.java | 145 --- .../tests/e2e/solr/TestDocLevelOperations.java | 400 ++++---- .../tests/e2e/solr/TestQueryOperations.java | 78 -- .../sentry/tests/e2e/solr/TestRealTimeGet.java | 476 ---------- .../sentry/tests/e2e/solr/TestSentryServer.java | 144 +++ .../tests/e2e/solr/TestSolrAdminOperations.java | 188 ++++ .../e2e/solr/TestSolrCollectionOperations.java | 141 +++ .../e2e/solr/TestSolrConfigOperations.java | 232 +++++ .../e2e/solr/TestSolrSchemaOperations.java | 146 +++ .../tests/e2e/solr/TestUpdateOperations.java | 168 ---- .../AbstractSolrSentryTestWithDbProvider.java | 324 ------- .../db/integration/TestSolrAdminOperations.java | 242 ----- .../integration/TestSolrDocLevelOperations.java | 204 ---- .../db/integration/TestSolrQueryOperations.java | 96 -- .../integration/TestSolrUpdateOperations.java | 100 -- .../cloud-managed/conf/managed-schema | 27 + .../cloud-managed/conf/solrconfig.xml | 51 + .../configsets/cloud-minimal/conf/schema.xml | 28 + .../cloud-minimal/conf/solrconfig.xml | 47 + .../conf/schema.xml | 29 + .../conf/solrconfig.xml | 82 ++ .../test/resources/solr/security/security.json | 18 + sentry-tests/sentry-tests-sqoop/pom.xml | 69 +- .../e2e/sqoop/AbstractSqoopSentryTestBase.java | 7 +- .../tests/e2e/sqoop/JettySqoopRunner.java | 239 +++++ .../tests/e2e/sqoop/TestConnectorEndToEnd.java | 11 +- .../tests/e2e/sqoop/TestGrantPrivilege.java | 70 +- .../sentry/tests/e2e/sqoop/TestJobEndToEnd.java | 139 +-- .../tests/e2e/sqoop/TestLinkEndToEnd.java | 96 +- .../tests/e2e/sqoop/TestOwnerPrivilege.java | 59 +- .../tests/e2e/sqoop/TestRevokePrivilege.java | 56 +- .../e2e/sqoop/TestServerScopeEndToEnd.java | 75 +- .../tests/e2e/sqoop/TestShowPrivilege.java | 14 +- .../tests/e2e/sqoop/TomcatSqoopRunner.java | 318 ------- 175 files changed, 7042 insertions(+), 9787 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sentry/blob/f951f094/pom.xml ---------------------------------------------------------------------- diff --cc pom.xml index 2306d9d,7476b4f..6dacc2d --- a/pom.xml +++ b/pom.xml @@@ -648,10 -633,9 +638,10 @@@ limitations under the License <module>sentry-binding</module> <module>sentry-provider</module> <module>sentry-policy</module> + <module>sentry-solr</module> <module>sentry-tests</module> <module>sentry-hdfs</module> - <module>sentry-solr</module> + <module>sentry-tools</module> <module>sentry-dist</module> </modules> http://git-wip-us.apache.org/repos/asf/sentry/blob/f951f094/sentry-dist/pom.xml ---------------------------------------------------------------------- diff --cc sentry-dist/pom.xml index 3bc8207,69f4fcc..a65a87d --- a/sentry-dist/pom.xml +++ b/sentry-dist/pom.xml @@@ -96,12 -88,12 +88,16 @@@ limitations under the License </dependency> <dependency> <groupId>org.apache.sentry</groupId> + <artifactId>solr-sentry-handlers</artifactId> + </dependency> + <dependency> + <groupId>org.apache.sentry</groupId> <artifactId>sentry-hdfs-dist</artifactId> </dependency> + <dependency> + <groupId>org.apache.sentry</groupId> + <artifactId>sentry-tools</artifactId> + </dependency> </dependencies> <profiles> <profile>
