Created
March 12, 2018 09:38
-
-
Save jbussdieker/902e3df9df22119a2ca70ada801c8f8c to your computer and use it in GitHub Desktop.
Adding SANs to FreeIPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add SANs for Apache service | |
ipa service-add-principal HTTP/${hostname}@${realm} HTTP/freeipa.${domain}@${realm} | |
ipa service-add-principal HTTP/${hostname}@${realm} HTTP/freeipa@${realm} | |
HTTPD_CERT_ID=$(getcert list -d /etc/httpd/alias | grep "Request ID" | cut -d"'" -f 2) | |
getcert resubmit -i ${HTTPD_CERT_ID} -D freeipa.${domain} -D freeipa | |
while ! getcert list -d /etc/httpd/alias | grep status | grep MONITORING; do | |
log "Waiting for HTTPD certificate to be reissued" | |
done | |
# Add SANs for LDAP service | |
ipa service-add-principal ldap/${hostname}@${realm} ldap/freeipa.${domain}@${realm} | |
ipa service-add-principal ldap/${hostname}@${realm} ldap/freeipa@${realm} | |
REALM_HYPHEN=$(echo $realm | sed 's/\./\-/g') | |
LDAP_CERT_ID=$(getcert list -d "/etc/dirsrv/slapd-${REALM_HYPHEN}" | grep "Request ID" | cut -d"'" -f 2) | |
getcert resubmit -i ${LDAP_CERT_ID} -D freeipa.${domain} -D freeipa | |
while ! getcert list -d "/etc/dirsrv/slapd-${REALM_HYPHEN}" | grep status | grep MONITORING; do | |
log "Waiting for LDAP certificate to be reissued" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment