Credential migration, audit, and access diagnosis
This page has four parts: today's credential lifecycle against what a current objective adds for typed credentials and audit, Credential Explain access, diagnosing a refusal, and the operator-controlled procedure for moving production automation off a legacy account key.
Read this first: most of this page describes work that has not shipped in any released CLI, API, or Console build yet. Create, list, show, update (name or expiry only — never a secret or role change in place), and revoke all exist today, for both a Personal Access Token (PAT) and today's shared account key — see Accounts and credentials. Rotating a secret in place, per-grant authorization, the Audit Log entries for any of that, and Credential Explain access are all implemented in source as part of one objective, but none of it has been deployed anywhere yet. Every section below says plainly which parts of it are unreleased; treat anything not explicitly marked "today" as a preview of implemented behavior, not something you can go run right now.
For least-privilege CI examples, see CI/CD from a runner.
Which credential is this?
| Credential | Bound to | Who controls it | Prefix | Available today |
|---|---|---|---|---|
| Personal access token (PAT) | The member who created it | That member; follows their current role live | runos_pat_ | Create (add-personal), list, show, update (name/expiry), revoke |
| Account API Key (unreleased) | Nothing — an independent machine principal | Its custodial account (expiry, rotation, global revocation); each resource account controls its own grants | runos_key_ | Not yet — this whole row is this objective's addition |
| Legacy account key | Nothing — a shared admin-created credential | The account that created it, through today's role | runos_pat_ (same prefix as a PAT; the two are told apart by the personal flag, not the prefix) | Create (add --account-role), list, show, update (name/expiry), revoke |
A credential's verified, stored type decides its authority, never its prefix and never which page documented it. The legacy account key is what the Account API Key above replaces; see Moving production automation off a legacy account key once it ships.
Typed credential lifecycle (unreleased)
Neither typed credential below exists in a released build. This section previews the full lifecycle each will have, once the typed account personal-access-tokens and account account-api-keys command families (see Credential and grant commands) ship — it is not something you can run today.
A typed PAT's own authority is never a fixed snapshot: it continuously follows the signer's current account membership, role, and any grants they hold, intersected with the token's own stored restrictions. Losing membership, a role change, or a grant withdrawal reaches the PAT immediately, the same live way today's legacy PAT already works.
| Operation | Personal Access Token | Account API Key |
|---|---|---|
| Create | Requires an expiry up front, capped at 90 days | Expiry is optional; if set, reaching it ends the key the same way a global revoke does. No implicit role and no grants anywhere; one custodial account |
| Update | Name and restrictions only — cannot change expiry, type, or grants | Name and allowed network ranges only — cannot change custody, type, or grants |
| Rotate | Keeps identity and restrictions; the old secret is retired immediately at the moment of rotation | Keeps identity and every existing grant; the old secret can keep working for a short overlap window, capped by the key's own expiry, before it is retired |
| Revoke | Global — ends the credential everywhere | Global — ends the key and every grant it holds, everywhere |
| Grant / withdraw an action | Not a separate operation — the PAT's authority instead continuously follows the signer's current membership, role, and grants (above), never a one-time snapshot | A resource account grants or withdraws, in one step, one or more explicit actions together; withdrawing that grant removes all of its actions at once, local to that one account; the key's custodial lifecycle and its grants in other accounts are untouched |
| Creator removed | No PAT without a creator; removing the signer ends a PAT's authority the same live way a role change does | No effect — the key's authority never depended on who created it |
Neither typed credential's update can set or change expiry: it is fixed at creation, and nothing above lets you extend or shorten it afterward.
Once released, two different checks answer two different questions, and neither substitutes for the other:
- A credential's own custodial inventory (
account personal-access-tokens show/listoraccount account-api-keys show/list) shows its public ID, owner or custodian, state, expiry, and permission source — never the grants held against it. - A resource account's own grant list (a separate, account-scoped surface this objective also adds) is where that account's explicit grants on a key actually live.
Today, the checks available for either legacy credential are the shared runos account api-keys list and show. Neither shows a grant (there are none to show, since today's credentials run on an account role, not grants) or distinguishes a personal key from a legacy account key beyond the personal flag. update on either kind can change only the name or the expiry — never the secret or the role in place; see Diagnosing a credential failure for what that means when a role itself is wrong.
Audit Log: what this objective adds (unreleased)
None of this is live anywhere. The Console work that renders these events is built and tested, but this objective has not been deployed to any environment, so there is nothing to go look at today. This section describes the designed behavior, not current product.
Once released, a credential's own lifecycle events (create, rename or restriction update, rotate, revoke) are designed to appear in its custodial account's Audit Log. A resource account's own grant and withdrawal events are designed to appear in that resource account's Audit Log instead — never in a different account's log, and never requiring that account to also be the credential's custodian.
Each entry naming a credential or a grant is designed to carry, at minimum, the actor (a person, or the credential acting on its own behalf — never left blank, never a secret), the credential type and its public identifier (never the bearer secret or its hash), the affected account, the outcome (publicly success), and a time — but, see below, not a scope, which no kind of event carries.
Correlating one change concretely means verifying all five fields together against a record you kept yourself, and the credential ID alone is not enough when a key holds more than one grant. Say a resource account grants two separate things on the same key: grant_7f2a for apps.deploy on one app, and grant_c91e for apps.logs.read on another — recording each grant's own ID, scope, and creation time as it is made. A different authorized person in that account later withdraws grant_7f2a alone. Its withdrawal entry names the same public credential ID as both grants and the same affected account as both, so neither of those tells you which grant was withdrawn — only the grant ID does (the public read API exposes it as detail.grant). Confirm withdrawal by matching detail.grant to grant_7f2a specifically, then separately verify the entry's actor (here, a different person than whoever created it — the Audit Log does not require the same actor to create and withdraw), credential type and public ID, affected account, outcome (success), and timestamp, each against your own record. grant_c91e is untouched and its own entries still correlate the same way. Only your own separate record, never the entry, still names which scope grant_7f2a was for.
Local withdrawal and global revocation differ in effect, but closing an account is not itself a published event either way. A resource account withdrawing its own grant only ever affects that account's own authority: the credential, and any grants it holds elsewhere, are untouched — and this explicit withdrawal is designed to appear in that resource account's own Audit Log (above). Closing a resource account has the identical local effect, ending only its own grants — but closing removes every membership and every grant in that account at the same moment, including whatever access.read a former administrator held there, so neither its grant list nor anything else inside the now-closed account can be read back afterward, by anyone, including its own former admin. Confirm the closure itself from the closure call's own result (a reported success is the evidence; there is nothing left to read back inside the closed account afterward). Confirm the local loss of authority independently: a safe, previously permitted operation with that same credential, scoped to the now-closed account, is now refused — never a listing read inside the closed account, since none is left there to read. Where the credential also holds a grant elsewhere, confirm it is untouched from that other resource account's own grant list, or an approved operation there with the credential itself — never from the credential's own custodial listing, which never shows grant detail in any account (above) and so can neither confirm nor rule out a surviving grant. An explicit global revoke is designed to end the credential everywhere and does appear as its own published lifecycle event. The credential's custodial account closing has the identical global effect, invalidating the credential everywhere — and removes the custodian's own membership and access the same way, so its typed-key listing is gone too. Confirm it from the closure call's own result, and independently, from a still-authorized context, by trying the credential anywhere it used to work and confirming the refusal.
Known limits, and the timing behavior differs across three kinds of event, not two:
- No kind of entry shows which scope a grant event was about — only that the account and the key were involved. Neither the Audit Log nor a later grant list can tell you a withdrawn grant's former scope after the fact, so if you need that record, write down each grant's own ID and scope yourself at the moment you create it, the way the example above does.
- Legacy credential events (create, metadata update, revoke) are designed to write an occurrence time into a durable delivery queue and be delivered to the canonical log separately, exposing a recorded time (
at) and, when available, a separate, earlier occurred time (occurred_at) — shown in the Console, where it has a detail view, as "Recorded" and, when present, "Happened". This is also unreleased, like everything else on this page: it exists only on this objective's own branch, not in any deployed build, so it is new work alongside the grant and typed-credential events below, not a pre-existing baseline they are compared against. - A grant event (creation or withdrawal) is delivered the same at-least-once way: the same change can be recorded more than once, and its recorded time can lag behind the moment the change actually took effect, more so during a delivery disruption.
- A typed credential's own lifecycle event (create, update, rotate, revoke) carries an explicit event time, so it does not have the grant event's delivery lag or duplication risk. It is not, however, written atomically with the credential change itself: the event is appended as its own write immediately before the credential's own transaction commits, as a separate step. If that commit then fails, a
successaudit entry can exist with no credential actually created or changed behind it. Treat an audit entry alone as evidence of intent to commit, not as proof the typed credential change itself committed — if a commit failure is suspected, verify the credential's own current state directly rather than trusting the entry. - Revocation is designed to stay effective even during a log delivery outage, with the event reaching the log once that recovers — this durability guarantee is about the log surviving an outage, not about the typed-event ordering above.
Credential Explain access (unreleased customer surface)
Credential Explain's evaluator in Roid, and the human-only Conductor route in front of it (POST /:aid/account/access/explain), are both implemented in source — but, like the rest of this objective, neither is deployed anywhere, so there is nothing to call through either today. The Console has no picker for it either.
The CLI is a separate, more complicated case. runos access explain is already released, but its two modes are not at the same stage: --person shows what a person can do and why — a different, pre-existing feature this objective does not change — and that mode works today. --credential, which explains one action and scope for a PAT or an Account API Key by its public ID, is written and validated in the CLI's own source (runos access explain --credential <public-id> --account <aid> --action <action>), but it depends on the unreleased Explain work this section previews, so it does not work end to end in any environment yet.
Once it does, you select the credential to explain by its public, non-secret identifier, never its bearer. Every one of these interfaces accepts only a genuine, signed-in person — never an Account API Key bearer, a PAT bearer, or an old, bridged CLI sign-in, all three of which are refused outright, even to explain their own holder's own token. For the Conductor route specifically, being signed in is necessary but not enough on its own: the request also needs a fresh, request-bound gateway attestation, which only a real session passing through the gateway (the Console, in practice) supplies — calling the route directly, even while signed in, without that attestation is refused. The CLI does not go through Conductor at all for this: it authenticates straight to the identity service through its own sign-in (runos login), a separate mechanism with no gateway attestation involved.
The one exception to needing broader read access is about which credential a signed-in person may pick as Explain's subject, and it is narrower than "any of your own tokens": a signed-in person can always explain their own typed PAT by its public ID, but only while looking at it under its own authority account. Viewed from anywhere else, that same typed PAT is not reachable through a different account's access.read either — see visibility below, which is an account-structure limit, not a broader-permission workaround. A legacy PAT or an Account API Key need access.read, each gated by the visibility rule for its own kind below.
Visibility itself follows the credential's own account structure, and access.read in the wrong account cannot override it. A PAT, typed or legacy, is visible only when explained under its own authority account — access.read in a different account never makes it visible there. An Account API Key is visible either in its custodial account, or in any resource account that holds a matching grant naming it, each still gated by that account's own access.read (the self-owner exception above is the one path that needs no separate access.read at all). When you view a key from a resource account that is not its custodian, the response redacts which account actually custodies it.
A request to Explain can fail outright, with no outcome at all, if the service cannot be reached or the input is malformed — that is a plain error, separate from the four outcomes below, which are always a completed answer:
- permit
- deny
- needs — something more is required before a request would succeed (the response lists what)
- unavailable — the evaluator responded, but could not reach a confident answer; treat it like a deny, never like a quiet permit. It is a completed response and is tagged authoritative, but that tag describes the response, not a decision:
unavailableconveys no authorization judgment at all, so never read it as either a permit or a deny that merely happened to be labeled differently. This response is itself one of the early-exit shapes below: it returns before any risk, stored-restriction, allowlist, or matched-grant detail is added, so none of that appears on it either.
Alongside the outcome, Explain reports how far to trust it:
- authoritative — the usual case: a real decision from the same evaluator a live request gets.
- conditional — the engine could not fully confirm the result. This can attach to a
denyor aneedsoutcome when something could not be checked from here (for example, an unevaluated source-range condition). It can also attach to an outrightpermit: when a risk rule has no score to assess and is configured to pass rather than block when that happens, Explain marks that permit conditional too, specifically because it was never actually confirmed — never read a conditional result, whatever its outcome, with the same confidence as an authoritative one. - legacy, non-authoritative — the credential is still on the legacy path. Explain cannot reproduce that evaluator at all, so a legacy credential's Explain result is ordinarily
deny, legacy non-authoritative — regardless of what a real legacy request would actually do. Never read thatdenyas proof the real request is also denied; it only means Explain cannot tell you. A legacy credential never reaches the one frozen-account exception below, because visibility itself depends on anaccess.readdecision that is refused while the account is frozen, so a legacy credential's visibility check fails first and the whole request answers the ordinary not-found response — it never gets as far as the frozen-account branch at all.
While the target account itself is in a frozen state (for example, mid-restore), a request scoped to just the account can still get an authoritative deny, account_frozen — but only through the one visibility path that needs no live access.read decision in the first place: a signed-in person explaining their own typed PAT under its own authority account (the self-owner exception above). Every other case's visibility depends on that same access.read decision, which the frozen account refuses, so it never reaches the frozen-account branch either — it gets the ordinary not-found response instead, the same as a request scoped to anything deeper than the account while frozen.
Besides the outcome and how far to trust it, Explain also reports:
- the reason, for any outcome short of an outright permit;
- the moment it was evaluated, the policy version it used, and whether that policy was fresh (
current) or not (unavailable) at that moment; - expiry — the credential's own, if it has one;
- lifecycle state — active, expired, revoked, or legacy;
- conditions — everything actually checked for this decision, as plain tags: which of a matched grant's own conditions (a source-network range, a time window, a required assurance level) were satisfied, a risk assessment that could not be scored, and the credential's own stored restrictions — a PAT's action classes on an actively-evaluated or verified-inactive response; every early exit (the frozen-account branch, a legacy credential, or a completed
unavailableresult) omits this detail entirely, returning before it is added; source ranges from the stored profile for a PAT or for an inactive Account API Key, or from the live evaluator snapshot for an active Account API Key, never a separately re-read record for that one case; and - permission source — a separate, structured summary of where the authority is said to come from: matched role IDs, matched grant IDs, and the explicit actions of any action-backed grant that matched. The credential's own restrictions above live in conditions, not here.
How much of that detail you get back depends on which of three response shapes you hit, not just the outcome:
- Actively evaluated — the credential is active and the real evaluator ran. This is the only shape with matched-grant and role detail (
permission source's grant IDs and role IDs) and, for an active Account API Key, its live, at-decision-time network allowlist. - Verified inactive (revoked, expired, or its custodial account closed) — the evaluator never runs; a synthetic decision stands in for it. There is no matched-grant or role detail, since nothing was actually evaluated, but the credential's own stored restrictions (a PAT's action classes, and source ranges for either an inactive PAT or an inactive Account API Key) are still shown in conditions, read from the stored record rather than a live evaluator snapshot.
- Early exit (a frozen account's one authoritative branch, a legacy credential, or a completed
unavailableresult) — no profile or grant detail at all, but the response can still carry a lifecycle tag (for example, that the credential is revoked or expired) if that was already known before the exit happened.
A key is never evaluated as if it had just completed a fresh human sign-in. Missing evidence — no recorded approval, no satisfied assurance level — produces a conditional result, never an invented pass; a human-only requirement can never be satisfied by a machine credential, authoritative or not.
This describes the exact moment it was evaluated, nothing more. A real request made afterward can get a different answer if the grant, the credential's own state, the account's policy, or the request's own context changes in between. Explain is a snapshot, not a standing guarantee — and, as above, a conditional result was never a guarantee in the first place.
Explain is read-only: asking never executes the action, mints authority, or changes anything. It also never discloses another account's credentials, grants, or whether a resource it cannot see exists at all; an uninspectable credential or scope gets the same refusal as one that genuinely does not exist.
Diagnosing a credential failure
Work from the symptom to the cause, then take the narrowest fix. Never clear a refusal by reaching for a broader role or a different, less-scoped credential: that defeats the reason the scoped grant existed, and a refusal from a correctly scoped credential is doing its job.
| Category | Symptom | Likely cause | Check | Safe next step |
|---|---|---|---|---|
| Authentication | Every call with this credential fails, including ones that need no special grant | The configured secret, its account id, or both do not match a real, active credential | First check which configured source the runner is actually using — RUNOS_API_KEY, the stored config, or neither — since more than one can be present and only one wins (see token precedence; a variable set but empty is a hard error, not a silent fallback). Then, separately, look up that credential's own public ID in its inventory (show) to confirm its account, type, owner, expiry, and state; no inventory call ever returns the secret to compare against. | Fix the actual mismatch: the wrong variable, the wrong account id, or an empty secret reference. Nothing has been authorized or denied yet, so there is no role or grant to widen. |
| Lifecycle | A call that used to authenticate now doesn't, with no account-wide change in sight | The secret was rotated and the consumer still has the old one, the credential expired, it was globally revoked, or its custodial account closed | The credential's own listing — but not from a closed custodial account, since closing removes that very access too; once released, the custodian account's Audit Log for the matching rotate or revoke event. Closing is not itself published as a distinct event: confirm a resource account's closure from the closure call's own result, plus a previously permitted operation with the credential now refused in that closed account, plus, where the credential holds a grant elsewhere, that other resource account's own grant list or an approved operation there, never the credential's own custodial listing, which never shows grant detail; confirm a custodial account's closure from the closure call's own result, plus an independent refusal check anywhere the credential used to work | Use the current secret from the latest rotation, or issue a new credential under a live custodial account if the old one or its custodian is gone for good. Recreating the identical credential under the same prefix is not a fix. |
| Authorization — today's role-based credentials | Authentication succeeds, but a specific operation is refused | Today's PAT and legacy account key run on an account role (admin/limited/viewer for the account key; the signer's own role for a PAT) — not a grant. The role itself does not hold the needed permission, or (see Accounts and credentials) a limited account key's role enforcement is inconsistent | The member's or account key's own role, via runos account users list / runos account api-keys list | Today's update cannot change either credential's role in place (it covers only name and expiry). For a legacy account key, raising its role needs a reviewed decision to revoke and recreate it with the role it needs. For a PAT, its role is the signer's own account-wide role — raising it changes that person's authority everywhere, not only for this credential, so treat it as a membership decision, not a quick fix. Either way, get the decision reviewed; do not silently grant broader access to clear one refusal. |
| Authorization — once released, scoped Account API Key | Authentication succeeds, but one specific action is refused | No explicit grant exists yet for that exact action and scope, or a resource account withdrew its grant locally (the credential and its grants elsewhere are unaffected) | Once released: the resource account's own current grant list for that exact action and scope — not the Audit Log, which does not show a grant's scope | Have an authorized person in that resource account add the missing action(s). They must already hold the exact action at that scope or a broader ancestor scope, and any condition or duration on the new grant must fit within what they themselves can delegate. There is no in-place edit of an existing grant: widening one is a separately reviewed withdrawal of the old grant and creation of a new one, never a quick patch. Do not substitute a broader credential or role. |
| Unmet condition | A grant exists, but the request is still refused or stuck needing something | A condition on the grant — a source-network range or a time window — is not satisfied by this specific request | Explain's own listed conditions, where you can reach it | For an Account API Key, only network- and time-based conditions are even possible: the grant-creation step itself refuses to attach a human assurance level or an approval step to a machine subject, so a scoped key can never be left waiting on evidence it could never supply. Satisfy the real condition, or have it changed by the account that added it. |
| Invalid input | Explain or a real request fails immediately, before any decision | A malformed request: an unknown action, an unparseable scope, or similarly bad input | The request you actually sent | Fix the input. Retrying the same malformed request will not change the outcome. |
| Service outage | Explain, or a real request, fails outright with no decision at all, and the input was fine | The decision service could not be reached | Retry once | Nothing to change on the credential. If it persists, treat it as a platform incident, not a credential problem. |
Moving production automation off a legacy account key
This procedure is operator-controlled. Creating or rotating a production credential, approving a grant, and revoking the old credential are all actions a human takes deliberately; nothing here runs on its own, and this documentation does not perform any of it on your behalf.
Status today: this sequence is written from the architecture this objective implements. It has not yet been run end to end as a development rehearsal by the team building it, so treat every step below as unverified until that rehearsal, and the separate operator runbook it produces, land. Prefer the operator runbook's own exact commands over this page once it ships; this page states the shape of the procedure and the invariants it must hold, not a drop-in script.
Today's legacy account key runs on an account role, not a grant — there is nothing to "unwind" grant by grant; inventory records its role and revokes it with runos account api-keys revoke (see Accounts and credentials). A pipeline authenticating with a personal PAT instead has no custodian at all; its owner revokes it the same way with runos account api-keys revoke. Either way, the replacement is a scoped Account API Key, and issuing and granting it are two separate authorizations that do not default to whoever held the old credential: creating the key needs an authorized human in its custodial account, with a fresh security-key step-up, and granting it one or more actions needs an authorized human in each resource account, who must already hold every action they delegate. The same person may or may not hold both; check, rather than assume.
Every step below names its own Check and the Decision that follows a failed one, and its own evidence check for whether that step's non-secret proof was actually captured. Record each step's own evidence — which check passed or failed, and which non-secret audit fields you read — as you go, never a bearer value; do not leave this to a retrospective note at the end.
This procedure draws on exactly three kinds of non-secret evidence, and no other. The Audit Log, for a credential's or a grant's own lifecycle events only, never an individual request. A consumer's own effective configuration, read back at each entry point — which account it is pointed at, and which secret is configured, never the secret's own value — together with that entry point's own call succeeding or failing. And, for a deploy started by a scoped credential, a successful own-deployment progress read performed with that same credential: its success is itself the attribution, because any other credential — including the legacy one — gets the exact same refusal a stranger gets. Neither a deployment-progress response nor an application-log response ever names its own caller, and neither will. A legacy job carries no such binding at all, so this third source applies only to a job the scoped replacement itself started, never to the legacy credential's own jobs.
- Inventory. For every legacy credential still in production use, record its public identifier, owner or custodian, its current account role, and expiry. For every consumer (a CI pipeline, a scheduled job, a person's own script), record every entry point it uses separately (CLI upload, VCS deploy, a direct API call — not just the consumer as a whole), and the exact configured values each entry point sets: the secret's own reference, and, where it also selects an account, that account id. Check: every consumer and every one of its entry points is accounted for, with its own secret reference recorded. Decision: if any consumer's entry points or configured values are not fully known, find them before moving on; an incomplete inventory makes every later step's "every consumer" check unreliable. Check (evidence): this step's own non-secret evidence — which entry points and configured values you actually recorded, and when — was captured in writing as you went, not reconstructed afterward. Decision, if that evidence is missing: treat the inventory as incomplete and apply this step's own decision above before moving on.
- Confirm rollback is real, before anything else changes. Rollback means reverting a consumer's configuration back to this legacy credential. The rollback window runs from right now until step 8 actually revokes the credential; step 7 is the gate that must pass before step 8 may proceed, and a failed gate keeps the old credential valid and approved rather than ending the window early. Check: the legacy credential is currently, affirmatively approved for continued use (not merely "not yet disapproved"); its expiry is far enough out to cover the whole migration; and whoever would need to restore access to it still has that access. Decision: if any of those does not hold, stop here and resolve it before touching anything else. Check (evidence): this step's own non-secret evidence — which of the three rollback prerequisites you actually confirmed, and how — was captured in writing as you went. Decision, if that evidence is missing: treat the prerequisite as unconfirmed, and apply this step's own decision above: stop here and resolve it before touching anything else.
- Capture current effective authority, only through a probe that actually matches the action and is approved to show one result. Check: match the probe to the specific action being measured, state the one result it is approved to show before running it, and record which credential and scope that result actually proves it for — the legacy credential itself, at the exact action and scope step 4's grant will replicate. Where that action is itself read-only (for example,
apps.logs.read), an approved real call to that exact action, made with the legacy credential, is the probe — not a different, merely similar read — and it is approved to show exactly one result: success; a refusal there means the inventory itself is wrong, not a usable measurement, so stop and correct the inventory rather than granting a refusal forward. Where it is not read-only (apps.deploycannot be exercised without actually deploying), attribute the legacy credential's own write authority from its own already-happening production use, not by assumption: independently read that consumer's own effective configuration at this entry point, and confirm it already shows a recorded, successful ordinary run of this exact action under that same configuration — the same two evidence sources (above) the rest of this procedure uses, applied here to the legacy credential's own current use. Alongside that attribution, use an isolated rehearsal target with its own disposable, fixture credential and, where one is needed, its own temporary grant — never the broad legacy production credential for a new, state-changing write — to confirm only that the exact action and scope you are about to replicate is itself sufficient and correctly specified; a rehearsal's success proves only that disposable fixture credential's own authority on that isolated target, never the legacy credential's own authority, and cannot substitute for the configuration-and-run attribution above. Explain is diagnosis here, never evidence: this procedure draws on exactly three kinds of non-secret evidence (above), and no Explain result for this action and credential is one of them, whatever it answers — itsconditional,unavailable, not-found, andlegacy, non-authoritativeresults included — and a legacy credential's Explain result never reaches an actively-evaluated shape at all, so there is no fifth, authoritative answer to wait for either. Route every Explain answer to the approved read or the isolated rehearsal above instead. If you create a temporary secret, fixture credential, or grant for the rehearsal, record its exact reference now — a temporary CI secret by its own exact name, and a grant by its own exact grant id. Step 7 removes and confirms a rehearsal-target grant or fixture credential recorded here or in step 5, before revocation; step 9 removes and confirms a separately recorded CI secret, after revocation. Decision: if the read-only probe's required success is missing, or the write action's effective-configuration readback or recorded successful ordinary run is missing, or no rehearsal target exists, or an available rehearsal fails, stop; do not substitute a different action's, a different credential's, or a different scope's result, and do not send a state-changing request against production with the broad legacy credential to find out. Check (evidence): this step's own non-secret evidence — which probe you used for this action, and its actual, observed result — was captured in writing as you went. Decision, if that evidence is missing: treat the measurement as not done, and apply this step's own decision above: stop rather than substitute a different action's result. - Create the replacement. Check: an authorized human in the custodial account is available to create it, with a fresh security-key step-up, and an authorized human in each resource account is available to grant it only the explicit action or actions step 3 measured — a pipeline commonly needs more than one (for example,
apps.deployand a separateapps.logs.read; see Least-privilege CI). Decision: if either authorized human is unavailable — including when a PAT-backed runner's own owner is not the person who holds delegation authority in the resource account — stop and route the request to whoever actually holds that authority; do not let whoever held the old credential proceed on the assumption that they hold both. Check (evidence): this step's own non-secret evidence — which authorized human acted in the custodial account and in each resource account, and what each one granted — was captured in writing as you went. Decision, if that evidence is missing: treat the authorization as not done, and apply this step's own decision above: stop and route the request to whoever actually holds that authority. - Compare the replacement against the measurement from step 3, both ways, before touching any consumer. Check: for each consumer, its own required action and scope — not a generic example — now has a matching grant on the replacement: compare the recorded step 4 grant's exact action and scope against the exact action and scope step 3 recorded for that entry point, and correlate that grant record with its own creation event in the resource account's Audit Log — this comparison, not the rehearsal below, is what confirms the grant itself matches. Exercising the replacement credential itself then probes the result: an approved real call to that exact read-only action made with the replacement, which must succeed, confirming the production scope directly; or, for a write, an isolated rehearsal target exercised with the replacement itself, using a temporary grant that carries exactly the one action being measured — never bundled with any other action, even though one grant can otherwise carry several — scoped to the rehearsal target's own app — never the production app's grant used for this rehearsal call, and never a different fixture credential standing in for it, and never a state-changing call against production. This isolated write proves only the replacement's own authority under that temporary grant on that isolated target, the same limit step 3 states for its own rehearsal — never that step 4's production grant itself covers the consumer's real action and scope in production; that production-scope coverage is instead established by the recorded-grant comparison above, and is first actually exercised by step 6's fresh post-swap call, never by this rehearsal alone. If this rehearsal needs its own temporary grant, record its exact grant id now, the same way step 3 does; step 7 removes and confirms it. If the recorded production grant's action and scope cannot be confirmed against step 3's own record and its Audit Log event, or no isolated rehearsal target can be safely established for a write action, or the required rehearsal grant cannot be issued there, stop: cutover is blocked for that consumer. The replacement is also refused, when tried the same way with the replacement itself, on a representative set of calls it should not be able to make (an unrelated app, an unrelated account, an ungranted action). Explain is diagnosis here, never evidence, for the replacement exactly as for the legacy credential in step 3: any result it gives for one of these denials, whatever shape, is outside this procedure's three permitted evidence sources and never substitutes for the real or rehearsal probe above. The replacement has also gained none of the human-only operations (member management, credential creation, sign-in) a scoped machine grant can never carry, and the creation and grant events for it appear in the custodian's and each resource account's Audit Log. Decision: if any part of this comparison fails, or no real or rehearsal probe is available to confirm some part of it, cutover is blocked — fix the replacement and recompare before step 6; do not change any consumer's configuration in the meantime, and do not accept a different credential's, a different app's, or a different scope's result as a stand-in. Check (evidence): this step's own non-secret evidence — the comparison's own result for each consumer's required action, each denial checked, and the Audit Log entries you read for the creation and grant events — was captured in writing as you went. Decision, if that evidence is missing: treat the comparison as not done, and apply this step's own decision above: cutover is blocked.
- Move one consumer at a time. Check, before changing anything: that consumer's currently effective secret and account selection (for example
RUNOS_ACCOUNT_ID, which must select the resource account holding the grant, not necessarily the key's custodial account) — know what is actually in effect, not just what step 1's inventory recorded. Decision, if that does not match: stop, reconcile the inventory, and do not change that consumer's configuration until it does. Once it checks out, update the consumer's full configuration together, secret and account selection at once. Check, after changing it: a fresh, independent read of that entry point's own effective configuration — performed again, right now, never reused from the pre-swap check above — shows the replacement's secret and account actually in effect; and, with that freshly confirmed, that entry point's own specific call succeeds and its verified result attributes that traffic to the replacement specifically. For a deploy, bind the exact job this fresh call just started, and follow its own-deployment progress through to a terminal result: onlycompletedsatisfies this check, because that job's own success is itself the attribution — any other credential, including the legacy one, gets the exact same refusal a stranger gets, never a distinguishable one — but the request's own acceptance, or a progress read that is merely successful yet not yet terminal, or a terminalfailed,cancelled, ortimed_outresult, does not satisfy it. For every other entry point (for exampleapps.logs.read), no response names its own caller at all, so the verified result is this fresh effective-configuration read plus that entry point's own call succeeding with it right now — nothing more is available, and nothing more is required. A call that happens to succeed without this fresh, post-swap configuration read first does not count: it could still be running on the legacy key. The canonical Audit Log does not help here: it records a credential's own lifecycle and grant changes, never an attribution for an individual deploy, progress read, or log read — neither case above relies on it. Decision: if that second check fails — including a deploy that does not reachcompleted— do not fix it in place while the consumer is still pointed at the replacement. Revert both settings to the rollback position from step 2, recheck that the old configuration still works, then fix the replacement and retry this step from the top. Do not move to the next consumer until this one passes. Check (evidence): this step's own non-secret evidence — the pre-swap and post-swap result for this consumer, call by call — was captured in writing as you went. Decision, if that evidence is missing: treat the move as not verified, and apply this step's own decision above: revert to the rollback position from step 2. - Hold revocation. Before holding, remove any rehearsal-target grant or fixture credential recorded in step 3 or step 5, confirm that removal, and perform a fresh, independent effective-configuration read and call for every consumer's every entry point right now — not merely by reference to step 6's own result, and regardless of whether this particular consumer needed any rehearsal cleanup. Check: every consumer, and every one of its entry points individually — not just every consumer by name — has its own fresh, call-specific verified result from that reperformed check (never the Audit Log, which does not cover this) attributing that traffic to the replacement specifically, so no entry point is left quietly still authenticating with the legacy credential; for a deploy entry point, that reperformed check again follows its own fresh job through to a terminal
completedresult, the same requirement step 6 states — a merely-accepted or still-in-progress job does not satisfy it; and every rehearsal-target grant or fixture credential recorded in step 3 or step 5 has now actually been removed, that removal confirmed, and the real consumers' authority rechecked and confirmed to still hold without it. Decision: any consumer or entry point not meeting that, or any rehearsal-target grant or fixture credential recorded in step 3 or step 5 but not yet removed, confirmed removed, and rechecked, blocks revocation outright — there is no partial revocation; roll that specific consumer back to the rollback position from step 2 until its own fresh evidence exists, rather than leaving it in an unverified state while others proceed. Check (evidence): this step's own non-secret evidence — each entry point's own call-specific result, and the state of any recorded rehearsal grant or fixture credential — was captured in writing as you went. Decision, if that evidence is missing: treat revocation as not yet held open on confirmed grounds, and apply this step's own decision above: it blocks revocation outright. - Revoke the legacy credential, then verify both directions. Check, before revoking: an approved safe, read-only call that the old credential can already make — approved and agreed in advance, the same way step 2 approves the credential's own continued use, never picked ad hoc at this step; any such action is enough, since this baseline only shows the credential is still currently valid, it does not need to re-prove the specific action being migrated — demonstrably succeeds right now when made with the old credential itself, never a rehearsal substitute, since a fixture's result cannot prove anything about the old credential specifically; and the replacement's own real production operation for this consumer — the same one step 6 already verified succeeding with the replacement — is independently named and still expected to succeed; where that named operation is a deploy, "succeed" means reaching a terminal
completedresult through the same own-deployment progress surface steps 6 and 7 use, not merely being accepted; record both now. Decision, if either is missing: hold revocation; do not proceed until both the approved old-credential baseline call and the independently named replacement operation exist and are recorded. Check, after revoking: that same approved old-credential baseline call now refuses with the old credential, and the named replacement operation still succeeds with the replacement — again reachingcompletedif it is a deploy; the Audit Log shows the revocation event itself (the credential's own lifecycle, which the Audit Log does cover); independently authorized grants on other, unrelated credentials are untouched by it. Decision: if either post-revocation check fails, stop and escalate as an incident — do not attempt to restore or re-use the revoked credential, which this procedure does not promise will work again. Proceed to cleanup only once both post-revocation checks pass. Check (evidence, pre-revocation): this step's own pre-revocation evidence — the approved old-credential baseline call's own result, and the independently named replacement operation — was captured in writing before revoking. Decision, if that evidence is missing: treat the pre-revocation check as not done, and apply this step's own decision above: hold revocation. Check (evidence, post-revocation): this step's own post-revocation evidence — the refusal-and-success result — was captured in writing as you went. Decision, if that evidence is missing: treat the post-revocation check as failed, and apply this step's own decision above: stop and escalate as an incident. - Clean up. Remove each separately recorded temporary CI secret now, by its own exact name, then confirm it. Check: every temporary CI secret you recorded back in step 3 has itself now been removed and confirmed gone (any rehearsal-target grant or fixture credential recorded in step 3 or step 5 is already removed and confirmed in step 7) — and nothing is removed here that was not already recorded. Decision, if a recorded item will not remove: stop and escalate it the same way step 8 escalates a failed post-revocation check — never attempt to restore the already-revoked legacy credential to buy time, and keep using the verified replacement, which step 8 already confirmed works on its own. Reaching step 9 with an unverified consumer or entry point should be impossible, since step 7's own decision already blocks it; if you discover one anyway, the old credential is already revoked and there is no step to return to, so treat it exactly like any other post-revocation failure: stop and escalate as an incident, the same as step 8's own decision. Check (evidence): this step's own non-secret evidence — which recorded item you confirmed gone, and when — was captured in writing as you went. Decision, if that evidence is missing: treat cleanup as not confirmed, and apply this step's own decision above: stop and escalate it the same way step 8 escalates a failed post-revocation check.