Expand description
Camp-principal bootstrap — provision a camp on behalf of a user U.
See .yah/docs/working/mcp-auth-and-ownership.md §Camp bootstrap. This
module is the origin-side implementation of the doc’s mint flow #2
provisioning step:
- Yubaba (authenticated as its service principal) calls
POST /admin/camps/bootstrapwith aNewCampPrincipal+ aUserDelegation(a payload signed by user U via the yah-side W122 flow). The HTTP layer lives incheers-axum. CampAuthority::provisionverifies the delegation’s Ed25519 signature against a key trusted for U (perUserSigningKeyStore), allocates aPrincipalofkind = Campwithbound_to = Some(user:U), persists the delegation as the auditable “U authorised camp C” record, and issues aCampBootstrapCredentialthat the camp later exchanges for a short-TTL access token viaMcpAuthority::mint_bootstrap.- Cascading revocation:
CampAuthority::revoke_user_cascadeflips every camp principalbound_to: UtoRevokedin one sweep. Revoking U revokes every camp bound to U; revoking the camp alone does NOT touch U.
The crate-direction invariant from R019 still holds: this module is
origin-only (it verifies a signed delegation and persists a credential).
cheers-verify consumers (kamaji, CF Worker) never depend on this
crate — they verify the MCP-call tokens minted via path #2, not the
bootstrap credential itself.
Structs§
- Camp
Authority - Origin-side facade for camp-principal provisioning + cascade revocation.
- Camp
Bootstrap Credential - One row in the camp-bootstrap-credential table.
- Camp
Bootstrap Policy - TTL defaults for a bootstrap credential.
- Memory
Camp Principal Store - Memory
User Signing KeyStore - In-memory
UserSigningKeyStorefor tests and single-node bootstrapping. Cheap toclone— shares one backing map. - NewCamp
Principal - Provision input — what callers hand to
CampAuthority::provision. - Provisioned
Camp - The output of a successful
CampAuthority::provisioncall — the camp principal record and the long-lived bootstrap credential the caller hands to yubaba. - User
Signing Key - One Ed25519 pubkey trusted for delegations signed by a user.
Enums§
- Camp
Authority Error - Typed failure modes for
CampAuthorityoperations. - User
Signing KeyStatus - Lifecycle state of a user’s signing key — mirrors
SigningKeyStatuson the service-principal side. OnlyActivekeys are accepted for delegation verification.
Traits§
- Camp
Principal Store - Persistence for the camp-principal surface — principal records, bootstrap credentials, and the retained delegation audit trail.
- User
Signing KeyStore - Persistence for
UserSigningKeyrecords.