When running the Authentication Test under Admin > System > Authentication for the Authentication Source associated with the AD Account Collector configured with UseSSL set to Yes, the test authentication fails with the following failure message:
Connection could not be established with the directory server with username:{BindDN}
SUCCESS: Authentication Module:MyADAccountAuthenticator. JAAS Configuration found.
JAAS configuration Information:
Login Module Name: com.aveksa.server.authentication.AveksaJndiLoginModule
Options: {BindPassword=********, AccountBaseDN=OU=US,OU=vcloud Users,DC=2k8r2-vcloud,DC=local,
SearchFilterForAccounts=, jboss.security.security_domain=MyADAccountAuthenticator, AuthAccountAttribute=,
ConnectionUrl=ldaps://2k8r2-dc1.2k8r2-vcloud.local:636, UseSSL=Yes, AccountSearchScope=2,
BindDn=administrator@2k8r2-vcloud.local, AccountSearchAttribute=sAMAccountName}
Control Flag: LoginModuleControlFlag: required
Unable to Login User: cblossom
ERROR: Connection could not be established with the directory server with username: administrator@2k8r2-vcloud.local
02/14/2020 16:57:14.800 INFO (default task-20) [com.aveksa.server.authentication.AuthenticationProviderServiceImpl]
javax.security.auth.login.LoginException: Connection could not be established with the directory server with username:
administrator@2k8r2-vcloud.local
Note that a server restart is required for any changes to the authentication configuration.
Login as the root user.
# cp /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/lib/security/cacerts /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/lib/security/cacerts.bak # keytool -import -trustcacerts -alias AD -file /tmp/ad.cer -storepass changeit -keystore /usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/jre/lib/security/cacerts Owner: CN=2k8r2-vcloud-2K8R2-DC1-CA, DC=2k8r2-vcloud, DC=local Issuer: CN=2k8r2-vcloud-2K8R2-DC1-CA, DC=2k8r2-vcloud, DC=local Serial number: 3fd7f1cb1573b59348706aef0576de6f Valid from: Thu Jun 13 15:07:36 EDT 2013 until: Wed Jun 13 15:17:35 EDT 2018 Certificate fingerprints: MD5: BE:78:02:3E:87:99:55:13:81:5A:4F:14:C4:6A:CB:E2 SHA1: 1C:6E:2F:BA:47:C6:25:82:4B:F3:16:42:1F:0C:1D:72:19:42:04:05 SHA256: 8A:03:A5:77:BA:18:9F:56:45:ED:5F:10:CD:42:5C:48:7E:13:20:32:38:14:F2:B1:DE:77:F3:41:C7:56:2E:49 Signature algorithm name: SHA1withRSA Version: 3 Extensions: #1: ObjectId: 1.3.6.1.4.1.311.21.1 Criticality=false 0000: 02 01 00 ... #2: ObjectId: 2.5.29.19 Criticality=true BasicConstraints:[ CA:true PathLen:2147483647 ] #3: ObjectId: 2.5.29.15 Criticality=false KeyUsage [ DigitalSignature Key_CertSign Crl_Sign ] #4: ObjectId: 2.5.29.14 Criticality=false SubjectKeyIdentifier [ KeyIdentifier [ 0000: DF 43 D2 E9 D3 60 1C 41 8C AE 64 86 0F A8 8C 7F .C...`.A..d..... 0010: 7E 4B 2D A8 .K-. ] ] Trust this certificate? [no]: yes Certificate was added to keystore acm-700:~ # acm restart
Image description
Note that if the connection information defined for the authentication source is different from that defined for the collector, it is possible for a connection failure to be limited to only the authentication component.
The failure message:
Connection could not be established with the directory server with username:{BindDN}
pertains specifically to the initial bind connection attempted using the bind information provided on the Edit Authentication Source configuration screen, and if this connection fails, no attempt is actually made to bind with the test user.
The BindDN accepts any format for the username that is accepted over LDAP. Note that if the name contains spaces, the name should be quoted, and if it contains special characters, they should be escaped. For example:
username@domain.com
domain\user
CN=user,DC=domain,DC=com
'CN=user name, DC=domain, DC=com'
'CN=user\, name,DC=domain,DC=com'