The Security Token Service (STS) certificate is critical for the functionality of vSphere Single Sign-On (SSO). It is responsible for issuing, validating, and renewing security tokens. This article provides standardized methods to export the STS certificate from a vCenter Server Appliance (VCSA) using the API Explorer, Command Line Interface (CLI), and third-party LDAP tools.
You can export the STS certificate using any of the three methods detailed below.
certficate_management/vcenter/signing_certificateGET API and click on EXECUTE-----BEGIN CERTIFICATE----- and end with -----END CERTIFICATE-----.STS_Export.cerldapsearch -LLL -o ldif-wrap=no -h localhost -p 389 -D "cn=administrator,cn=users,dc=vsphere,dc=local" -W -b "cn=TenantCredential-1,cn=vsphere.local,cn=Tenants,cn=IdentityManager,cn=Services,dc=vsphere,dc=local" | perl -0777 -ne '@certs=/userCertificate:: ([A-Za-z0-9+\/=]+)/g; print $certs[-1]' | base64 --decode | tee sts_active.der | tee >(openssl x509 -inform der -outform pem -out sts_active.pem >/dev/null) | openssl x509 -inform der -text -noout
dcli +server localhost +skip-server-verification +username [email protected] +password PASSWORD com vmware vcenter certificatemanagement vcenter signingcertificate get | sed "s|- -----BEGIN|-----BEGIN|g" | sed '/^[[:space:]]*$/d' | sed --quiet '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | csplit --prefix=STS --suffix-format='%03d.crt' - "/-----END CERTIFICATE-----/+1" "{*}" --elide-empty-files --quiet && sed -i 's/^ *//; s/ *$//; /^$/d' STS0* | ls STS0* | while read line; do echo $line && openssl x509 -in $line -noout -text | egrep "Not Before|Not After|Issuer:| Subject:";done
cn=TenantCredential-1,cn=vsphere.local,cn=Tenants,cn=IdentityManager,cn=Services,dc=vsphere,dc=localTable Editor" tab
User Certificate" attribute.
(non string data) to open the certificate.