use of org.neo4j.server.security.systemgraph.CommunityDefaultDatabaseResolver in project neo4j by neo4j.
the class CommunityEditionModule method createDefaultDatabaseResolver.
@Override
public void createDefaultDatabaseResolver(GlobalModule globalModule) {
Supplier<GraphDatabaseService> systemDbSupplier = systemSupplier(globalModule.getGlobalDependencies());
CommunityDefaultDatabaseResolver defaultDatabaseResolver = new CommunityDefaultDatabaseResolver(globalModule.getGlobalConfig(), systemDbSupplier);
globalModule.getTransactionEventListeners().registerTransactionEventListener(SYSTEM_DATABASE_NAME, defaultDatabaseResolver);
setDefaultDatabaseResolver(defaultDatabaseResolver);
}
use of org.neo4j.server.security.systemgraph.CommunityDefaultDatabaseResolver in project neo4j by neo4j.
the class SessionExtension method beforeEach.
@Override
public void beforeEach(ExtensionContext extensionContext) {
managementService = builderFactory.get().impermanent().setConfig(GraphDatabaseSettings.auth_enabled, authEnabled).build();
gdb = (GraphDatabaseAPI) managementService.database(GraphDatabaseSettings.DEFAULT_DATABASE_NAME);
DependencyResolver resolver = gdb.getDependencyResolver();
Authentication authentication = authentication(resolver.resolveDependency(AuthManager.class));
Config config = resolver.resolveDependency(Config.class);
SystemNanoClock clock = Clocks.nanoClock();
DefaultDatabaseResolver defaultDatabaseResolver = new CommunityDefaultDatabaseResolver(config, () -> managementService.database(GraphDatabaseSettings.SYSTEM_DATABASE_NAME));
BoltGraphDatabaseManagementServiceSPI databaseManagementService = new BoltKernelDatabaseManagementServiceProvider(managementService, new Monitors(), clock, ofSeconds(30));
boltFactory = new BoltStateMachineFactoryImpl(databaseManagementService, authentication, clock, config, NullLogService.getInstance(), defaultDatabaseResolver);
}
Aggregations