use of co.cask.cdap.security.authorization.AuthorizationEnforcementModule in project cdap by caskdata.
the class NotificationTest method getCommonModules.
protected static List<Module> getCommonModules() throws Exception {
CConfiguration cConf = CConfiguration.create();
cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());
return ImmutableList.of(new ConfigModule(cConf), new DiscoveryRuntimeModule().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getInMemoryModules(), new NonCustomLocationUnitTestModule().getModule(), new MetricsClientRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new MessagingServerRuntimeModule().getInMemoryModules(), new DataFabricModules().getInMemoryModules(), new NamespaceClientRuntimeModule().getInMemoryModules(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AbstractModule() {
@Override
protected void configure() {
bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
bind(OwnerAdmin.class).to(NoOpOwnerAdmin.class);
}
});
}
use of co.cask.cdap.security.authorization.AuthorizationEnforcementModule in project cdap by caskdata.
the class DefaultPreviewManagerTest method beforeClass.
@BeforeClass
public static void beforeClass() throws Throwable {
injector = Guice.createInjector(new ConfigModule(CConfiguration.create(), new Configuration()), new IOModule(), new DataFabricModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new TransactionExecutorModule(), new DataSetServiceModules().getInMemoryModules(), new DiscoveryRuntimeModule().getInMemoryModules(), new AppFabricServiceRuntimeModule().getInMemoryModules(), new ServiceStoreModules().getInMemoryModules(), new ProgramRunnerRuntimeModule().getInMemoryModules(), new NonCustomLocationUnitTestModule().getModule(), new LoggingModules().getInMemoryModules(), new LogReaderRuntimeModules().getInMemoryModules(), new MetricsHandlerModule(), new MetricsClientRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new NotificationFeedServiceRuntimeModule().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new ConfigStoreModule().getInMemoryModule(), new ViewAdminModules().getInMemoryModules(), new StreamAdminModules().getInMemoryModules(), new StreamServiceRuntimeModule().getInMemoryModules(), new NamespaceStoreModule().getStandaloneModules(), new MetadataServiceModule(), new RemoteSystemOperationsServiceModule(), new AuthorizationModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new SecureStoreModules().getInMemoryModules(), new MessagingServerRuntimeModule().getInMemoryModules(), new PreviewHttpModule(), new AbstractModule() {
@Override
protected void configure() {
bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
}
});
}
use of co.cask.cdap.security.authorization.AuthorizationEnforcementModule in project cdap by caskdata.
the class AppFabricTestModule method configure.
@Override
protected void configure() {
install(new DataFabricModules().getInMemoryModules());
install(new DataSetsModules().getStandaloneModules());
install(new TransactionExecutorModule());
install(new DataSetServiceModules().getInMemoryModules());
install(new ConfigModule(cConf, hConf, sConf));
install(new IOModule());
install(new DiscoveryRuntimeModule().getInMemoryModules());
install(new AppFabricServiceRuntimeModule().getInMemoryModules());
install(new ServiceStoreModules().getInMemoryModules());
install(new ProgramRunnerRuntimeModule().getInMemoryModules());
install(new NonCustomLocationUnitTestModule().getModule());
install(new LoggingModules().getInMemoryModules());
install(new LogReaderRuntimeModules().getInMemoryModules());
install(new MetricsHandlerModule());
install(new MetricsClientRuntimeModule().getInMemoryModules());
install(new ExploreClientModule());
install(new NotificationFeedServiceRuntimeModule().getInMemoryModules());
install(new NotificationServiceRuntimeModule().getInMemoryModules());
install(new ConfigStoreModule().getInMemoryModule());
install(new ViewAdminModules().getInMemoryModules());
install(new StreamAdminModules().getInMemoryModules());
install(new StreamServiceRuntimeModule().getInMemoryModules());
install(new NamespaceStoreModule().getStandaloneModules());
install(new MetadataServiceModule());
install(new RemoteSystemOperationsServiceModule());
install(new AuthorizationModule());
install(new AuthorizationEnforcementModule().getStandaloneModules());
install(new SecureStoreModules().getInMemoryModules());
install(new MessagingServerRuntimeModule().getInMemoryModules());
}
use of co.cask.cdap.security.authorization.AuthorizationEnforcementModule in project cdap by caskdata.
the class MDSStreamMetaStoreTest method init.
@BeforeClass
public static void init() throws Exception {
Injector injector = Guice.createInjector(new ConfigModule(CConfiguration.create(), new Configuration()), new DataSetServiceModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new DataFabricModules().getInMemoryModules(), new ExploreClientModule(), new DiscoveryRuntimeModule().getInMemoryModules(), new LocationRuntimeModule().getInMemoryModules(), new NamespaceClientRuntimeModule().getInMemoryModules(), new NamespaceStoreModule().getStandaloneModules(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AbstractModule() {
@Override
protected void configure() {
bind(StreamMetaStore.class).to(MDSStreamMetaStore.class).in(Scopes.SINGLETON);
bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class).in(Scopes.SINGLETON);
bind(Store.class).to(DefaultStore.class);
bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
bind(OwnerAdmin.class).to(NoOpOwnerAdmin.class);
}
});
streamMetaStore = injector.getInstance(StreamMetaStore.class);
transactionManager = injector.getInstance(TransactionManager.class);
transactionManager.startAndWait();
datasetService = injector.getInstance(DatasetService.class);
datasetService.startAndWait();
store = injector.getInstance(NamespaceStore.class);
}
Aggregations