| Back | Main view

External directory synchronization and authentication using ActiveDirectory plugin

Product:IMiS/ARChive
Release:Since 9.7.1610
Date:06/11/2021

Case: ActiveDirectory plugin is used for synchronization and authentication using Microsoft Active Directory service. In this article we represent an example how to configure plugin for user/group synchronization and authentication using Microsoft AD.

Description:

IMiS ARChive server can be configured to use Microsoft Active Directory as external service for synchronization users and groups. Synchronized users can also use Microsoft AD for authentication to the IMiS ARChive server using either LDAP or Kerberos authentication methods. ActiveDirectory plugin uses mapping between IMiS ARChive directory and Microsoft AD attributes.

Mappings between IMiS ARChive Server 10.1.2010 fields and Microsoft AD attributes:
XML is used for plugin configuration. Configuration tags are grouped together by its purpose.

Package configuration:
ActiveDirectory related configuration:
LDAP configuration:
SSL/TLS configuration:
Kerberos configuration:
Plugin configuration example 1: ActiveDirectory plugin is used for synchronization with one AD server, using DIGEST-MD5 authentication type. User and group synchronization is done from one DN, account and alias override is enabled. "sAMAccountName" attribute is mapped to "sys:dir:Account", "userPrincipalName" and "distinguishedName" attributes are mapped to "sys:dir:Aliases" (this is done for users and groups because "scope" attribute is not present). LDAP query for authentication filter defines, that user can authenticate using email, account name or "distinguishedName" value from aliases. Plugin also uses Kerberos configuration which means that user can authenticate to IMiS ARChive server using Kerberos single sing on.

<Arguments>
  <Class>com.imis.imisarc.server.aaa.impl.ActiveDirectory</Class>
  <LdapURL>ldap://ad.server.company.com</LdapURL>
  <LdapUsername>query-ldap-username</LdapUsername>
  <LdapPassword>username-password</LdapPassword>
  <LdapAuthenticationType>DIGEST-MD5</LdapAuthenticationType>
  <LdapBaseDN>DC=company,DC=com</LdapBaseDN>
  <LdapUserDN>OU=Users</LdapUserDN>
  <LdapGroupDN>OU=Groups</LdapGroupDN>
  <LdapUserObjectFilter>(objectClass=user)</LdapUserObjectFilter>
  <LdapGroupObjectFilter>(objectClass=group)</LdapGroupObjectFilter>
 <LdapAuthenticationFilter>(&amp;(objectCategory=person)(objectClass=user)(|(userPrincipalName=%s)(mail=%s)(sAMAccountName=%s)))</LdapAuthenticationFilter>
  <KrbServicePrincipal>IARC/server-host.company.com@COMPANY.COM</KrbServicePrincipal>
  <KrbKeytabLocation>/iarc/work/iarc-server.keytab</KrbKeytabLocation>
  <AccountAliasList>sAMAccountName,userPrincipalName,distinguishedName</AccountAliasList>
</<Arguments>

Plugin configuration example 2: ActiveDirectory plugin is used for synchronization with main AD server and fallback server, using DIGEST-MD5 authentication type. User and group synchronization is done from 3 DN scopes, account and alias override is enabled (different configuration for user and groups). All timeouts are set to 60 seconds, LDAP page size is set to 50 hits per page. Plugin uses internal server certificate store for LDAPS connection, secure protocol is limited to TLS. Base DN is omitted, therefore user and group DN contains full DN. The same filter is used for all user and group scopes so only 1 "<LdapUserObjectFilter>" and "<LdapGroupObjectFilter>" is defined.

<Arguments>
  <Class>com.imis.imisarc.server.aaa.impl.ActiveDirectory</Class>
  <LdapURL>ldaps://ad.main.server.company.com</LdapURL>
  <LdapURL>ldaps://ad.fallback.server.company.com</LdapURL>
  <LdapUsername>query-ldap-username</LdapUsername>
  <LdapPassword>ldap-username-password</LdapPassword>
  <LdapAuthenticationType>DIGEST-MD5</LdapAuthenticationType>
  <LdapUserDN>OU=Users1,DC=company,DC=com</LdapUserDN>
  <LdapUserDN>OU=Users2,DC=company,DC=com</LdapUserDN>
  <LdapUserDN>OU=Users3,DC=company,DC=com</LdapUserDN>
  <LdapGroupDN>OU=Groups1,DC=company,DC=com</LdapGroupDN>
  <LdapGroupDN>OU=Groups2,DC=company,DC=com</LdapGroupDN>
  <LdapGroupDN>OU=Groups3,DC=company,DC=com</LdapGroupDN>
  <LdapUserObjectFilter>(objectClass=user)</LdapUserObjectFilter>
  <LdapGroupObjectFilter>(objectClass=group)</LdapGroupObjectFilter>
  <LdapAuthenticationFilter>(&amp;(objectCategory=person)(objectClass=user)(|(userPrincipalName=%s)(mail=%s)(sAMAccountName=%s)))</LdapAuthenticationFilter>
  <LdapReadTimeout>60000</LdapReadTimeout>
  <LdapQueryTimeout>60000</LdapQueryTimeout>
  <LdapConnectTimeout>60000</LdapConnectTimeout>
  <LdapPageSize>50</LdapPageSize>
  <SSLTSType>IAKS</SSLTSType>
  <SSLProtocols>TLS</SSLProtocols>
  <KrbServicePrincipal>IARC/server-host.company.com@COMPANY.COM</KrbServicePrincipal>
  <KrbKeytabLocation>/iarc/work/iarc-server.keytab</KrbKeytabLocation>
  <AccountAliasList scope="user">sAMAccountName,userPrincipalName</AccountAliasList>
  <AccountAliasList scope="group">sAMAccountName,distinguishedName</AccountAliasList>
