You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An upcoming version of Ops Manager 2.10 will start including two new
fields with the `/api/v0/deployed/certificates` endpoint;
rotation_procedure_name and rotation_procedure_url. These fields will be
on every certificate returned, and represent the rotation procedure used
to rotate that particular certificate.
The text output for the `om expiring-certificates` command has been
reworked when this data is available to group certificates by procedure
because in most cases, following a single procedure will rotate all
certificates for that procedure at once; that is, instead of running
that procedure once for each certificate separately.
The new output looks similar to the following:
```
Getting expiring certificates...
Found expiring certificates in the foundation:
One or more certificates will expire in 89 days. Please refer to the certificate rotation procedures below. To optimize deployment time, please rotate expiring CA certificates prior to any leaf certificates.
Services TLS CA Procedure (https://docs.pivotal.io/ops-manager/2-10/security/pcf-infrastructure/advanced-certificate-rotation.html#services-rotation)
credhub:
/services/tls_ca: expiring on 28 Feb 23 13:57 UTC
Identity Provider SAML Procedure (https://docs.pivotal.io/ops-manager/2-10/security/pcf-infrastructure/rotate-saml-ca.html)
cf-625e965c186c7b029061:
.uaa.service_provider_key_credentials: expiring on 29 May 22 12:57 UTC
Standard CA Procedure (https://docs.pivotal.io/ops-manager/2-10/security/pcf-infrastructure/rotate-cas-and-leaf-certs.html)
ops_manager:
.properties.nats_client_ca.c8b520555b0bc0a9f9f7: expiring on 27 Feb 26 13:57 UTC
.properties.root_ca.c8b520555b0bc0a9f9f7: expiring on 28 Feb 23 13:57 UTC
cf-625e965c186c7b029061:
/opsmgr/bosh_dns/tls_ca: expiring on 27 Feb 26 14:40 UTC
/p-bosh/cf-625e965c186c7b029061/diego-instance-identity-intermediate-ca-2-7: expiring on 28 Feb 24 14:40 UTC
/cf/diego-instance-identity-root-ca-2-6: expiring on 27 Feb 25 14:40 UTC
Standard Configurable Leaf Procedure (https://docs.pivotal.io/ops-manager/2-10/security/pcf-infrastructure/rotate-configurable-certs.html)
cf-625e965c186c7b029061:
.properties.networking_poe_ssl_certs[0].certificate: expiring on 29 May 22 12:57 UTC
Standard Non-Configurable Leaf Procedure (https://docs.pivotal.io/ops-manager/2-10/security/pcf-infrastructure/rotate-non-configurable-certs.html)
p-bosh-38683bbbab412b152fad:
.properties.director_ssl: expiring on 28 Feb 24 14:06 UTC
.properties.uaa_ssl: expiring on 28 Feb 24 14:06 UTC
...
cf-625e965c186c7b029061:
.properties.auctioneer_client_cert: expiring on 28 Feb 24 14:06 UTC
.properties.auctioneer_server_cert: expiring on 28 Feb 24 14:06 UTC
...
2022/02/28 14:47:46 found expiring certificates in the foundation
```
If the new API fields are blank, then it is assumed that `om` is
targeted at an older version of Ops Manager and the previous output
format is used instead.
[#181158588] Update om CLI to output rotation procedures
Signed-off-by: Brian Upton <[email protected]>
Signed-off-by: Camila Londoño <[email protected]>
Signed-off-by: Long Nguyen <[email protected]>
e.logger.Printf(color.RedString("One or more certificates will expire in %d days. Please refer to the certificate rotation procedures below. To optimize deployment time, please rotate expiring CA certificates prior to any leaf certificates."), remainingDays)
83
+
e.logger.Println()
84
+
for_, procedure:=rangeprocedures {
85
+
certsByTile:=expiringCertsByProcedure[procedure]
86
+
e.logger.Printf(color.RedString(procedure))
87
+
fortile, certs:=rangecertsByTile {
88
+
e.logger.Printf(color.RedString(" %s:", tile))
89
+
for_, cert:=rangecerts {
90
+
e.printExpiringCertInfo(cert, 8)
91
+
}
92
+
}
93
+
e.logger.Println()
94
+
}
74
95
}
75
96
76
97
returnerrors.New("found expiring certificates in the foundation")
0 commit comments