Search in sources :

Example 66 with AuthorizationTestModule

use of io.cdap.cdap.security.authorization.AuthorizationTestModule in project cdap by cdapio.

the class MetricsProcessorServiceTestBase method getAdditionalModules.

@Override
protected List<Module> getAdditionalModules() {
    List<Module> list = new ArrayList<>();
    list.add(new DataSetsModules().getStandaloneModules());
    list.add(new IOModule());
    list.add(Modules.override(new NonCustomLocationUnitTestModule(), new DataFabricModules().getInMemoryModules(), new DataSetServiceModules().getInMemoryModules(), new ExploreClientModule(), new NamespaceAdminTestModule(), new MetricsStoreModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule()).with(new AbstractModule() {

        @Override
        protected void configure() {
            bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
            bind(OwnerAdmin.class).to(NoOpOwnerAdmin.class);
            bind(MetadataServiceClient.class).to(NoOpMetadataServiceClient.class);
        }
    }));
    return list;
}
Also used : IOModule(io.cdap.cdap.common.guice.IOModule) DataSetServiceModules(io.cdap.cdap.data.runtime.DataSetServiceModules) MetricsStoreModule(io.cdap.cdap.metrics.guice.MetricsStoreModule) NamespaceAdminTestModule(io.cdap.cdap.common.guice.NamespaceAdminTestModule) AuthenticationContextModules(io.cdap.cdap.security.auth.context.AuthenticationContextModules) DataSetsModules(io.cdap.cdap.data.runtime.DataSetsModules) UGIProvider(io.cdap.cdap.security.impersonation.UGIProvider) UnsupportedUGIProvider(io.cdap.cdap.security.impersonation.UnsupportedUGIProvider) NoOpOwnerAdmin(io.cdap.cdap.security.impersonation.NoOpOwnerAdmin) OwnerAdmin(io.cdap.cdap.security.impersonation.OwnerAdmin) ArrayList(java.util.ArrayList) NonCustomLocationUnitTestModule(io.cdap.cdap.common.guice.NonCustomLocationUnitTestModule) AuthorizationTestModule(io.cdap.cdap.security.authorization.AuthorizationTestModule) AbstractModule(com.google.inject.AbstractModule) NoOpMetadataServiceClient(io.cdap.cdap.data2.metadata.writer.NoOpMetadataServiceClient) MetadataServiceClient(io.cdap.cdap.data2.metadata.writer.MetadataServiceClient) ExploreClientModule(io.cdap.cdap.explore.guice.ExploreClientModule) Module(com.google.inject.Module) MetricsStoreModule(io.cdap.cdap.metrics.guice.MetricsStoreModule) ExploreClientModule(io.cdap.cdap.explore.guice.ExploreClientModule) AuthorizationTestModule(io.cdap.cdap.security.authorization.AuthorizationTestModule) NamespaceAdminTestModule(io.cdap.cdap.common.guice.NamespaceAdminTestModule) AuthorizationEnforcementModule(io.cdap.cdap.security.authorization.AuthorizationEnforcementModule) IOModule(io.cdap.cdap.common.guice.IOModule) NonCustomLocationUnitTestModule(io.cdap.cdap.common.guice.NonCustomLocationUnitTestModule) AbstractModule(com.google.inject.AbstractModule) DataFabricModules(io.cdap.cdap.data.runtime.DataFabricModules) AuthorizationEnforcementModule(io.cdap.cdap.security.authorization.AuthorizationEnforcementModule)

Aggregations

AuthenticationContextModules (io.cdap.cdap.security.auth.context.AuthenticationContextModules)66 AuthorizationTestModule (io.cdap.cdap.security.authorization.AuthorizationTestModule)66 ConfigModule (io.cdap.cdap.common.guice.ConfigModule)64 AuthorizationEnforcementModule (io.cdap.cdap.security.authorization.AuthorizationEnforcementModule)64 AbstractModule (com.google.inject.AbstractModule)54 NonCustomLocationUnitTestModule (io.cdap.cdap.common.guice.NonCustomLocationUnitTestModule)48 DataSetsModules (io.cdap.cdap.data.runtime.DataSetsModules)46 CConfiguration (io.cdap.cdap.common.conf.CConfiguration)44 BeforeClass (org.junit.BeforeClass)42 UnsupportedUGIProvider (io.cdap.cdap.security.impersonation.UnsupportedUGIProvider)40 TransactionManager (org.apache.tephra.TransactionManager)38 InMemoryDiscoveryModule (io.cdap.cdap.common.guice.InMemoryDiscoveryModule)34 SystemDatasetRuntimeModule (io.cdap.cdap.data.runtime.SystemDatasetRuntimeModule)34 NoOpMetricsCollectionService (io.cdap.cdap.common.metrics.NoOpMetricsCollectionService)32 DefaultOwnerAdmin (io.cdap.cdap.security.impersonation.DefaultOwnerAdmin)32 Injector (com.google.inject.Injector)30 StructuredTableAdmin (io.cdap.cdap.spi.data.StructuredTableAdmin)30 MetricsCollectionService (io.cdap.cdap.api.metrics.MetricsCollectionService)28 NamespaceAdminTestModule (io.cdap.cdap.common.guice.NamespaceAdminTestModule)28 StorageModule (io.cdap.cdap.data.runtime.StorageModule)28