use of org.neo4j.dbms.database.DefaultSystemGraphInitializer 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);
}
use of org.neo4j.dbms.database.DefaultSystemGraphInitializer in project neo4j by neo4j.
the class CommunityEditionModule method createSystemGraphInitializer.
@Override
public SystemGraphInitializer createSystemGraphInitializer(GlobalModule globalModule) {
DependencyResolver globalDependencies = globalModule.getGlobalDependencies();
Supplier<GraphDatabaseService> systemSupplier = systemSupplier(globalDependencies);
var systemGraphComponents = globalModule.getSystemGraphComponents();
SystemGraphInitializer initializer = CommunityEditionModule.tryResolveOrCreate(SystemGraphInitializer.class, globalModule.getExternalDependencyResolver(), () -> new DefaultSystemGraphInitializer(systemSupplier, systemGraphComponents));
return globalModule.getGlobalDependencies().satisfyDependency(initializer);
}
Aggregations