/usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://localhost/lookupservice/sdk --no-check-cert --ep-type com.vmware.cis.cs.identity.sso 2>/dev/null
Service Product: com.vmware.cis
Service Type: cs.identity
Service ID: ########-####-####-####-########5141
Site ID: default-site
Node ID: ########-####-####-####-########efd1
Owner ID: [email protected]
Version: 2.0
Endpoints:
Type: com.vmware.cis.cs.identity.sso
Protocol: wsTrust
URL: https://vcenter.example.local/sts/STSService/vsphere.local
SSL trust: IIDeDCCAmCgAwIBAgIJAP7kGwWSSd0yMA0GCSqGSIb3DQEBCwUAM+++wnWkeAeqnGRYvzifG9M6DK/YMP1S/akAJ...DS7Y85NorISiQfAVy/R2wjP4rNWDfN9DMCcwfPvw/0nFwrpr+0Cg==
echo | openssl s_client -connect localhost:443
CONNECTED(00000003)
depth=3 /DC=local/DC=EXAMPLE/CN=VMWARE
verify return:1
depth=2 /DC=local/DC=EXAMPLE/CN=VMWARE-1
verify return:1
depth=1 /C=US/DC=vsphere/DC=local/O=vcenter.example.local/CN=CA
verify return:1
depth=0 /CN=vcenter.example.local/C=US
verify return:1
---
Certificate chain
0 s:/CN=vcenter.example.local/C=US
i:/C=US/DC=vsphere/DC=local/O=vcenter.example.local/CN=CA
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDWDCCAkCgAwIBAgIJANr+++MJ5+WxMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNV
...
LqSKWg/apP1XlBV1VyC5LPZrH/rrq8+Naoj7i/P6HAzTwAAL+O10ggClaP8=
-----END CERTIFICATE-----
/usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://localhost/lookupservice/sdk --no-check-cert --ep-type com.vmware.cis.cs.identity.sso 2>/dev/null
Service Product: com.vmware.cis
Service Type: cs.identity
Service ID: ########-####-####-####-########5141
Site ID: default-site
Node ID: ########-####-####-####-########efd1
Owner ID: [email protected]
Version: 2.0
Endpoints:
Type: com.vmware.cis.cs.identity.sso
Protocol: wsTrust
URL: https://vcenter.example.local/sts/STSService/vsphere.local
SSL trust: LIIDeDCCAmCgAwIBAgIJAP7kGwWSSd0yMA0GCSqGSIb3DQEBCwUAM+++wnWkeAeqnGRYvzifG9M6DK/YMP1S/akAJ...DS7Y85NorISiQfAVy/R2wjP4rNWDfN9DMCcwfPvw/0nFwrpr+0Cg==
-----BEGIN CERTIFICATE-----
LIIDeDCCAmCgAwIBAgIJAP7kGwWSSd0yMA0GCSqGSIb3DQEBCwUAMGgxCzAJBgNV
PAMMAkNBMRcwFQYKCZImiZPyLGQBGRYHdnNwaGVyZTEVMBMGCgmSJomT8ixkARkW
QWxvY2FsMQswCQYDVQQGEwJVUzEcMBoGA1UECgwTaG9tZXBzYy5mcml0ei5sb2Nh
................................................................
-----END CERTIFICATE-----
openssl x509 -in /certificates/old_machine.crt -noout -sha1 -fingerprint
SHA1 Fingerprint=##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##
You can retrieve the new certificate or current machine ssl certificate using vecs-cli:
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store MACHINE_SSL_CERT
/usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store MACHINE_SSL_CERT --alias __MACHINE_CERT --output /certificates/new_machine.crt
The ls_update_certs.py script is located at /usr/lib/vmware-lookupsvc/tools/
cd /usr/lib/vmware-lookupsvc/tools/
python ls_update_certs.py --url Lookup_Service_FQDN_of_vCenter_Server --fingerprint Old_Certificate_Fingerprint_from_Task_2 --certfile New_Certificate_Path_from_Task_3 --user [email protected] --password 'Password' 2>/dev/null
For example (do not copy the fingerprint used in this example):
python ls_update_certs.py --url https://vcenter.example.local/lookupservice/sdk --fingerprint ##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:## --certfile /certificates/new_machine.crt --user [email protected] --password 'xxxx' 2>/dev/null
Sample result:
[email protected] [ /usr/lib/vmware-lookupsvc/tools ]# python ls_update_certs.py --url https://vcenter.example.local/lookupservice/sdk --fingerprint ##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:## --certfile /certificates/new_machine.crt --user [email protected] --password 'Password' 2>/dev/null Get service ########-####-####-####-########53b6 Update service ########-####-####-####-########53b6; spec: /tmp/svcspec_hvu8kxs8 Get service ########-####-####-####-########c392 Update service ########-####-####-####-########c392; spec: /tmp/svcspec_kost4p0i . . Get service ########-####-####-####-########bfdc Don't update service ########-####-####-####-########bfdc Get service ########-####-####-####-########c918 Don't update service ########-####-####-####-########c918 Updated 41 service(s) [email protected] [ /usr/lib/vmware-lookupsvc/tools ]#
python ls_update_certs.py --url LS_URL --fingerprint OLD_CERT_SHA1_HASH --certfile NEW_CERT_PEM_FILEPATH --user USER --password PASSWORD
LS_URL | Lookup service URL. On the vCenter Server, use the following URL as a model: https://external_platform_services_controller_FQDN.example.com/lookupservice/sdk |
OLD_CERT_SHA1_HASH |
Thumbprint of the certificate that vCenter Server used before certificate replacement acquired in Task 2.
Note: VMware does not recommends to find the old vCenter Server certificate in the filesystem.
|
NEW_CERT_PEM_FILEPATH |
PEM encoded file of the new vCenter Server machine SSL certificate acquired in Task 3.
Use the file that you just passed in as part of certificate replacement. If you no longer have that file, use the process in Retrieving the New Certificate.
Note: Attempting to find the new vCenter Server certificate in the filesystem is not recommended.
|
USER and PASSWORD | User with administrator privileges for vCenter Single Sign-On. |