How the Certificate Setup Works
What Not to Copy From the Domain Controller
1. Issue a Certificate on the Auth Proxy Server
Option 1: Request From an Internal CA (Preferred)
[Version]
Signature = "$Windows NT$"
[NewRequest]
Subject = "CN=rap.company.local"
KeyAlgorithm = RSA
KeyLength = 2048
HashAlgorithm = SHA256
Exportable = TRUE
MachineKeySet = TRUE
ProviderName = "Microsoft Software Key Storage Provider"
RequestType = PKCS10
[Extensions]
2.5.29.17 = "{text}dns=rap.company.local"
2.5.29.37 = "{text}1.3.6.1.5.5.7.3.1"
cd $env:TEMP
certreq -new .\rap-ldaps.inf .\rap-ldaps.req
certreq -submit .\rap-ldaps.req .\rap-ldaps.cer
certreq -accept .\rap-ldaps.cer
certreq -retrieve <RequestID> .\rap-ldaps.cer
certreq -accept .\rap-ldaps.cer
Option 2: a Self-Signed Certificate
New-SelfSignedCertificate `
-DnsName "rap.company.local" `
-CertStoreLocation "Cert:\LocalMachine\My" `
-KeyAlgorithm RSA `
-KeyLength 2048 `
-HashAlgorithm SHA256 `
-KeyExportPolicy Exportable `
-NotAfter (Get-Date).AddYears(2) `
-TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1")
2. Write the Certificate and Key as PEM
cd "C:\Program Files\Rublon Auth Proxy"
.\bin\rublon-certificate-export
3. Trust the Domain Controller Certificate
C:\Program Files\Rublon Auth Proxy\config\ca_certs
New-Item -ItemType Directory -Path C:\Temp -Force | Out-Null
certutil -ca.cert C:\Temp\domain-ca.cer
certutil -encode C:\Temp\domain-ca.cer C:\Temp\domain-ca.pem
4. Set config.yaml
proxy_servers:
- name: LDAP-Proxy
type: LDAP
ip: 0.0.0.0
port: 636
auth_source: LDAP_SOURCE_1
auth_method: email
cert_path: 'C:\Program Files\Rublon Auth Proxy\config\certificates\ldap-proxy-certificate.pem'
pkey_path: 'C:\Program Files\Rublon Auth Proxy\config\certificates\ldap-proxy-private-key.pem'
pkey_password: 'proxy_key_password'
auth_sources:
- name: LDAP_SOURCE_1
type: LDAP
ip: dc01.company.local
port: 636
transport_type: ssl
tls_verify_hostname: dc01.company.local
ca_certs_dir_path: 'C:\Program Files\Rublon Auth Proxy\config\ca_certs'
search_dn: 'DC=company,DC=local'
access_user_dn: 'CN=svc-rap,OU=Service Accounts,DC=company,DC=local'
access_user_password: 'service_account_password'
5. Trust on the Application Side
6. Restart and Check
net stop RublonAuthProxy
net start RublonAuthProxy
openssl s_client -connect dc01.company.local:636 -servername dc01.company.local -CAfile "C:\Program Files\Rublon Auth Proxy\config\ca_certs\domain-ca.pem"