Rotating Discovery Agent credentials¶
Discovery Agent for Next-Gen Trust Security uses a Built-in Account to authenticate against Next-Gen Trust Security. To maintain security, rotate the account periodically, or when a credential may have been compromised.
To rotate Discovery Agent credentials¶
-
Identify the Built-in Account that Discovery Agent is using by decoding the client ID in the existing secret:
kubectl get secret -n=venafi discovery-agent-credentials -o jsonpath="{.data.clientID}" | base64 -dSave the client ID for the final step.
-
Create a new Built-in Account in Next-Gen Trust Security:
- Click System Settings > Built-in Accounts.
- Click New and create a new Built-in Account with the use case Discovery Agent and the scope Kubernetes Discovery.
- Save the new private key as
discovery-agent-private-key.pem. - Save the new client ID to
clientID.txt.
-
Delete the old secret from your cluster:
kubectl delete secret -n=venafi discovery-agent-credentials -
Create a new secret with the new credentials:
kubectl create secret generic discovery-agent-credentials \ --namespace=venafi \ --from-file=clientID=clientID.txt \ --from-file=privatekey.pem=discovery-agent-private-key.pem -
Restart Discovery Agent:
kubectl rollout restart deployment agent -
On the Built-in Accounts page in Next-Gen Trust Security, delete the old Built-in Account you identified in step 1.