feat(attestation): add API token name and federated subject to auth info

Merged
MI
2d ago
+173-15

Adds two optional fields to the attestation auth information so that a reader can identify the credential without a control plane lookup:

  • name: the API token name, read from the token_name claim. Set only for AUTH_TYPE_API_TOKEN.
  • subject: the OIDC subject, read from the sub claim. Set only for AUTH_TYPE_FEDERATED (for example repo:org/repo:ref:refs/heads/main on GitHub Actions).

The CLI token parser extracts both values, attestation init stores them in the crafting state, and the Chainloop predicate renders them with omitempty. Old attestations, user tokens, and tokens without these claims are unchanged.

Closes #3757

This PR was produced with AI assistance (Claude Code).

šŸ¤– Generated with Claude Code