Search in sources :

Example 1 with DefaultSystemGraphComponent

use of org.neo4j.dbms.database.DefaultSystemGraphComponent in project neo4j by neo4j.

the class BasicSystemGraphRealmIT method startSystemGraphRealm.

private void startSystemGraphRealm() throws Exception {
    Config config = Config.defaults(DatabaseManagementSystemSettings.auth_store_directory, testDirectory.directory("data/dbms"));
    var systemGraphComponents = new SystemGraphComponents();
    systemGraphComponents.register(new DefaultSystemGraphComponent(config));
    systemGraphComponents.register(new UserSecurityGraphComponent(Mockito.mock(AbstractSecurityLog.class), oldUsers, initialPassword, config));
    var systemGraphSupplier = SystemGraphRealmHelper.makeSystemSupplier(dbManager);
    systemGraphInitializer = new DefaultSystemGraphInitializer(systemGraphSupplier, systemGraphComponents);
    systemGraphInitializer.start();
    RateLimitedAuthenticationStrategy authStrategy = new RateLimitedAuthenticationStrategy(Clock.systemUTC(), config);
    realm = new BasicSystemGraphRealm(realmHelper, authStrategy);
}
Also used : SystemGraphComponents(org.neo4j.dbms.database.SystemGraphComponents) DefaultSystemGraphInitializer(org.neo4j.dbms.database.DefaultSystemGraphInitializer) RateLimitedAuthenticationStrategy(org.neo4j.server.security.auth.RateLimitedAuthenticationStrategy) DefaultSystemGraphComponent(org.neo4j.dbms.database.DefaultSystemGraphComponent) UserSecurityGraphComponent(org.neo4j.server.security.systemgraph.UserSecurityGraphComponent) Config(org.neo4j.configuration.Config) BasicSystemGraphRealm(org.neo4j.server.security.systemgraph.BasicSystemGraphRealm)

Aggregations

Config (org.neo4j.configuration.Config)1 DefaultSystemGraphComponent (org.neo4j.dbms.database.DefaultSystemGraphComponent)1 DefaultSystemGraphInitializer (org.neo4j.dbms.database.DefaultSystemGraphInitializer)1 SystemGraphComponents (org.neo4j.dbms.database.SystemGraphComponents)1 RateLimitedAuthenticationStrategy (org.neo4j.server.security.auth.RateLimitedAuthenticationStrategy)1 BasicSystemGraphRealm (org.neo4j.server.security.systemgraph.BasicSystemGraphRealm)1 UserSecurityGraphComponent (org.neo4j.server.security.systemgraph.UserSecurityGraphComponent)1