Workflow
Credential rotation
An EndpointProfile can give the operator its own account on each BMC. The operator then changes the password of that account on a schedule. It keeps the password that works until the new one is proven.
Rotate the BMC password
1 / 7
Profile
You write an EndpointProfile with a credentials stanza. It selects ManagementEndpoints by label and sets maxAge.
kubectl apply -f endpointprofile.yamlProfile. You write an EndpointProfile with a credentials stanza. It selects ManagementEndpoints by label and sets maxAge.
kubectl apply -f endpointprofile.yamlDue. The endpoint convergence controller finds that the managed Secret is missing or older than maxAge. A rotation is due.
metal.platform-kit.org/rotated-at < now - maxAgePark. The controller makes a new password and parks it beside the working one, as next-username and next-password. The working password stays.
endpoint-creds-<endpoint>: next-passwordSet. The controller sets the candidate on the BMC through the managed account. If that fails, it uses the factory account from the Asset.
Redfish: AccountServiceProve. The controller logs in with the candidate and reads the manager. Only a login that works proves the password.
login → GET ManagerPromote. The controller promotes the candidate to username and password and stamps the time. All lanes now use the new password.
metal.platform-kit.org/rotated-at: <now>Refused. If the BMC refuses the candidate, the working password stays in place. The Configured condition of the endpoint says why.
Configured=False RotationFailed
- Write the factory credentials of the BMC into the Secret that the Asset names in
credentialsRef. - Write an EndpointProfile with a
credentialsstanza: the account name andmaxAge. - The Endpoint convergence controller makes the account through the factory login.
- When the managed Secret is older than
maxAge, the controller rotates the password:- it parks a new password beside the working one;
- it sets the new password on the BMC;
- it logs in with the new password to prove it;
- it promotes the new password and records the time.
- Each BMC session uses the managed Secret, if it has a working password. If not, it uses the factory credentials.
- Read the result in the
Configuredcondition of the ManagementEndpoint.
The two accounts
Section titled “The two accounts”- Factory account
- The account from the Secret of the Asset. The operator does not change it. It is the way back in when the managed password stops working.
- Managed account
- The account that the operator makes and rotates. Its Secret is
endpoint-creds-<endpoint>in the namespace of the operator. - Candidate
- A new password under the keys
next-usernameandnext-password. It replaces the working password only after a login with it works.
Other credentials
Section titled “Other credentials”- Talos and Kubernetes admin credentials have a short lifetime, see Credentials.
- To change BMC credentials by hand, follow Rotate BMC credentials.
Runbooks for this flow
Section titled “Runbooks for this flow”| Symptom | Runbook |
|---|---|
Configured=False with RotationFailed |
BMC unreachable |