use of org.neo4j.server.security.enterprise.log.SecurityLog in project neo4j by neo4j.
the class MultiRealmAuthManagerRule method setupAuthManager.
private void setupAuthManager(AuthenticationStrategy authStrategy) throws Throwable {
FormattedLog.Builder builder = FormattedLog.withUTCTimeZone();
securityLogWriter = new StringWriter();
Log log = builder.toWriter(securityLogWriter);
securityLog = new SecurityLog(log);
InternalFlatFileRealm internalFlatFileRealm = new InternalFlatFileRealm(users, new InMemoryRoleRepository(), new BasicPasswordPolicy(), authStrategy, mock(JobScheduler.class), new InMemoryUserRepository(), new InMemoryUserRepository());
manager = new MultiRealmAuthManager(internalFlatFileRealm, Collections.singleton(internalFlatFileRealm), new MemoryConstrainedCacheManager(), securityLog, true);
manager.init();
}
use of org.neo4j.server.security.enterprise.log.SecurityLog in project neo4j by neo4j.
the class UserManagementProceduresLoggingTest method setUp.
@Before
public void setUp() throws Throwable {
log = new AssertableLogProvider();
SecurityLog securityLog = new SecurityLog(log.getLog(getClass()));
authProcedures = new TestUserManagementProcedures();
authProcedures.graph = mock(GraphDatabaseAPI.class);
authProcedures.securityLog = securityLog;
generalUserManager = getUserManager();
EnterpriseSecurityContext adminContext = new TestSecurityContext("admin", true, generalUserManager);
matsContext = new TestSecurityContext("mats", false, generalUserManager);
setSubject(adminContext);
}
Aggregations