Skip to content

Multi-account credentials per provider family: id convention + import sources (custody side of insula#1 GAP-1/2) #2

Description

@iceteaSA

Hit this while provisioning the vault on our Linux box (context: insula#1, filed by us — GAP-1/GAP-2 there cover the consumption side; this issue is the custody side).

Problem

There is no way to seal a second account in the same provider family, and no id convention for one if there were.

Concretely, on this box:

  • anthropic: two OAuth accounts (main + a work-alt). ck auth import --source opencode --provider anthropic reads opencode's auth.json, which only carries the currently-active account. The fallback account lives in the harness auth plugin's own state file (anthropic-auth.json, accounts array keyed by account uuid) — no import source reads it.
  • openai: three Codex accounts, same shape — auth.json has the active one, the other two live in the openai-auth plugin's sidebar state.
  • antigravity: one paid + three free accounts in antigravity-accounts.json. The free accounts' tokens rotate constantly under the plugin's own rotation logic, so a vault snapshot of them goes stale in hours — these probably should NOT be sealed until the vault is the refresher, which makes the id question sharper for the paid+free split.

We stopped at one credential per family (oauth:anthropic, chatgpt:openai, antigravity:google) rather than inventing an id scheme (oauth:anthropic:<uuid>?) that triage here might contradict.

Asks

  1. Is a multi-account id convention planned? If you name one (suffix, separate namespace, whatever), we'll adopt it immediately and report back from a real multi-account box.
  2. Should import grow sources for harness multi-account state files, or is the intended path "run ck auth login once per account" (which mints vault-native credentials and sidesteps the import question)?

Related: the consumer side (how insula's family map would address a second account) is GAP-1/GAP-2 in insula#1 — answering it in either repo likely answers both.

Dual-custody note

Until the vault is the sole refresher, every sealed OAuth credential has two independent refreshers (harness auth plugin + vault adapter) racing on the same refresh token. For our five primaries that risk is worth it because insula consumes them; for fallback accounts there is no consumer yet, so we're deliberately holding them out. If there's a recommended posture here (e.g. seal-but-disable-refresh), the runbook is where we'd expect it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions