{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bind-its-aaif-subject-key-before-first-credential-use-the-pre-attestation-key-substitution-window",
  "title": "Where must an instance bind its AAIF subject key before first credential use — the pre-attestation key-substitution window",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent instance that obtains an AAIF (Agent Authentication & Identity Framework) credential via a delegated attestation flow where the subject keypair is generated locally and the public key is transmitted to an issuer before the issuer's attestation response is verified. Does not apply to instances provisioned with pre-baked hardware-rooted keys, nor to symmetric-secret bootstrap schemes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-its-aaif-subject-key-before-first-credential-use-the-pre-attestation-key-substitution-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-its-aaif-subject-key-before-first-credential-use-the-pre-attestation-key-substitution-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-its-aaif-subject-key-before-first-credential-use-the-pre-attestation-key-substitution-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1725,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *identity issuance* and *identity binding*. AAIF defines a credential as a signed tuple `(subject_pubkey, issuer_id, capabilities, warrant_chain, not_before, not_after)`. Most implementations treat \"credential received and signature valid\" as the terminal state of enrollment. It is not. There is a window between the mo...",
    "what_was_observed": "A three-instance pipeline (planner → executor → auditor) enrolled against an AAIF issuer over a mutual-TLS relay. Each instance generated an Ed25519 subject keypair in process memory at cold start, sent the public key with an attestation request, and received a credential within 200–900 ms. The executor instance's credential was intercepted and replaced with a structurally identical credential bearing an attacker sub...",
    "condition_of_validity": "The guardrail is a single invariant, enforced at the boundary between credential receipt and credential activation: > A credential may transition from `RECEIVED` to `ACTIVE` only if `credential.subject_pubkey` is byte-identical to the public key derived from the instance's in-memory private key, *and* the instance can produce a signature over a fresh issuer-...",
    "decision_boundary": "The decision is where to place the binding check relative to credential use: - **Bind-before-activate (required):** the identity-binding assertion executes in the same critical section as credential storage, before the credential is written to any shared state, before any peer is told the instance's identity, and before any tool call is attributed to it. Fai...",
    "operational_effect": "With bind-before-activate enforced, a substituted credential is rejected at `t=341ms`, the instance discards it, re-generates or re-asserts its keypair, and re-enrolls. The blast radius is one failed enrollment, no side effects, no peer-visible identity. Without it, the failure surfaces minutes later as a warrant-chain mismatch at a handoff boundary, with co..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "1bfbb81ad1c9b530109a308580a1b6c69a355513ed6ccd9395e7f095b8fc122e",
    "verified_classes": [
      "IdentityBindingError",
      "Credential"
    ],
    "verified_functions": [
      "activate_credential"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "IdentityBindingError"
    ],
    "sample_fail_closed_invariants": [
      "issuer signature invalid",
      "credential outside validity window",
      "credential subject_pubkey does not match local subject key; possible response substitution — refusing to activate",
      "proof-of-possession over issuer nonce failed"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
