We've been through THIS process to create an SSL and Root Certificate and installed them on the server and that does not seem to have made any difference.
We have also checked that there is no certificate in the Service, Active Directory Domain Services Personal Store (as there have been references that we have come across where people simply had to remove a certificate from there to get things working); there is no certificate there.
We have tried creating the UseHostnameAsAlias registry key (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ldap) and set it to 1, but that only seems to cause another error (if you connect by server name; the error above is what you get if you try to connect by FQDN):
Our Primary DC is a Server 2008 R2 box, we have a secondary that's 2012 R2 and a further 3 at remote sites and 2 in Azure (don't know if this would make any difference at all, but thought it worth mentioning).
Also, one way you can always verify if you don't completely trust what the application is telling you is to do a network capture.
Kyle Aquini
ASKER
I think I'll be trying that now as we are getting an issue when using a custom Java Application:
Logging in using ldap on port 389 works fine and returns a successful verification with a domain user account.
Logging in using ldaps on port 636 results in an SSLHandShakeException because the certificate cannot be verified. This is when using a certificate generated by the process noted in my original post.
Is there a way that you can force ldap to use a specific certificate for server authentication or does it select one from what is available (each of the DCs have several certificate, several either including or specifically for server Authentication)?
If you're using a self-signed certificate, then it has to be installed on the client trusted root certification authorities store as well. I can't remember if Java uses it's own store or not.
If you have the certificate in the NTDS certificate store, it should be used over any other certificates (with server authentication purpose) in the Local Machine store.
Here's how to put certificate in the NTDS (AD DS) store (copied from https://technet.microsoft.com/en-us/library/dd941846(WS.10).aspx):
To import a certificate into the AD DS personal store
1.Open a command prompt as an administrator. To open a command prompt as an administrator, click Start. In Start Search, type Command Prompt. At the top of the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
2.To open Microsoft Management Console (MMC), type mmc, and then press ENTER.
3.Click File, click Add/Remove Snap-in, select Certificates from the available snap-ins, and then click Add.
4.In Add or Remove Snap-ins, click Service account to view the certificates that are stored in the service's personal store, and then click Next.
5.In Add or Remove Snap-ins, click Local computer, and then click Next.
6.In Add or Remove Snap-ins, click Active Directory Domain Services, click Finish, and then click OK.
7.In the console tree, expand Certificates - Service (Active Directory Domain Services), expand Personal, and then expand Certificates.
8.To import a certificate, right-click the NTDS\Personal folder, click All Tasks, and then click Import. When the certificate is imported, client computers should be able to make SSL connections to all domain controllers in the forest.
Kyle Aquini
ASKER
Hi footech,
Just to update; we have it all working now (it broke briefly after a while and then removed the cert from the ADDS store and it jumped back into life!)
Fantastic; I feel like a tit now!
Thank you very much,
Kyle