uCosminexus Application Server, Security Management Guide
This section describes the settings when Active Directory is used as the LDAP directory server.
When the integrated user management framework library is used to register users to the user information repository and update the user information (including user passwords), it is necessary to set the Active Directory environment and register the certificate that enables connections over SSL.
The following table shows the settings when Active Directory is used as the LDAP directory server. The settings depend on the user authentication method being used.
Table 5-16 List of settings when using Active Directory
| Setting | Password authentication | Change password and add/change user | Client authentication (X509 certificate) | |
|---|---|---|---|---|
| jaas.conf | Specify the necessary login module/ | R | R | R |
| Specify the login module option/ | O | R | -- | |
| ua.conf | Specify the user identifying attribute/ | R | R | R |
| Specify the attribute name used as the user ID in the DN/ | -- | -- | R | |
| Specify the password attribute/ | R | R | -- | |
| Specify the type of LDAP directory server/ | R | R | -- | |
| Convert the DN containing 2-byte characters such as Japanese/ | O | O | O | |
| Change the URL protocol/ | O | R | O | |
| Connections over SSL | O | R | O | |
The methods used to set the Active Directory environment and register the certificate that enables connections over SSL are as follows.
The object class and attributes of the users managed in Active Directory are different from those managed in other LDAP directory servers. When the integrated user management framework library is used, use the user object class and specify the cn, unicodePwd, sAMAccountName, and userAccountControl attributes to create that user.
Assign the security account manager (SAM) account name to sAMAccountName. Generally, the account name is the same value as the user ID.
Assign the user account property flag to userAccountControl. To create the general user entry, assign 512. Note that users cannot be created when the minimum password length is set to one character in the security policy of the server on which Active Directory is installed. Take either of the following measures so that user entries can be created.
Change the minimum password length to zero or more characters in the security policy and then assign 512 to userAccountControl.
Assign 544 to userAccountControl without changing the minimum password length in the security policy.
The settings in jaas.conf are as follows.
Specify WebPasswordLDAPLoginModule when password authentication is used. To use client certificates, specify WebCertificateLoginModule.
Assign ldap.w to the WebPasswordLDAPLoginModule option. Or, assign sso.ldap.w when single sign-on is used.
The settings in ua.conf are as follows.
Assign cn (full user name) or sAMAccountName to the user identifying attribute.
The setup examples are as follows:
com.cosminexus.admin.auth.ldap.attr.userid.0=cn
com.cosminexus.admin.auth.ldap.attr.userid.0=sAMAccountName
When the user identifying attribute is set to sAMAccountName, it is necessary to search repository user entries (RDN). The following is the setting example of properties needed for the search.
java.naming.security.principal.0=cn=Administrator,cn=Users,dc=cosminexus,dc=com java.naming.security.credentials.0=adminpassword com.cosminexus.admin.auth.ldap.search.userrdn.0=true com.cosminexus.admin.auth.ldap.search.scope.0=onelevel
When the user identifying attribute is set to sAMAccountName, it is not possible to use the addUserData (String uid, UserData userData) method of the LdapUserDataManager class. To add users, use the addUserData (String uid, UserData userData, String name, String value) method and assign cn to the attribute name argument (String name).
When client certificates are used, disassemble the DNs stored in the client certificates (requesting user's distinguished names in the client certificates) and set the attribute names used as the user IDs. The setup example is as follows:
com.cosminexus.admin.auth.ldap.certificate.attr.userid.0=cn
The above attribute name is different from the user identifying attribute specified in (a) Specifying the user identifying attribute.
Assign unicodePwd to the password attribute. The setup example is as follows:
com.cosminexus.admin.auth.ldap.attr.password.0=unicodePwd
Add a line that specifies AD as the type of destination LDAP directory server. The following is an example of when the LDAP number is 0.
com.cosminexus.admin.auth.ldap.directory.kind.0=AD
When the DN containing two-byte characters such as Japanese characters is set to the following ua.conf parameters, use the native2ascii command to convert it to Unicode.
The following is the executable form of the native2ascii command.
Cosminexus installation directory\jdk\bin\native2ascii pre-converted ua.conf file converted ua.conf file |
Use the converted ua.conf file as the integrated user management configuration file.
An example of code conversion is as follows.
java.naming.security.principal.0=cn=Administrator,cn= |
native2ascii ua0.conf ua.conf
Specify ldaps as the URL protocol of the destination LDAP directory server. The setup example is as follows. Note that the port number can be omitted.
Register the certificate to establish SSL communication between the J2EE server and Active Directory. The following describes how to register the certificate.
keytool -import -alias cakey -file C:\temp\cacer.cer -trustcacerts -keystore "Cosminexus installation directory\jdk\jre\lib\security\cacerts"
/opt/Cosminexus/jdk/bin/keytool -import -alias cakey -file /tmp/cacer.cer -trustcacerts -keystore /opt/Cosminexus/jdk/jre/lib/security/cacerts
If the J2EE server is running when registering the certificate by using keytool, restart the J2EE server.
Please note:
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd