Skip to content

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

An EndpointProfile makes the endpoint convergence controller rotate the operator account on each BMC. The new password is parked, set, proven by a login, then promoted in the managed Secret.YouEndpointProfilecredentials.maxAgeEndpoint convergencecontrollerManaged Secret-BMC-Factory accountAsset credentialsRefAll BMC sessionsexecutor, observerselectspark, promoteset, log inuse

Profile

You write an EndpointProfile with a credentials stanza. It selects ManagementEndpoints by label and sets maxAge.

kubectl apply -f endpointprofile.yaml
  1. Profile. You write an EndpointProfile with a credentials stanza. It selects ManagementEndpoints by label and sets maxAge.

    kubectl apply -f endpointprofile.yaml
  2. Due. 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 - maxAge
  3. Park. 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-password
  4. Set. The controller sets the candidate on the BMC through the managed account. If that fails, it uses the factory account from the Asset.

    Redfish: AccountService
  5. Prove. The controller logs in with the candidate and reads the manager. Only a login that works proves the password.

    login → GET Manager
  6. Promote. 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>
  7. Refused. If the BMC refuses the candidate, the working password stays in place. The Configured condition of the endpoint says why.

    Configured=False RotationFailed
  1. Write the factory credentials of the BMC into the Secret that the Asset names in credentialsRef.
  2. Write an EndpointProfile with a credentials stanza: the account name and maxAge.
  3. The Endpoint convergence controller makes the account through the factory login.
  4. When the managed Secret is older than maxAge, the controller rotates the password:
    1. it parks a new password beside the working one;
    2. it sets the new password on the BMC;
    3. it logs in with the new password to prove it;
    4. it promotes the new password and records the time.
  5. Each BMC session uses the managed Secret, if it has a working password. If not, it uses the factory credentials.
  6. Read the result in the Configured condition of the ManagementEndpoint.
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-username and next-password. It replaces the working password only after a login with it works.
Symptom Runbook
Configured=False with RotationFailed BMC unreachable