§8 Binding

Normative rules for credential binding: one mode per pack, hubs, families, fail-closed mint, explicit mock, connect, and health.

On this page

Binding is how a command obtains credentials without the pack holding any.

8.1 Declaration#

  1. A pack MAY declare binding in the manifest (§3.3). A pack that executes against any protected resource MUST declare a mode.
  2. A pack MUST declare at most one mode.
  3. A pack MUST NOT contain credential material. Runtimes SHOULD reject a pack whose files contain material that matches common credential patterns.

8.2 Modes#

ModeMeaningConnect
publicNo credentialMUST be skipped; Principal still attributed
userDelegated credential for the PrincipalRequired
localMachine-local credential storeRequired
mothershipOperator or fleet identityRequired; elevation grant for non-operator Principals
mockExplicit test credentialMUST be requested in the envelope (args.mode = "mock")
  1. A control-plane pack MUST use mothership (§2.5).
  2. A runtime MUST NOT execute a mothership Binding for a Principal that lacks an explicit operator or elevation grant.
  3. A runtime MUST NOT select a mode based on the Invoker type or on environment contents.

8.3 Hubs and families#

  1. hub names the kind of component expected to mint: keyring, local-credential, public, none. Its implementation is a runtime concern.
  2. Packs sharing a family SHOULD share one consent per Principal. Connecting one pack in a family MAY connect the family.
  3. When several packs in a family are linked, the runtime SHOULD union their delegated scopes.
  4. Family MUST be expressed as a manifest field, not as a directory structure.

8.4 Mint#

  1. For modes other than public, a runtime MUST obtain the credential from its hub at exec time for the Principal, pack, and family.
  2. If mint fails, the runtime MUST refuse the command. It MUST NOT fall back to an environment variable, a file the pack shipped, or any ambient source.
  3. A runtime MUST ignore environment flags that request mock behaviour. Mock is explicit in the envelope only, and a runtime MAY refuse mock outside sandbox.
  4. Minted material MUST be handed to the Adapter through a channel the wrapped tool already understands (environment, file) and MUST NOT be written to Skills, logs, or results.

8.5 Connect#

  1. Establishing or refreshing Binding is a command with operation: write.
  2. It MUST be gated by capability pack.connect (§9.4), not by verb.exec.write.
  3. Connect MUST NOT be required for public packs.
  4. The reference lifecycle command is hcp connect <pack_id>; packs MAY also expose a domain connect or setup.* command that performs the same step.

8.6 Health#

  1. Health commands (doctor, status) MAY report Binding state and MUST NOT mint long-lived credentials.
  2. Binding degradation SHOULD be announced as the trigger binding.degraded (§7.7) with a state from linked, stale, needs_reauth, pending, error.
  3. Recovery is a human or elevated connect. The Sense path never re-mints automatically.

8.7 Binding and Principal#

  1. Binding identity and Principal MUST be recorded separately in audit (§9.6).
  2. A runtime MUST NOT infer one from the other.

8.8 Prohibitions#

  • Secrets in surface.json, policy.json, or HARNESS.md.
  • Two modes on one pack.
  • Silent env-token fallback.
  • Env-flag mocks.
  • Operator Binding reachable from an end-user Principal without elevation.