Search in sources :

Example 1 with ProvisionerAction

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);
}
Also used : InternalAuthServiceBackend(org.graylog.security.authservice.InternalAuthServiceBackend) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) LDAPAuthServiceBackend(org.graylog.security.authservice.backend.LDAPAuthServiceBackend) ProvisionerAction(org.graylog.security.authservice.ProvisionerAction) UnboundLDAPConnector(org.graylog.security.authservice.ldap.UnboundLDAPConnector) ADAuthServiceBackend(org.graylog.security.authservice.backend.ADAuthServiceBackend)

Aggregations

FactoryModuleBuilder (com.google.inject.assistedinject.FactoryModuleBuilder)1 InternalAuthServiceBackend (org.graylog.security.authservice.InternalAuthServiceBackend)1 ProvisionerAction (org.graylog.security.authservice.ProvisionerAction)1 ADAuthServiceBackend (org.graylog.security.authservice.backend.ADAuthServiceBackend)1 LDAPAuthServiceBackend (org.graylog.security.authservice.backend.LDAPAuthServiceBackend)1 UnboundLDAPConnector (org.graylog.security.authservice.ldap.UnboundLDAPConnector)1