Search in sources :

Example 1 with InternalFlatFileRealm

use of org.neo4j.server.security.enterprise.auth.InternalFlatFileRealm in project neo4j by neo4j.

the class FlatFileStressBase method setup.

@Before
public void setup() throws Throwable {
    Config config = Config.defaults();
    LogProvider logProvider = NullLogProvider.getInstance();
    JobScheduler jobScheduler = new NoopJobScheduler();
    userRepository = CommunitySecurityModule.getUserRepository(config, logProvider, getFileSystem());
    roleRepository = EnterpriseSecurityModule.getRoleRepository(config, logProvider, getFileSystem());
    flatFileRealm = new InternalFlatFileRealm(userRepository, roleRepository, new BasicPasswordPolicy(), new RateLimitedAuthenticationStrategy(Clock.systemUTC(), 3), jobScheduler, CommunitySecurityModule.getInitialUserRepository(config, logProvider, getFileSystem()), EnterpriseSecurityModule.getDefaultAdminRepository(config, logProvider, getFileSystem()));
    flatFileRealm.init();
    flatFileRealm.start();
}
Also used : JobScheduler(org.neo4j.kernel.impl.util.JobScheduler) LogProvider(org.neo4j.logging.LogProvider) NullLogProvider(org.neo4j.logging.NullLogProvider) RateLimitedAuthenticationStrategy(org.neo4j.server.security.auth.RateLimitedAuthenticationStrategy) Config(org.neo4j.kernel.configuration.Config) InternalFlatFileRealm(org.neo4j.server.security.enterprise.auth.InternalFlatFileRealm) BasicPasswordPolicy(org.neo4j.server.security.auth.BasicPasswordPolicy) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 Config (org.neo4j.kernel.configuration.Config)1 JobScheduler (org.neo4j.kernel.impl.util.JobScheduler)1 LogProvider (org.neo4j.logging.LogProvider)1 NullLogProvider (org.neo4j.logging.NullLogProvider)1 BasicPasswordPolicy (org.neo4j.server.security.auth.BasicPasswordPolicy)1 RateLimitedAuthenticationStrategy (org.neo4j.server.security.auth.RateLimitedAuthenticationStrategy)1 InternalFlatFileRealm (org.neo4j.server.security.enterprise.auth.InternalFlatFileRealm)1