Failed to log in with VCF SSO service/storage/log/vcops/log/analytics-*.log files reveals the following reveals a sequence of errors indicating a conflict during the OAuth client secret rotation, eventually leading to authentication failures.ERROR analytics [ops@#### threadId="#####" threadName="DistTaskvIDB Secret Rotation Task"] [com.vmware.vrops.vidb.client.VidbClient.rotateSecret] - Failed to rotate secret of OAuth Client '<CLIENT_ID>'. Error: Request failed, returned error: HTTP/1.1 400 Bad Request, response body: {"errors":[{"code":"oauth2.client.secondary.secret.not.empty","message":"Client secret rotation already in progress. Please end rotation and retry.","parameters":{}}]}
com.vmware.vrops.vidb.client.exception.VidbClientException: Request failed, returned error: HTTP/1.1 400 Bad Request, response body: {"errors":[{"code":"oauth2.client.secondary.secret.not.empty","message":"Client secret rotation already in progress. Please end rotation and retry.","parameters":{}}]}
at com.vmware.vrops.vidb.client.VidbClient.executeRequest(VidbClient.java:547) ~[vrops-vidb-client-1.0-SNAPSHOT.jar:?]
at com.vmware.vrops.vidb.client.VidbClient.rotateSecret(VidbClient.java:251) ~[vrops-vidb-client-1.0-SNAPSHOT.jar:?]
at com.vmware.vrops.vidb.client.VidbClient.rotateSecret(VidbClient.java:231) ~[vrops-vidb-client-1.0-SNAPSHOT.jar:?]
at com.vmware.vcops.auth.vidb.task.VidbClientSecretRotationTask.run(VidbClientSecretRotationTask.java:54) ~[vcops-auth-server-1.0-SNAPSHOT.jar:?]
at com.vmware.vcops.platform.distributedtask.DistributedTaskExecutor$TaskProcessorThread.run(DistributedTaskExecutor.java:576) ~[alive_platform.jar:?]
at com.integrien.alive.common.util.BaseThread$BaseThreadRunnable.run(BaseThread.java:177) ~[vrops-adapters-sdk.jar:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
ERROR analytics [ops@#### threadId="#####" threadName="DistTaskvIDB Secret Rotation Task"] [com.vmware.vcops.auth.vidb.task.VidbClientSecretRotationTask.run] - Failed to rotate vIDB Client Secret ERROR analytics [ops@#### threadId="#####" threadName="DistTaskvIDB Secret Rotation Task"] [com.vmware.vrops.vidb.client.VidbClient.getAccessTokenByClientCredentials] - Failed to fetch token by client credentials. Error: Request failed, returned error: HTTP/1.1 401 Unauthorized com.vmware.vrops.vidb.client.exception.VidbClientAuthException: Request failed, returned error: HTTP/1.1 401 Unauthorized
at com.vmware.vrops.vidb.client.VidbClient.executeRequest(VidbClient.java:545) ~[vrops-vidb-client-1.0-SNAPSHOT.jar:?]
at com.vmware.vrops.vidb.client.VidbClient.getAccessTokenByClientCredentials(VidbClient.java:301) ~[vrops-vidb-client-1.0-SNAPSHOT.jar:?]
at com.vmware.vcops.auth.vidb.task.VidbClientSecretRotationTask.run(VidbClientSecretRotationTask.java:42) ~[vcops-auth-server-1.0-SNAPSHOT.jar:?]
at com.vmware.vcops.platform.distributedtask.DistributedTaskExecutor$TaskProcessorThread.run(DistributedTaskExecutor.java:576) ~[alive_platform.jar:?]
at com.integrien.alive.common.util.BaseThread$BaseThreadRunnable.run(BaseThread.java:177) ~[vrops-adapters-sdk.jar:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
/storage/log/vcops/log/analytics-*.log file:[Date] [Time] ERROR analytics ID [ops@ID threadId="######" threadName="DistTaskvIDB Secret Rotation Task"] [com.vmware.vrops.vidb.client.VidbClient.getAccessTokenByClientCredentials] - Failed to fetch token by client credentials. Error: Request failed, returned error: HTTP/1.1 401 Unauthorized com.vmware.vrops.vidb.client.exception.VidbClientAuthException: Request failed, returned error: HTTP/1.1 401 Unauthorized
[Date] [Time] ERROR analytics ID [ops@ID threadId="######" threadName="DistTaskvIDB Secret Rotation Task"] [com.vmware.vcops.auth.vidb.task.VidbClientSecretRotationTask.run] - Failed to rotate vIDB Client Secret com.vmware.vrops.vidb.client.exception.VidbClientAuthException: Request failed, returned error: HTTP/1.1 401 UnauthorizedNote: Reverting to a snapshot in VCF 9.x may disrupt integration with VCF SSO / VIDB.
VCF 9.0.x: This issue occurs frequently; snapshot reversions in this version carry a high probability of disrupting the integration.
VCF 9.1 and newer: The risk is significantly reduced, though there remains a slight probability of encountering the issue.
If the integration is broken, please refer to the steps below to restore connectivity.
| Note: Emphasize to take a snapshot of the VCF Operations nodes. |
root to the primary node of VCF Operations.curl -X 'GET' \
'https://<OPS_HOST>/suite-api/api/auth/sources' \
-H 'accept: application/json'admin user. This token is required for all subsequent steps.curl -X 'POST' \
'https://<OPS_HOST>/suite-api/api/auth/token/acquire' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"username": "<ADMIN_USERNAME>",
"password": "<ADMIN_PASSWORD>"
}'<OPS_TOKEN> in headers below.curl -X 'GET' \
'https://<OPS_HOST>/suite-api/api/auth/sources/<AUTH_SOURCE_ID>' \
-H 'accept: application/json' \
-H 'Authorization: OpsToken <OPS_TOKEN>'curl -X 'GET' \
'https://<OPS_HOST>/suite-api/internal/vidb/vidbs' \
-H 'accept: application/json' \
-H 'Authorization: OpsToken <OPS_TOKEN>' \
-H 'x-vrealizeops-api-use-unsupported: true'vcfId as a query parameter, as shown below:curl -X 'GET' \
'https://<OPS_HOST>/suite-api/internal/vidb/vidbs?vcfId=<vcf-instance-id>' \
-H 'accept: application/json' \
-H 'Authorization: OpsToken <OPS_TOKEN>' \
-H 'x-vrealizeops-api-use-unsupported: true'<vcf-instance-id> can be found from the adapters API. Here are the steps:<vcf-instance-id> in the above query parameterclientId for your VCF Operations environment:SSH into the VCF Operations Node as the root user.
Connect to the database by executing the following command:
su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -p 5433 -d vcopsdb"
Identify the AuthSource record for VCF Operations by running the query below:
select * from kv_vidb_auth_sources where vcf_component_type='VCF_OPS';curl --request PUT \
'https://<OPS_HOST>/suite-api/internal/vidb/oauthclients/<CLIENT_ID>/secrets/rotate?vidbResourceId=<RESOURCE_ID>' \
-H 'accept: application/json' \
-H 'Authorization: OpsToken <OPS_TOKEN>' \
-H 'x-vrealizeops-api-use-unsupported: true'
Critical: The API response will return the new client secret. Copy this value immediately for use in the final step.
curl -X 'PUT' \
'https://<OPS_HOST>/suite-api/api/auth/sources' \
-H 'accept: application/json' \
-H 'Authorization: OpsToken <OPS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"id": "<AUTH_SOURCE_ID>",
"name": "VCF SSO",
"sourceType": {
"id": "VIDB",
"name": "VIDB"
},
"created": 0,
"lastModified": 0,
"property": [
{
"name": "display-name",
"value": "VCF SSO"
},
{
"name": "issuer-url",
"value": "https://<VCF_SSO_HOST>/acs/t/<TENANT_NAME>"
},
{
"name": "client-id",
"value": "<CLIENT_ID>"
},
{
"name": "client-secret",
"value": "<NEW_CLIENT_SECRET>"
}
],
"certificates": []
}'