Hi, dnsmichi. Thanks for the reply. Here are the configuration for LDAP and the result of openssl:
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'Active Directory'
host: 'dc1.mydomain.company.com'
port: 636
uid: 'sAMAccountName'
encryption: 'simple_tls'
bind_dn: 'CN=gitlab,OU=GitLabCom,OU=Special Users,DC=mydomain,DC=company,DC=com'
password: 'mypassword'
active_directory: true
verify_certificates: true
tls_options:
ca_file: /usr/local/share/ca-certificates/dc1_cert.pem
ssl_version: 'TLSv1'
allow_username_or_email_login: false
block_auto_created_users: false
base: 'OU=Users,OU=Internal,DC=mydomain,DC=company,DC=com'
setting verifiy_certificates to false makes it work immediately and and TLS 1.0 is negociated.
openssl says:
CONNECTED(00000003)
depth=0
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
0 s:
i:/DC=COM/DC=COMPANY/DC=MYDOMAIN/CN=CompanyCA
---
Server certificate
-----BEGIN CERTIFICATE-----
*thecertificate - removed*
-----END CERTIFICATE-----
subject=
issuer=/DC=COM/DC=COMPANY/DC=MYDOMAIN/CN=CompanyCA
---
Acceptable client certificate CA names
/CN=DC1.MYDOMAIN.COMPANY.COM
/DC=COM/DC=Company/DC=MYDOMAIN/CN=CompanyCA
/DC=COM/DC=COMPANY/DC=MYDOMAIN/CN=companyca
/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Assured ID Root CA
/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
/C=US/O=GeoTrust Inc./CN=GeoTrust Primary Certification Authority
/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2008 VeriSign, Inc. - For authorized use only/CN=VeriSign Universal Root Certification Authority
/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
/O=Entrust.net/OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Certification Authority (2048)
/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV Root CA
/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
/OU=GlobalSign Root CA - R2/O=GlobalSign/CN=GlobalSign
/C=US/O=Entrust, Inc./OU=See www.entrust.net/legal-terms/OU=(c) 2009 Entrust, Inc. - for authorized use only/CN=Entrust Root Certification Authority - G2
/C=US/O=GTE Corporation/OU=GTE CyberTrust Solutions, Inc./CN=GTE CyberTrust Global Root
/C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert Global Root CA
/C=US/O=Starfield Technologies, Inc./OU=Starfield Class 2 Certification Authority
/C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA
/C=US/O=Entrust, Inc./OU=www.entrust.net/CPS is incorporated by reference/OU=(c) 2006 Entrust, Inc./CN=Entrust Root Certification Authority
/C=GB/ST=Greater Manchester/L=Salford/O=Comodo CA Limited/CN=AAA Certificate Services
/C=IE/O=Baltimore/OU=CyberTrust/CN=Baltimore CyberTrust Root
/O=Digital Signature Trust Co./CN=DST Root CA X3
/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
/C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/CN=Microsoft Root Certificate Authority 2010
/C=US/ST=Washington/L=Redmond/O=Microsoft Corporation/CN=Microsoft Root Certificate Authority 2011
/OU=Copyright (c) 1997 Microsoft Corp./OU=Microsoft Corporation/CN=Microsoft Root Authority
/DC=com/DC=microsoft/CN=Microsoft Root Certificate Authority
/CN=NT AUTHORITY
Client Certificate Types: RSA sign, DSA sign, ECDSA sign
---
SSL handshake has read 4841 bytes and written 627 bytes
---
New, TLSv1/SSLv3, Cipher is AES128-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1
Cipher : AES128-SHA
Session-ID: D82E0000C4E68E856451ECAC0519F794B643E09B56A44CB91B3548BB1EECCD2F
Session-ID-ctx:
Master-Key: 91736D82DB6B10CF5F752ED3A7BE92A923447B2D278F852918343AFF4BC8F4C1888723FA1BD85859B5C68F46E6A59D70
Key-Arg : None
Krb5 Principal: None
PSK identity: None
PSK identity hint: None
Start Time: 1628189269
Timeout : 300 (sec)
Verify return code: 21 (unable to verify the first certificate)
In the certificate headers I have:
X509v3 Subject Alternative Name: critical
DNS:DC1.MYDOMAIN.COMPANY.COM, DNS:MYDOMAIN.COMPANY.COM, DNS:MYDOMAIN
@FossCoder Thanks for the insight. This is very interesting. If you have any other concrete examples from your experience of how certain browers react to certain scenarios, I’d be happy to hear. Even for example how FF and Chrome diverged from how Apple handles certificates. I thought the 13-month period has become generally accepted, and I’m not sure you can buy a commercial certificate with longer for a period longer than 13 months. And if you do, I know you might get in trouble (theoretically). This has come into effect September 2020, if I remember correctly, that is to say, only for certificates which were issued from September onwards.