use of org.graylog2.security.encryption.EncryptedValueService in project graylog2-server by Graylog2.
the class UnboundLDAPConnectorTest method setUp.
@Before
public void setUp() throws Exception {
final LdapServer server = getLdapServer();
final LDAPConnectorConfig.LDAPServer unreachableServer = LDAPConnectorConfig.LDAPServer.create("localhost", 9);
final LDAPConnectorConfig.LDAPServer ldapServer = LDAPConnectorConfig.LDAPServer.create("localhost", server.getPort());
final LDAPConnectorConfig connectorConfig = LDAPConnectorConfig.builder().systemUsername(ADMIN_DN).systemPassword(encryptedValueService.encrypt(ADMIN_PASSWORD)).transportSecurity(LDAPTransportSecurity.NONE).verifyCertificates(false).serverList(ImmutableList.of(unreachableServer, ldapServer)).build();
connector = new UnboundLDAPConnector(10000, new TLSProtocolsConfiguration(), mock(TrustManagerProvider.class), encryptedValueService);
connection = connector.connect(connectorConfig);
}
use of org.graylog2.security.encryption.EncryptedValueService in project graylog2-server by Graylog2.
the class EncryptedValueTest method setUp.
@BeforeEach
void setUp(MongoDBTestService mongodb) {
encryptedValueService = new EncryptedValueService("1234567890abcdef");
this.objectMapper = new ObjectMapperProvider(ObjectMapperProvider.class.getClassLoader(), Collections.emptySet(), encryptedValueService, GRNRegistry.createWithBuiltinTypes()).get();
this.dbService = new TestService(mongodb.mongoConnection(), new MongoJackObjectMapperProvider(objectMapper));
}
Aggregations