use of org.graylog.security.authservice.ProvisionerAction in project graylog2-server by Graylog2.
the class SecurityModule method configure.
@Override
protected void configure() {
// Call the following to ensure the presence of the multi binder and avoid startup errors when no action is registered
MapBinder.newMapBinder(binder(), TypeLiteral.get(String.class), new TypeLiteral<ProvisionerAction.Factory<? extends ProvisionerAction>>() {
});
authServiceBackendBinder();
bind(BuiltinCapabilities.class).asEagerSingleton();
bind(UnboundLDAPConnector.class).in(Scopes.SINGLETON);
install(new FactoryModuleBuilder().implement(GranteeAuthorizer.class, GranteeAuthorizer.class).build(GranteeAuthorizer.Factory.class));
OptionalBinder.newOptionalBinder(binder(), PermissionAndRoleResolver.class).setDefault().to(DefaultPermissionAndRoleResolver.class);
OptionalBinder.newOptionalBinder(binder(), GranteeService.class).setDefault().to(DefaultGranteeService.class);
bind(AuthServiceBackend.class).annotatedWith(InternalAuthServiceBackend.class).to(MongoDBAuthServiceBackend.class);
addSystemRestResource(AuthServiceBackendsResource.class);
addSystemRestResource(AuthServicesResource.class);
addSystemRestResource(AuthServiceTestResource.class);
addSystemRestResource(GlobalAuthServiceConfigResource.class);
addSystemRestResource(HTTPHeaderAuthenticationConfigResource.class);
addSystemRestResource(AuthzRolesResource.class);
addSystemRestResource(EntitySharesResource.class);
addSystemRestResource(GrantsOverviewResource.class);
addAuditEventTypes(SecurityAuditEventTypes.class);
addAuthServiceBackend(LDAPAuthServiceBackend.TYPE_NAME, LDAPAuthServiceBackend.class, LDAPAuthServiceBackend.Factory.class, LDAPAuthServiceBackendConfig.class);
addAuthServiceBackend(ADAuthServiceBackend.TYPE_NAME, ADAuthServiceBackend.class, ADAuthServiceBackend.Factory.class, ADAuthServiceBackendConfig.class);
}
Aggregations