</Arguments>

Plugin configuration example 3: This example demonstrates how to configure different query filters for different user and group scopes. Users from scope "OU=Users1,DC=company,DC=com" will be synchronized if its attribute "sAMAccountName" starts with letter 'a' or 'A', synchronized users can authenticate with alias, which is mapped from attribute "userPrincipalName". Users from scope "OU=Users2,DC=company,DC=com" will be synchronized if its attribute "sAMAccountName" starts with letter 'b' or 'B', they can authenticate with its email address. Users from scope "OU=Users3,DC=company,DC=com" will be synchronized if its attribute "sAMAccountName" starts with letter 'c' or 'C', synchronized users can authenticate with its account name. The same behavior is for group synchronization except that used attribute is "cn".

<Arguments>
...
  <LdapUserDN>OU=Users1,DC=company,DC=com</LdapUserDN>
  <LdapUserDN>OU=Users2,DC=company,DC=com</LdapUserDN>
  <LdapUserDN>OU=Users3,DC=company,DC=com</LdapUserDN>
  <LdapGroupDN>OU=Groups1,DC=company,DC=com</LdapGroupDN>
  <LdapGroupDN>OU=Groups2,DC=company,DC=com</LdapGroupDN>
  <LdapGroupDN>OU=Groups3,DC=company,DC=com</LdapGroupDN>
  <LdapUserObjectFilter>(&amp;(objectClass=user)(objectCategory=person)(sAMAccountName=a*))</LdapUserObjectFilter>
  <LdapUserObjectFilter>(&amp;(objectClass=user)(objectCategory=person)(sAMAccountName=b*))</LdapUserObjectFilter>
  <LdapUserObjectFilter>(&amp;(objectClass=user)(objectCategory=person)(sAMAccountName=c*))</LdapUserObjectFilter>
  <LdapGroupObjectFilter>(&amp;(objectClass=group)(cn=i*))</LdapGroupObjectFilter>
  <LdapGroupObjectFilter>(&amp;(objectClass=group)(cn=j*))</LdapGroupObjectFilter>
  <LdapGroupObjectFilter>(&amp;(objectClass=group)(cn=k*))</LdapGroupObjectFilter>
  <LdapAuthenticationFilter>(&amp;(objectCategory=person)(objectClass=user)(userPrincipalName=%s))</LdapAuthenticationFilter>
  <LdapAuthenticationFilter>(&amp;(objectCategory=person)(objectClass=user)(mail=%s))</LdapAuthenticationFilter>
  <LdapAuthenticationFilter>(&amp;(objectCategory=person)(objectClass=user)(sAMAccountName=%s))</LdapAuthenticationFilter>
  <AccountAliasList scope="user">sAMAccountName,userPrincipalName</AccountAliasList>
...
</Arguments>


Related Documents:

https://docs.microsoft.com/en-us/windows-server/security/kerberos/kerberos-authentication-overview
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/3c5916a9-f1a0-429d-b937-f8fe672d777c
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-ADLS/%5bMS-ADLS%5d.pdf
https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/useraccountcontrol-manipulate-account-properties
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adls/eb73820d-907a-49a5-a6f3-1847f86629b4
https://en.wikipedia.org/wiki/Pre-shared_key
https://docs.oracle.com/javase/tutorial/jndi/newstuff/readtimeout.html
https://docs.oracle.com/cd/E19509-01/820-3503/ggffo/index.html
https://docs.oracle.com/cd/E19509-01/820-3503/6nf1il6er/index.html
https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext
https://docs.oracle.com/cd/E21455_01/common/tutorials/kerberos_principal.html
https://web.mit.edu/kerberos/krb5-devel/doc/basic/keytab_def.html
https://bugs.openjdk.java.net/browse/JDK-8078439
https://bugs.openjdk.java.net/browse/JDK-8048194
https://docs.oracle.com/javase/7/docs/technotes/guides/security/jgss/tutorials/Troubleshooting.html
https://ldapwiki.com/wiki/LDAP%20Query%20Examples
https://en.wikipedia.org/wiki/Single_sign-on

| Back | Main view