The Active Directory Provisioning plugin deploys a ready-to-use Active Directory provisioning configuration on a Memority tenant, through the Memority Integration Tool (MIT). It generates the connector, the application mapping, the application profile, the settings, the provisioning right, the role and resource data and an account discovery task.
Prerequisites
The plugin requires the common plugin prerequisites, and the authentication and configuration prerequisites described above.
Scope and limitations
The plugin covers the user account lifecycle only, together with initial password provisioning and a forced password change at first logon. Groups, organizations, admin roles and account delegation are out of scope. Use the plugin for a standard user provisioning setup, then extend the generated configuration manually as described in the Configuration chapter below if your target scope is wider, for instance a multi-Domain Forest or a Domain migration.
Be aware of the deprovisioning behavior it generates: both the loss of the application assignment and the deletion of the Memority identity trigger DELETE_APPLICATION_OBJECT, so the Active Directory account is deleted, not just disabled. Change the activation definition of the generated application if your policy requires the account to be kept and disabled instead. Account enabling and disabling during the account's lifetime is managed separately, through the userAccountControl attribute.
Installation
The plugin is installed with the standard procedure described on the Memority Plugins page. This section only gives the information that is specific to the Active Directory Provisioning plugin.
Installation mode: single installation. The plugin can be installed only once per project.
Plugin form parameters
The plugin form asks for eight values, four per environment. Collect them from the client's Active Directory administrator before starting. All eight fields are mandatory and have no default value.
|
Parameter |
Description |
Example |
|
|---|---|---|---|
|
1 |
Active Directory server - Preprod |
FQDN or IP address of the preprod Domain Controller |
|
|
2 |
Provisioning account DN - Preprod |
Full DN of the preprod service account, must start with CN= |
CN=prov-activeDirectory,OU=Services,DC=preprod,DC=internal,DC=my,DC=com |
|
3 |
LDAP base DN - Preprod |
Base DN for all LDAP searches in preprod, must start with DC= |
DC=preprod,DC=internal,DC=my,DC=com |
|
4 |
Target users OU - Preprod |
OU where preprod user accounts are created, must start with OU= |
OU=Users,DC=preprod,DC=internal,DC=my,DC=com |
|
5 |
Active Directory server - Prod |
FQDN or IP address of the production Domain Controller |
|
|
6 |
Provisioning account DN - Prod |
Full DN of the production service account, must start with CN= |
CN=prov-activeDirectory,OU=Services,DC=internal,DC=my,DC=com |
|
7 |
LDAP base DN - Prod |
Base DN for all LDAP searches in production, must start with DC= |
DC=internal,DC=my,DC=com |
|
8 |
Target users OU - Prod |
OU where production user accounts are created, must start with OU= |
OU=Users,DC=internal,DC=my,DC=com |
Provisioning account password
The provisioning account password is not requested by the form. Set it manually in the Memority administrator portal, for both preprod and prod. Go to System → Settings → Synchronization Service and create a setting of type SECRET: sync.connectors.prov-activeDirectory.bindPassword.
Data import order
Always import the data in the following order:
-
The application resource of the target environment (resources_pprod_ProvisioningActiveDirectory.json or resources_prod_ProvisioningActiveDirectory.json)
-
The roles (roles_ProvisioningActiveDirectory.json)
Additional step: certificate trust
If the Active Directory certificate was issued by a custom certification authority, add the root and intermediate CA certificates to the groovy.client.rest.http.trustStorePEM setting, in System → Settings → Synchronization Service. This setting is shared by all SSL connectors and must be set for each environment.
Once these steps are done, test provisioning end to end with a non-production identity before you open the configuration to real populations.
Generated files
|
File |
Location |
Description |
|
|---|---|---|---|
|
1 |
prov-activeDirectory-connector.xml |
im/sync/src/main/resources/ConnectorDefinition/Plugins/ProvisioningActiveDirectory |
Connector definition based on com.evolveum.polygon.connector.ldap.ad.AdLdapConnector. host, bindDn, bindPassword and baseContext are set through settings; port=636, connectionSecurity=ssl, allowUntrustedSsl=false, connectTimeout=5000, operationalAttributes=objectClass,cn, pagingStrategy=vlv, referralStrategy=ignore and provisioningGroup=2 are fixed. |
|
2 |
prov-activeDirectory-application.xml |
im/sync/src/main/resources/Application/Plugins/ProvisioningActiveDirectory |
Application mapping for the user object class (shadowKind=ACCOUNT, Citadel application APP_CCC00030): DN construction, sAMAccountName, givenName, sn, mail, account status through |
|
3 |
prov-activeDirectory-applicationProfile.xml |
im/sync/src/main/resources/ApplicationProfile/Plugins/ProvisioningActiveDirectory |
Enabled profile matching IDENTITY objects holding the app.prov.APP_CCC00030 right, for the ACCOUNT shadow kind. |
|
4 |
sync.connectors.prov-activeDirectory.host.xml |
im/sync/src/main/resources/Setting/ActiveDirectory/Plugins/ProvisioningActiveDirectory |
Declares the STRING setting api.settings.sync.connectors.prov-activeDirectory.host, valued from vars_preprod.properties and vars_prod.properties. |
|
5 |
sync.connectors.prov-activeDirectory.bindDn.xml |
same |
Declares api.settings.sync.connectors.prov-activeDirectory.bindDn (STRING). |
|
6 |
sync.connectors.prov-activeDirectory.baseContext.xml |
same |
Declares api.settings.sync.connectors.prov-activeDirectory.baseContext (STRING). |
|
7 |
sync.connectors.prov-activeDirectory.usersOu.xml |
same |
Declares api.settings.sync.connectors.prov-activeDirectory.usersOu (STRING), used to build the DN of new accounts. |
|
8 |
_sync.connectors.prov-activeDirectory.bindPassword.xml |
same |
Placeholder declaring sync.connectors.prov-activeDirectory.bindPassword as a SECRET with an empty value. The secret must be set manually in the administrator portal. Note that this key has no api.settings. prefix, following the secret settings convention. |
|
9 |
accountDiscovery-activeDirectory-TaskDefinition.xml |
im/sync/src/main/resources/AccountDiscoveryTaskDefinition/Plugins/ProvisioningActiveDirectory |
Active account discovery task on the user object class: lists Active Directory accounts (page size 50, sorted on sAMAccountName ascending), compares them with Memority-linked accounts and reports orphaned, synced and out-of-sync accounts. Schedule is MANUAL by default and can be switched to a CRON schedule. |
|
10 |
resources_pprod_ProvisioningActiveDirectory.json |
im/idm/src/main/data/Plugins/ProvisioningActiveDirectory |
Creates the APP_CCC00030 application resource named Active Directory for the pprod environment, displayed in the portal with the Active Directory logo. |
|
11 |
resources_prod_ProvisioningActiveDirectory.json |
same |
Same resource for the prod environment. |
|
12 |
roles_ProvisioningActiveDirectory.json |
same |
Creates the applicative role CC0030, Active Directory User, bound to the app.prov.APP_CCC00030 right. Requestable by adm.administrator-features, assignable to the myAdministrator and mySupport identity types, single assignment, no self-service. |
|
13 |
app.prov.APP_CCC00030.xml |
im/idm/src/main/resources/Right/Application/Plugins/ProvisioningActiveDirectory |
Provisioning right of category APPLICATION and GLOBAL scope, targeting the APP_CCC00030 value. |
The role is assignable only to the myAdministrator and mySupport identity types. To assign it to other identity types (for example employees), add them to the role.
Each generated file carries a description tag that states the plugin name, the plugin version and the generation date. For the files that MIT writes in .idea/memority, see the Memority Plugins page.
Updated files
The plugin also updates five existing files of the tenant configuration.
|
File |
Location |
Change |
|
|---|---|---|---|
|
1 |
_citadel-i18n_export.xml |
shared/i18n/src/main/resources/ |
Adds two i18n keys, in French and English: ui.model.shadow.applications.APP_CCC00030.name (Active Directory User) and ui.model.attributes.provApplication.values.prov-activeDirectory-application.label (Active Directory). |
|
2 |
msSamAccountName.xml |
im/idm/src/main/resources/AttributeDefinition/Identity/ |
Adds the compute rule that generates the msSamAccountName value on identities (see below). |
|
3 |
report-prov-applications.xml |
im/idm/src/main/resources/ReferenceTable/ |
Adds the row prov-activeDirectory-application to the provisioning applications reporting reference table. |
|
4 |
vars_preprod.properties |
im/sync/ |
Appends the four preprod values: setting.sync.connectors.prov-activeDirectory.host.value, .bindDn.value, .baseContext.value and .usersOu.value. |
|
5 |
vars_prod.properties |
im/sync/ |
Appends the same four keys with the production values. |
Generated attribute mapping
|
Memority attribute |
Active Directory attribute |
Type |
Mapping |
|
|---|---|---|---|---|
|
1 |
msSamAccountName and the usersOu setting |
__NAME__ (DN) |
STRING, mandatory |
Custom mapping that builds CN=<msSamAccountName>,<usersOu>. Case-insensitive value comparison. |
|
2 |
msSamAccountName |
sAMAccountName |
STRING |
Simple mapping. Also used as the correlation key. |
|
3 |
firstName |
givenName |
STRING |
Simple mapping. |
|
4 |
lastName |
sn |
STRING |
Simple mapping. |
|
5 |
|
|
STRING |
Simple mapping. |
|
6 |
enabled |
userAccountControl |
INTEGER, mandatory |
Custom mapping toggling the ACCOUNTDISABLE bit only. |
|
7 |
generated |
unicodePwd |
STRING, secret, WEAK |
Custom mapping generating a 16-character password on account creation only. |
|
8 |
constant |
pwdLastSet |
INTEGER, WEAK |
Custom mapping returning 0, which forces a password change at first logon. |
Extend this mapping to cover the client's own attributes, and adapt it if the target Active Directory enforces mandatory attributes that are not provisioned by default.
The DN is built by concatenating the account name and the target OU read from the settings.
String samAccountName = IDM_OBJECT.msSamAccountName
String usersOu = SETTINGS.get("sync.connectors.prov-activeDirectory.usersOu") as String
return "CN=" + samAccountName + "," + usersOu
The account status is computed with a bitwise operation on userAccountControl, so that only the ACCOUNTDISABLE flag is toggled and the other flags, such as DONT_EXPIRE_PASSWORD, are preserved. The value currently held by the account is read from the shadow and defaults to 512 when the account does not exist yet.
def disabledMask = 2
def normalAccount = 512
def userAccountControl = SHADOW?.userAccountControl as Integer ?: normalAccount
def enabled = IDM_OBJECT.enabled as boolean
def accountEnabled = ((userAccountControl & disabledMask) != disabledMask)
if (enabled == accountEnabled) {
return userAccountControl
}
if (!enabled) {
return (userAccountControl | disabledMask)
}
if (enabled) {
return (userAccountControl ^ disabledMask)
}
The initial password is generated on account creation only. The mapping returns null as soon as the identity exists on the Active Directory, so that the password is never overwritten on subsequent updates, and pwdLastSet is mapped to the constant 0 to force a password change at first logon.
if (SHADOW != null) {
return null
}
return PASSWORD.length(16)
.with(LETTERS_OR_DIGITS)
.with(UPPER_CASE_LETTERS)
.with(PUNCTUATION)
.generate()
Account naming and the msSamAccountName compute rule
The generated mapping uses msSamAccountName, mapped to the Active Directory sAMAccountName attribute, both to build the DN and as the correlation key, so the plugin also injects the compute rule that populates it on identities.
The rule builds the value from the first letter of the first name followed by the last name, after removing accents and any non-alphanumeric character and converting to lower case, for example jdupont for Jean Dupont. The base value is truncated to 18 characters. Homonyms are then resolved by appending the first available numeric suffix, jdupont, jdupont1, jdupont2 and so on, and the final value is truncated to 20 characters. If the first name or the last name is missing, the identity technical identifier is used as a fallback.
If the client's Active Directory already uses a different naming convention, adapt this compute rule and the DN construction rule before the first provisioning run, otherwise existing accounts will not be correlated and duplicate accounts will be created.
Troubleshooting
For issues with the Plugin Store itself, see the troubleshooting section of the Memority Plugins page.
Authentication failures
Provisioning tasks fail with a binding error, or the connector cannot reach the directory. Verify that the IPsec tunnel is up and that port 636 is reachable from Memority's network, as required by AUTH1. Confirm that the bindDn value matches the exact DN of the service account in Active Directory, that the secret sync.connectors.prov-activeDirectory.bindPassword has been set in the administrator portal for the affected environment, and that the service account password has not expired, as required by AUTH5.
TLS certificate trust issues
The connector fails with an SSL handshake error or a certificate validation error. If the Active Directory certificate was issued by a custom certification authority, add the Root and Intermediate CA certificates to the groovy.client.rest.http.trustStorePEM setting in System → Settings → Synchronization Service, as required by AUTH2, and verify that the chain is complete. Do not set allowUntrustedSsl to true in production.
Password provisioning failures
Accounts are created without a password, or the provisioning task fails at the password step. Password provisioning requires an SSL binding, with connectionSecurity=ssl on port 636, because Active Directory refuses password changes over a non-secured connection. Verify as well that the service account is allowed to reset user passwords and to force a password change at next logon, as required by AUTH4.
Account status issues
Accounts are not enabled or disabled as expected, or unexpected flags are reset in Active Directory. The generated mapping applies a bitwise operation on userAccountControl to toggle the ACCOUNTDISABLE flag only, without affecting the other flags. If you observe unexpected behavior, check the userAccountControl value read from the directory before the update.
Correlation failures and duplicate accounts
If msSamAccountName is not populated on Memority identities, or if its values do not match the sAMAccountName of the existing Active Directory accounts, the connector will not be able to correlate and will attempt to create a new account instead of linking to the existing one. Before the first provisioning run, use the account discovery task generated by the plugin to identify which Active Directory accounts are already present and which ones are not yet linked to a Memority identity. Run correlation and reconciliation from the discovery results before enabling provisioning for real populations. If the existing naming convention differs from the injected compute rule, adapt that rule and the DN construction rule accordingly.
Note also that the generated connector sets referralStrategy=ignore and declares neither servers nor globalCatalogServers, so in a multi-Domain Forest the accounts located outside the configured baseContext are not reachable until those properties are added manually.
Account discovery returns nothing or times out
Verify that baseContext covers the OUs actually containing the accounts and that the provisioning account can read the schema, as required by CONF2. On large directories, keep the VLV paging strategy and increase connectTimeout if the searches are slow.
Configuration
Connector configuration
To be able to provision or import data from an Active Directory or an LDAP directory, you first need to configure a connector to establish a connection to it.
This chapter gives information about the configuration of the Active Directory & LDAP connector. For general information about connector configuration, see Application Connector.
If your directory is not published on the internet, you first need to request an IPsec tunnel setup to connect to the directory from Memority, as explained in prerequisite AUTH1. More information is available in the Memority Support Portal.
Binding configuration
To configure the connector, define the properties described below.
We strongly recommend that you use settings to define these properties, so that you can change them per environment.
To use a setting in a connector, set the value to settings: followed by the setting identifier.
|
Property |
Description |
Example |
|---|---|---|
|
host |
The FQDN of the server to bind to. |
|
|
port |
The port to bind to, usually 636, or 389 for non-production testing. See the TLS configuration for more information. |
636 |
|
servers (multi-valued) |
List of secondary servers. Their purpose may be:
A server syntax is typically: For a multi-Domain Active Directory Environment, a server syntax is typically: Any configuration parameter (host, port, bindDn, baseContext, and so on) can be overridden in a server definition, with the syntax: Because servers is multi-valued, specify the servers property once for each server.
HTML
|
|
|
bindDn |
The provisioning account DN to use for binding. It must meet prerequisites AUTH3, AUTH4 and AUTH5. |
|
|
bindPassword |
The provisioning account password. Use a secret setting to store it securely. |
*** |
|
baseContext |
Used as base context for all LDAP searches. Objects out of the base context scope cannot be managed, including groups to be assigned to accounts. Use a wide scope and filter it if necessary. |
|
|
connectTimeout |
The TCP connect and read timeouts, in milliseconds. Set to 5000 by default.
|
5000 |
TLS configuration
The connector can be configured with or without TLS. Both options are described below.
TLS is mandatory for production environments.
Active Directory does not allow account password provisioning if the TLS connection is not configured.
Without TLS
To configure the connector, define the properties described below.
To bind to the directory without TLS, port 389 is usually used. The IPsec tunnel must allow connections to port 389.
|
Property |
Description |
Example |
|---|---|---|
|
port |
The port to bind to (usually 389) |
389 |
|
connectionSecurity |
The security used for the binding. In this case, it must be set to none. |
none |
With TLS
To configure the connector, define the properties described below.
To bind to the directory with TLS, port 636 is usually used. The IPsec tunnel must allow connections to port 636.
To authenticate, the connector must be able to validate the TLS certificate chain of the server. If the certificate was issued by a custom certification authority, add the root and intermediate certificates to the Synchronization Service setting groovy.client.rest.http.trustStorePEM.
|
Property |
Description |
Example |
|---|---|---|
|
port |
The port to bind to (usually 636) |
636 |
|
connectionSecurity |
The security used for the binding. In this case, it must be set to ssl. |
ssl |
|
allowUntrustedSsl |
Whether to accept a certificate chain that cannot be validated. Set to false for production environments. |
false |
Custom attributes
The LDAP connector relies on the LDAP schema of the LDAP class configured in the ObjectSchema of the application, for example inetOrgPerson for users. This means that the LDAP connector only sees the LDAP attributes explicitly associated with this class. To read or write other LDAP attributes that are not explicitly associated with the class, configure them with the operationalAttributes property:
|
Property |
Description |
Example |
|---|---|---|
|
operationalAttributes |
The list of attributes complementing the LDAP schema, separated by commas |
objectClass,customAttribute1,customAttribute2 |
Additional search filter
By default, when importing objects into Memority from an LDAP source, the connector searches all LDAP objects of the configured LDAP class under baseContext. This scope may be too wide and return too many entries. To narrow it, you can configure a search filter that the connector adds to every LDAP search:
|
Property |
Description |
Example |
|---|---|---|
|
additionalSearchFilter |
An LDAP filter restricting the objects to retrieve. |
(objectCategory=person) |
The following sections give common examples.
The object filter applies to imports, account discovery tasks and provisioning. Any object outside the scope cannot be managed by the connector, including the groups to be assigned to accounts.
If you want different scopes for provisioning and imports/account discovery, you can use objectIgnoredCondition in application configuration (Object Schema Mapping Definition) or duplicate the connector configuration.
Filter on user accounts only
You can use the following filter on the objectCategory attribute to get only user accounts from an Active Directory.
(objectCategory=person)
Filter on organizational units
You can use the following filter on the msDS-parentdistname attribute to get objects from a specific organizational unit in an Active Directory (it must be specified with its DN).
(msDS-parentdistname=OU=Users,DC=internal,DC=my,DC=com)
Filter on assigned groups
You can use the following filter on the memberOf attribute to get accounts directly assigned to a group in an Active Directory (it must be specified with its DN).
(memberOf=CN=MyApp-User,OU=applications,DC=internal,DC=my,DC=com)
To get any account assigned to the group, even through nested groups, you need to filter on memberOf:1.2.840.113556.1.4.1941: (memberOf:1.2.840.113556.1.4.1941:=CN=MyApp-User,OU=applications,DC=internal,DC=my,DC=com)
Application configuration
To be able to provision or import data from an Active Directory or an LDAP directory, you need to configure a data model mapping.
This chapter gives information about the attribute mapping specific to Active Directory and LDAP. For general information about application configuration, see Application.
Distinguished Name definition
The Distinguished Name (DN) is a mandatory attribute that must be unique in the directory.
The DN attribute is used as the correlation key, so you need to set the target attribute to __NAME__.
The value can be set directly through a simple or custom mapping, but you can also use the built-in constructDnFromRdnOpenAm normalization rule.
The connector handles object moves automatically when the DN changes: no specific action is required.
<attributeMappingDefinition>
<targetAttributeId>__NAME__</targetAttributeId>
<targetAttributeType>STRING</targetAttributeType>
<mandatory>true</mandatory>
<simpleAttributeMappingStrategyDefinition>
<inputAttributeId>id</inputAttributeId>
<normalizeRule class="constructDnFromRdnOpenAm">
<config xsi:type="dmn:ConstructDnFromRdnOpenAmRuleConfigurationType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<baseDn>ou=Users,dc=internal,dc=my,dc=com</baseDn>
<rdnAttributeName>uid</rdnAttributeName>
</config>
</normalizeRule>
</simpleAttributeMappingStrategyDefinition>
<multiValued>false</multiValued>
</attributeMappingDefinition>
Account status
In Active Directory, the account status is managed with the userAccountControl attribute. This attribute is a bit mask that defines the account status and additional information such as password expiration (see UserAccountControl property flags on Microsoft Learn).
To manage the account status, you can set the value according to the enabled status (512 for active accounts, 514 for inactive accounts):
<attributeMappingDefinition>
<targetAttributeId>userAccountControl</targetAttributeId>
<targetAttributeType>INTEGER</targetAttributeType>
<mandatory>true</mandatory>
<secret>false</secret>
<customAttributeMappingStrategyDefinition>
<computeRule>
<script><![CDATA[
return IDM_OBJECT.enabled as Boolean ? "512" : "514"
]]></script>
</computeRule>
<computeRuleAttributeDependencies>
<dependency>enabled</dependency>
</computeRuleAttributeDependencies>
</customAttributeMappingStrategyDefinition>
<multiValued>false</multiValued>
</attributeMappingDefinition>
You can also use a mask computation to enable and disable the account without modifying the other flags:
<attributeMappingDefinition>
<targetAttributeId>userAccountControl</targetAttributeId>
<targetAttributeType>INTEGER</targetAttributeType>
<mandatory>true</mandatory>
<secret>false</secret>
<customAttributeMappingStrategyDefinition>
<computeRule>
<script><![CDATA[
def userAccountControl = SHADOW.userAccountControl as int
def enabled = IDM_OBJECT.enabled as boolean
def disabledMask = 2
def accountEnabled = ((userAccountControl & disabledMask) != disabledMask)
// If account status == memority status, return the userAccountControl as is
if (enabled == accountEnabled) {
LOG.debug("Provisioning AD User - userAccountControl - {} - No status modification", IDM_OBJECT.id)
return userAccountControl
}
// If the account should be disabled, return userAccountControl + disable mask
if (!enabled) {
LOG.debug("Provisioning AD User - userAccountControl - {} - Disable account", IDM_OBJECT.id)
return (userAccountControl | disabledMask)
}
// If the account should be enabled, return userAccountControl - disable mask
if (enabled) {
LOG.debug("Provisioning AD User - userAccountControl - {} - Enable account", IDM_OBJECT.id)
return (userAccountControl ^ disabledMask)
}
]]></script>
</computeRule>
<computeRuleAttributeDependencies>
<dependency>enabled</dependency>
</computeRuleAttributeDependencies>
</customAttributeMappingStrategyDefinition>
<multiValued>false</multiValued>
</attributeMappingDefinition>
Password management
In Active Directory, passwords are managed with the unicodePwd attribute. You can also use the pwdLastSet attribute to force a password change at first logon.
If you want to set the password on account creation only, the WEAK mapping strength alone is not enough, because the connector cannot read the password back from the account. Use a custom mapping that checks whether the account is being created.
You can use the Memority password directly, or a new attribute to generate and store a dedicated password. In the second case, make sure that the attribute definition is secret and encrypted, and use the PASSWORD binding to generate the value.
Set the unicodePwd mapping as secret to hide the password in audit, logs and reports.
Password modification requires an SSL binding, due to Active Directory policies.
<attributeMappingDefinition>
<targetAttributeId>unicodePwd</targetAttributeId>
<targetAttributeType>STRING</targetAttributeType>
<mandatory>false</mandatory>
<secret>true</secret>
<customAttributeMappingStrategyDefinition>
<computeRule>
<script><![CDATA[
if (!SHADOW) {
return IDM_OBJECT.password
}
]]></script>
</computeRule>
<computeRuleAttributeDependencies>
<dependency>password</dependency>
</computeRuleAttributeDependencies>
</customAttributeMappingStrategyDefinition>
<multiValued>false</multiValued>
<mappingStrength>WEAK</mappingStrength>
</attributeMappingDefinition>
<attributeMappingDefinition>
<targetAttributeId>pwdLastSet</targetAttributeId>
<targetAttributeType>INTEGER</targetAttributeType>
<mandatory>false</mandatory>
<secret>false</secret>
<customAttributeMappingStrategyDefinition>
<computeRule>
<script><![CDATA[
// Set the value to 0 to force password modification on first connection
return 0
]]></script>
</computeRule>
<computeRuleAttributeDependencies/>
</customAttributeMappingStrategyDefinition>
<multiValued>false</multiValued>
<mappingStrength>WEAK</mappingStrength>
</attributeMappingDefinition>
Migrating users between Active Directory domains in the same forest
This section describes the configuration of the Memority Active Directory connector that allows you to migrate users from one Active Directory domain to another in the same forest. Only intra-forest migration is currently supported: all domains must belong to the same forest. Inter-forest migration (between several forests) is not supported yet.
In addition, only users can be migrated. Computers and other resources cannot be migrated yet.
The Active Directory domain migration feature therefore has the following limitations:
-
intra-Forest (same Forest)
-
for users only
Prerequisites
Some technical prerequisites are required to migrate users between AD Domains: ADMT and OpenSSH.
ADMT
It is not possible to move a user between Windows Domains with the LDAP protocol, more precisely with the ModifyDNRequest LDAP command specified by RFC 2251. The Active Directory Migration Tool (ADMT) version 3.2 must be used to migrate users between Domains. ADMT also enables you to preserve Domain permissions and user passwords, ensuring “user continuity” during Domain migration.
When users are migrated from a source Domain to a target Domain, ADMT 3.2 must be installed on each target Domain Controller. ADMT does not need to be installed on a source Domain Controller, unless it later becomes a migration target.
This guide does not describe the ADMT installation procedure. Refer to the Microsoft documentation.
OpenSSH
The Memority AD connector executes ADMT remotely on each Domain Controller using the SSH protocol. OpenSSH must therefore be enabled on the Domain Controllers, and its port (usually 22) must be accessible from the Memority AD connector.
OpenSSH is now a standard service of Windows Server. Refer to the Microsoft documentation to enable it.
Memority AD Connector Configuration
The following table lists AD Connector properties pertaining to the AD Domain migration. They come in addition to the AD connector properties described in the previous sections.
Some properties such as host are repeated here, to highlight their specific role regarding the Domain migration.
In this example, a root Domain memority.local has 2 child Domains: child1.memority.local and child2.memority.local.
The Administrator account memority.local\Administrator can manage all Domains of the Forest.
|
Property |
Type |
Description |
Mandatory |
Default Value |
Example |
|---|---|---|---|---|---|
|
host |
string |
A Domain Controller host belonging to the Forest’s root Domain. |
Yes |
N/A |
memority.local |
|
port |
integer |
The port of the Domain Controller host belonging to the Forest’s root Domain. |
No |
389 |
N/A |
|
baseDn |
string |
The Forest root Domain |
Yes |
N/A |
DC=memority,DC=local |
|
bindDn |
string |
The LDAP account used by the AD connector |
Yes |
N/A |
CN=Administrator,CN=Users,DC=memority,DC=local |
|
globalCatalogServers |
multi string |
One or more Forest Global Catalogs. Their syntax is the same as that of servers. |
Yes |
N/A |
host=memority.local;port=3269 |
|
servers |
multi string |
Structured definition of a server in the directory topology. It contains attribute-value pairs that define each individual server. The names of configuration properties can be used, separated by equal signs and semicolons, such as this: The server will be selected for each operation according to the “best matching” |
Yes |
N/A |
baseContext=DC=child1,DC=memority,DC=local;host=child1.memority.local;port=636 baseContext=DC=child2,DC=memority,DC=local;host=child2.memority.local;port=636 |
|
searchWithGlobalCatalog |
boolean |
Whether to use the Global Catalog when searching entries. This does not concern searches by GUID or by DN. |
No |
|
N/A |
|
allowDomainMigration |
boolean |
Whether to allow migration of users between Domains. |
No |
|
N/A |
|
ADMTPath |
string |
The absolute path to admt.exe. Not needed with a standard ADMT install. |
No |
|
C:\Windows\ADMT\admt.exe |
|
keepSameGroupsOnDomainMigration |
boolean |
Whether groups are retained upon Domain migration. |
No |
|
N/A |
|
sshPort |
integer |
The SSH port. |
No |
22 |
N/A |
|
sshAuthenticationMethod |
string |
The SSH authentication method. Possible values: Only |
No |
|
N/A |
|
sshUsername |
string |
The SSH username used to authenticate to the remote Domain Controllers to execute PowerShell commands. If not configured, it is constructed using the LDAP credentials configured in |
No |
<root domain>\<bindDn> |
memority.local\Administrator |
|
sshPassword |
string |
The SSH authentication password. |
No |
Same value as |
N/A |
|
sshKeyExchangeAlgorithms |
multi string |
SSH key exchange algorithms, for example: "ecdh-sha2-nistp521". The advertised key exchange algorithms can be obtained via the command: The possible values are all listed in the “Default Value” column. |
No |
diffie-hellman-group1-sha1 diffie-hellman-group14-sha1 diffie-hellman-group14-sha256 diffie-hellman-group16-sha512 diffie-hellman-group18-sha512 diffie-hellman-group-exchange-sha1 diffie-hellman-group-exchange-sha256 ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 |
ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 |
|
sshKeyAlgorithms |
multi string |
Host SSH key algorithms (aka server key type), for example: "ecdsa-sha2-nistp384" You can get the host key algorithms advertised by a server with the ssh-keyscan -t ecdsa <host> command. The possible values are all listed in the “Default Value” column.
|
No |
ssh-rsa ssh-dss rsa-sha2-512 rsa-sha2-256 ssh-ed25519 ecdsa-sha2-nistp521
|
ecdsa-sha2-nistp384 |
AD/LDAP connector: failover between Domain Controllers
This page explains how the AD/LDAP connector chooses an LDAP server, and how it fails over to another server when a server is down. It also explains how to configure failover for a multi-domain Active Directory.
Overview
Several LDAP servers can be declared in one connector, for example the domain controllers (DCs) of an Active Directory. Each server has a base context: the root DN of the directory part it serves. In a multi-domain Active Directory, the base context of a DC is the DN of its domain, for example DC=EMEA,DC=example,DC=com.
The connector groups the servers by base context. Each group is a failover group. In a multi-domain Active Directory, one failover group is one domain.
For each operation, the connector:
-
Selects the failover group whose base context best matches the DN of the operation.
-
Sends the operation to the active server of this group.
-
If this server cannot be reached, sends the operation to another server of the same group.
The connector never fails over to a server of another group. A DC of domain A cannot serve the entries of domain B, so this would only cause errors.
How the connector selects a server
Selection of the failover group
The connector compares the DN of the operation (the entry’s DN, or the base DN of a search) with the base context of each group. It selects the group with the most specific match.
Example with two groups, DC=example,DC=com and DC=ACME,DC=example,DC=com:
|
DN of the operation |
Selected group |
|---|---|
|
|
|
|
|
|
|
|
|
The comparison ignores the case, as Active Directory does. For example, DC=ACME,DC=example,DC=com and dc=acme,dc=example,dc=com are the same base context, so the servers declared with these two values belong to the same group.
Primary server and failover
In each group, the first configured server is the primary server. The other servers are secondary servers.
-
At startup, the connector uses the primary server of each group.
-
Before each operation, the connector checks that the active server of the group is reachable. It opens a TCP connection to the server, with a timeout of
connectTimeout. -
If the active server is not reachable, the connector selects the first reachable server of the group, in configuration order. This server becomes the active server of the group.
-
If no server of the group is reachable, the operation fails.
The failover of one group has no effect on the other groups. For example, if a DC of domain ACME is down, the connector still uses the primary DCs of the other domains.
Switch back to the primary server
A background task checks the primary server of each group at a fixed period (availabilityCheckPeriodMs, default 30 seconds). When a primary server is reachable again after a failover, the connector uses it again for its group.
There is no background task for a group that has only one server, because no failover can occur in this group.
Configuration
Connector properties
|
Property |
Default |
Description |
|---|---|---|
|
|
|
The main server. It is always the first server of the group of |
|
|
empty |
The additional servers. One entry per server. See Format of a server entry. |
|
|
|
Timeout (in ms) to connect to a server. It is also the timeout of each LDAP operation. See Choose the timeouts. |
|
|
|
Period (in ms) of the check of the primary servers, to switch back to them after a failover. |
|
|
|
Maximum time (in ms) a connection to a server can stay idle and still be reused. After this time, the connector closes the connection and opens a new one. See Firewalls and idle connections. |
Format of a server entry
A server entry is a list of name=value pairs, separated by semicolons. The names are the names of the connector properties:
host=dc1.acme.example.com; port=636; connectionSecurity=ssl; baseContext=DC=ACME,DC=example,DC=com
A property that is not in the entry takes the main value of the connector property. For example, an entry without bindDn uses the high-level bindDn of the connector.
Important: an entry without
baseContexttakes the mainbaseContextof the connector. Always setbaseContextin the entries of a multi-domain configuration. Otherwise, the server joins the group of the main domain.
The order of the entries matters: in each group, the first server is the primary server.
Example: three domains with two DCs each
The forest has three domains: example.com (root), ACME and STARK. Each domain has two DCs. dc1 is the preferred DC of each domain.
Connector properties:
|
Property |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Entries of the servers property:
host=dc2.example.com; baseContext=DC=example,DC=com
host=dc1.acme.example.com; baseContext=DC=ACME,DC=example,DC=com
host=dc2.acme.example.com; baseContext=DC=ACME,DC=example,DC=com
host=dc1.stark.example.com; baseContext=DC=STARK,DC=example,DC=com
host=dc2.stark.example.com; baseContext=DC=STARK,DC=example,DC=com
The entries do not set port and connectionSecurity, so they use 636 and ssl from the connector properties.
Resulting failover groups:
|
Group (base context) |
Primary server |
Secondary server |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
If dc1.acme.example.com is down, the connector sends the operations on ACME entries to dc2.acme.example.com. The operations on the root domain and on STARK still go to their primary DCs. When dc1.acme.example.com is back, the connector uses it again within 30 seconds.
Choose the timeouts
connectTimeout has two uses:
-
The timeout to connect to a server. The connector detects that a server is down after this time at most.
-
The timeout of each LDAP operation.
A high value (for example 2 minutes) delays the failover: each operation waits up to connectTimeout before the connector tries the next server. A low value can cause timeouts on long operations, for example a search on many entries.
Recommendation: start with 10 to 30 seconds. Increase the value only if long operations fail with a timeout.
Firewalls and idle connections
The connector keeps one open connection per server and reuses it. A firewall between Memority and the LDAP servers can silently drop a connection that stays idle for too long. The connector does not know that the connection is dropped. A request sent on this connection never gets a response, and it fails after the timeout with one of these errors:
-
ERR_04170_TIMEOUT_OCCURED -
ERR_04169_RESPONSE_QUEUE_EMPTIED
To prevent this, set maxConnectionIdleTimeMs below the idle timeout of the firewall. When a connection is idle for longer than this value, the connector closes it and opens a new one before the next operation.
Example: the firewall idle timeout is 1 hour. Set maxConnectionIdleTimeMs to 1800000 (30 minutes).
Ask the network team of the customer for the idle timeout of the firewalls between Memority and the LDAP servers.
Troubleshooting
|
Symptom |
Cause |
Action |
|---|---|---|
|
|
No server of the group is reachable. |
Check the network access from SYNC to the servers of this domain, and the host names and ports. |
|
A domain has no failover: operations fail when its first DC is down. |
The domain has only one server in its group. |
Check the |
|
A DC is in the group of the main domain instead of its own domain. |
Its entry has no |
Set |
|
Operations fail with |
A firewall dropped the idle connection. |
Set |
|
The failover takes a long time. |
|
Decrease |
Known limitations
-
The connector detects that a server is down only when the server refuses the TCP connection, or does not accept it within
connectTimeout. A server that accepts the connection but does not answer LDAP requests is not detected as down. -
After an operation timeout, the connector does not immediately retry the operation on another server; the operation fails. However, if a retry policy is configured on the Connector, the operation will be retried later
-
Servers found in LDAP referrals do not belong to any failover group. The connector does not fail over for them.
Connector Properties Reference
This page lists the configuration properties of the LDAP and Active Directory connectors.
-
Common options apply to both the LDAP connector and the Active Directory connector.
-
LDAP options apply only to the LDAP connector.
-
Active Directory options apply only to the Active Directory connector.
Some default values depend on the connector type. In that case, the table shows the LDAP value and the AD value.
Common options (LDAP and Active Directory)
|
Property |
Type |
Description |
Mandatory |
Default Value |
Example |
|---|---|---|---|---|---|
|
|
String |
Host name or IP address of the LDAP server. With several servers per base context, this is the primary host: the connector switches back to it when it is available again after a failover. |
Yes |
– |
|
|
|
int |
Port of the LDAP server. Must be between 0 and 65535. The default does not change when |
No |
|
|
|
|
String |
Method used to secure the connection. Values: |
No |
none (plain LDAP) |
|
|
|
String |
Standard name of the SSL protocol, used to create the |
No |
JVM default |
|
|
|
String[] |
Security protocols accepted during protocol negotiation (set on the |
No |
JVM default |
|
|
|
String[] |
Cipher suites accepted during the TLS handshake. |
No |
JVM default |
|
|
|
boolean |
If |
No |
|
|
|
|
String |
Authentication mechanism. Values: |
No |
|
|
|
|
String |
DN used to bind to the LDAP server. |
No (needed for an authenticated bind) |
– |
|
|
|
String |
Password used to bind to the LDAP server. The usage of a Secret Setting is strongly recommended. |
No (needed for an authenticated bind) |
– |
|
|
|
long |
Timeout to connect to the LDAP server, in milliseconds. This parameter applies to both the “connect” and “read” timeouts. |
No |
|
|
|
|
int |
Maximum number of attempts to get an entry or to retry an operation. Used in replicated topologies (failover to another server), when following referrals, and in similar cases. |
No |
|
|
|
|
String (DN) |
Base DN. |
Yes |
– |
|
|
|
String[] |
Additional servers of the directory topology. One line per server, with |
No |
– |
|
|
|
String |
How LDAP referrals are handled. Values: |
No |
|
|
|
|
String |
Name of the attribute that stores the password. |
No |
LDAP: |
|
|
|
String |
Hash the password with this algorithm before it is sent to the server. Values: |
No |
– (no hashing) |
|
|
|
String |
How the password is read. |
No |
|
|
|
|
String |
Paging mechanism used for searches. Values: For Active Directory |
No |
|
|
|
|
int |
Number of entries in one page. Used when the request does not give a page size. |
No |
|
|
|
|
String |
Attribute used to sort VLV searches when no sort attribute is given. Can be a comma-separated list: the first attribute found in the object class is used. |
No |
LDAP: |
|
|
|
String |
Ordering rule for VLV searches. Some servers require it. |
No |
– |
|
|
|
String |
This attribute should not be configured in most cases, except for “exotic” directories. Attribute used as the ConnId |
No |
LDAP: |
|
|
|
String[] |
Operational attributes that the connector tries to return for each entry, for all object classes. |
No |
empty |
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
Accept attributes that are not defined in the schema. They are handled as single-value strings. |
No |
|
|
|
|
String |
Use the Permissive Modify control for modify operations. Values: |
No |
|
|
|
|
String |
Use the Tree Delete control for delete operations. It allows the deletion of non-leaf entries, so it can be dangerous. Values: |
No |
|
|
|
|
String |
Strategy for live synchronization. Values: |
No |
LDAP: |
|
|
|
String (DN) |
Only changes under this DN are accepted during synchronization. If empty, all DNs are accepted. |
No |
– (all DNs) |
|
|
|
String[] |
Only these object classes are accepted during synchronization. If empty, all object classes are accepted. |
No |
empty (all) |
|
|
|
String[] |
Only these attributes are passed during synchronization. If empty, all non-operational attributes are passed. |
No |
empty (all) |
|
|
|
String[] |
Changes made by these modifier DNs are ignored during synchronization (for example the connector's own account, to avoid loops). |
No |
empty |
|
|
|
int |
Number of change log entries fetched in one request. |
No |
|
|
|
|
String |
Attribute that holds the unique identifier of a change in the change log. |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
Run extra tests during the test connection operation. Useful for connector developers or for troubleshooting. |
No |
|
|
|
|
String |
How timestamps are presented to the client. Values: |
No |
|
|
|
|
boolean |
Add an explicit |
No |
|
|
|
|
boolean |
Use a more tolerant algorithm to detect structural and auxiliary object classes. |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
String |
"Run as" feature: run operations under another identity than the configured one. Values: |
No |
|
|
|
|
String |
LDAP filter added to all search operations. |
No |
– |
|
|
|
String |
Default search scope. Values: |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
long |
Interval, in milliseconds, between availability checks of the primary host of each base context (the first configured host). The connector switches back to the primary host when it is available again. |
No |
|
|
|
|
boolean |
Check that a connection is valid when it is taken from the connection pool. This can reduce performance. |
No |
|
|
|
|
long |
Maximum time, in milliseconds, that a connection can stay idle before it is reused. An older connection is closed and a new one is opened, because a firewall may have silently dropped it. Set it below the idle timeout of the firewalls. |
No |
|
|
LDAP options
|
Property |
Type |
Description |
Mandatory |
Default Value |
Example |
|---|---|---|---|---|---|
|
|
String |
How account lockouts are handled. Values: |
No |
|
|
|
|
String (DN) |
DN of the OpenLDAP access log. Used to detect deletions when |
No (Yes if |
– |
|
|
|
String |
Additional search filter for delete events in the OpenLDAP access log. The base filter is |
No |
– |
|
|
|
String[] |
Attributes that support language tags (RFC 3866). They are exposed as maps in the schema, to match the |
No |
– |
|
|
|
boolean |
If |
No |
|
|
Active Directory options
|
Property |
Type |
Description |
Mandatory |
Default Value |
Example |
|---|---|---|---|---|---|
|
|
String |
Object class used for user accounts. |
No |
|
|
|
|
String |
Object class used for groups. |
No |
|
|
|
|
String |
Attribute of a group that holds its members. |
No |
|
|
|
|
String[] |
Global Catalog servers. Same format as |
No |
|
|
|
|
String |
How the Global Catalog is used. |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
Use the Global Catalog for searches. Does not apply to searches by GUID or by DN. |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
Add attributes that AD accepts but does not declare in its schema (for example |
No |
|
|
|
|
boolean |
Add an explicit |
No |
|
|
|
|
boolean |
Add the default object category (read from the schema) to all created objects. Works only if |
No |
|
|
|
|
boolean |
If |
No |
|
|
|
|
boolean |
Allow the migration of users between domains. ADMT must be installed on each target domain controller. |
No |
|
|
|
|
String |
Domain migration: absolute path to |
No |
|
|
|
|
boolean |
Inter-forest migration: add the |
No |
|
|
|
|
boolean |
Inter-forest migration: set the password of the new user to the password of the source user. Requires "Password Export Server" on the source domain. Intra-forest migration always keeps the password. |
No |
|
|
|
|
boolean |
Domain migration: the new user gets the same group memberships as the source user. |
No |
|
|
|
|
String |
Inter-forest migration: what happens to the source user. Values: |
No |
|
|
|
|
String |
SSH user name used to run PowerShell commands on the remote domain controllers. |
No |
Derived from |
|
|
|
int |
SSH port of the domain controllers. |
No |
|
|
|
|
String[] |
SSH host key fingerprints, one per target domain controller. Format: |
No |
empty |
|
|
|
boolean |
Do not verify the SSH host key. For tests only. |
No |
|
|
|
|
String |
SSH authentication method. Values: |
No |
|
|
|
|
GuardedString |
SSH password. Used when |
No |
|
|
|
|
String |
SSH client public key. Used when |
No (Yes if |
– |
|
|
|
GuardedString |
SSH client private key. Used when |
No (Yes if |
– |
|
|
|
String |
SSH client key type. |
No |
|
|
|
|
String[] |
SSH key exchange algorithms. List the supported ones with |
No |
SSH library default |
|
|
|
String[] |
SSH host key algorithms. List the advertised ones with |
No |
SSH library default |
|