| | |
| | | import org.forgerock.opendj.ldap.LinkedAttribute; |
| | | import org.forgerock.opendj.ldap.LinkedHashMapEntry; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.CoreSchema; |
| | | import org.forgerock.opendj.ldap.schema.Syntax; |
| | | import org.forgerock.opendj.server.config.client.BackendCfgClient; |
| | | import org.forgerock.opendj.server.config.meta.CryptoManagerCfgDefn; |
| | |
| | | { |
| | | updateConfigEntryWithAttribute( |
| | | DN_LDAP_CONNECTION_HANDLER, ATTR_LISTEN_PORT, |
| | | DirectoryServer.getDefaultIntegerSyntax(), |
| | | CoreSchema.getIntegerSyntax(), |
| | | ldapPort.getIntValue()); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_ADMIN_CONNECTOR, |
| | | ATTR_LISTEN_PORT, |
| | | DirectoryServer.getDefaultIntegerSyntax(), |
| | | CoreSchema.getIntegerSyntax(), |
| | | adminConnectorPort.getIntValue()); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_LDAPS_CONNECTION_HANDLER, |
| | | ATTR_LISTEN_PORT, |
| | | DirectoryServer.getDefaultIntegerSyntax(), |
| | | CoreSchema.getIntegerSyntax(), |
| | | ldapsPort.getIntValue()); |
| | | |
| | | updateConfigEntryWithAttribute( |
| | | DN_LDAPS_CONNECTION_HANDLER, |
| | | ATTR_CONNECTION_HANDLER_ENABLED, |
| | | DirectoryServer.getDefaultBooleanSyntax(), |
| | | CoreSchema.getBooleanSyntax(), |
| | | ServerConstants.TRUE_VALUE); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_JMX_CONNECTION_HANDLER, |
| | | ATTR_LISTEN_PORT, |
| | | DirectoryServer.getDefaultIntegerSyntax(), |
| | | CoreSchema.getIntegerSyntax(), |
| | | jmxPort.getIntValue()); |
| | | |
| | | updateConfigEntryWithAttribute( |
| | | DN_JMX_CONNECTION_HANDLER, |
| | | ATTR_CONNECTION_HANDLER_ENABLED, |
| | | DirectoryServer.getDefaultBooleanSyntax(), |
| | | CoreSchema.getBooleanSyntax(), |
| | | ServerConstants.TRUE_VALUE); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_LDAP_CONNECTION_HANDLER, |
| | | ATTR_ALLOW_STARTTLS, |
| | | DirectoryServer.getDefaultBooleanSyntax(), |
| | | CoreSchema.getBooleanSyntax(), |
| | | ServerConstants.TRUE_VALUE); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | keyManagerProviderDN.getValue(), |
| | | ATTR_KEYMANAGER_ENABLED, |
| | | DirectoryServer.getDefaultBooleanSyntax(), |
| | | CoreSchema.getBooleanSyntax(), |
| | | ServerConstants.TRUE_VALUE); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | keyManagerProviderDN.getValue(), |
| | | ATTR_KEYSTORE_FILE, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | keyManagerPath.getValue()); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | attributeDN, |
| | | ATTR_KEYMANAGER_DN, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | keyManagerProviderDN.getValue()); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | trustManagerProviderDN.getValue(), |
| | | ATTR_TRUSTMANAGER_ENABLED, |
| | | DirectoryServer.getDefaultBooleanSyntax(), |
| | | CoreSchema.getBooleanSyntax(), |
| | | ServerConstants.TRUE_VALUE); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | attributeDN, |
| | | ATTR_TRUSTMANAGER_DN, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | trustManagerProviderDN.getValue()); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | attributeDN, |
| | | attrName, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | attrValues.toArray(new Object[attrValues.size()])); |
| | | } |
| | | else |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_ROOT_USER, |
| | | ATTR_ROOTDN_ALTERNATE_BIND_DN, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | rootDN); |
| | | final String encodedPassword = SaltedSHA512PasswordStorageScheme.encodeOffline(getBytes(rootPW)); |
| | | updateConfigEntryWithAttribute( |
| | | DN_ROOT_USER, |
| | | ATTR_USER_PASSWORD, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | encodedPassword); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_DIGEST_MD5_SASL_MECHANISM, |
| | | "ds-cfg-server-fqdn", |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | hostName.getValue()); |
| | | } |
| | | catch (final Exception e) |
| | |
| | | updateConfigEntryWithAttribute( |
| | | DN_CRYPTO_MANAGER, |
| | | ATTR_CRYPTO_CIPHER_KEY_WRAPPING_TRANSFORMATION, |
| | | DirectoryServer.getDefaultStringSyntax(), |
| | | CoreSchema.getDirectoryStringSyntax(), |
| | | alternativeCipher); |
| | | } |
| | | catch (final Exception e) |