# `Raxol.AgentClientProtocol.Ext.Capability.Keyring`
[🔗](https://github.com/DROOdotFOO/raxol-agent/blob/raxol_agent_client_protocol-v0.1.0/packages/raxol_agent_client_protocol/lib/raxol/agent_client_protocol/ext/attach_policy/token.ex#L261)

Verifier-side keyring load + validation.

```
config :raxol_agent_client_protocol,
  attach_keyring: %{
    "k1" => {:hex, "<64 hex chars>"},        # 32-byte Ed25519 public key
    "k2" => {:file, "/etc/raxol/k2.pub"},    # raw-32-bytes or hex file
    "k3" => {:raw, <<...32 bytes...>>}
  }
```

**Validated on every load**: `load/0` runs on each attach that carries a
token, and every value must normalize to exactly 32 bytes or it raises.
Under `AttachPolicy.Runner` that raise denies the attach as
`{:denied, :policy_crash}` and logs the error; nothing is checked at boot.

**HARD RULE:** the keyring comes from the VERIFIER's own
configuration ONLY. It is NEVER read from inside an attached artifact — a
`keyring.json` shipped in a tar'd session dir is untrusted data; loading it
would let whoever produced the tar mint their own admission. Rotation is
grow-only: ADD a kid to rotate; REMOVE a kid to revoke every token under it.

# `load`

```elixir
@spec load() :: %{optional(String.t()) =&gt; binary()}
```

Load + normalize the configured keyring to `%{kid => 32-byte pubkey}`.

# `normalize`

```elixir
@spec normalize(map()) :: %{optional(String.t()) =&gt; binary()}
```

Normalize a raw keyring map, raising on any non-32-byte key.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
