RequestStateSecurity

Configuration handed to McpServer.secureRequestState. The key is the operator-supplied secret (>= 32 bytes); an empty key makes the server generate a single-process ephemeral key (verification fails across instances or restarts — see secureRequestState).

Members

Variables

bindTo
RequestStateBinding bindTo;

Identity binding. Defaults to authSubject.

key
ubyte[] key;

The shared secret. The codec derives two independent 32-byte sub-keys from it via HKDF-SHA256 — one for AES-256-GCM, one for the bind/payload HMAC — so the cipher key and the MAC key never share bytes regardless of how long this secret is. MUST be >= 32 bytes when supplied.

mode
RequestStateMode mode;

Wire protection mode. Defaults to signed (HMAC-SHA256).

ttl
Duration ttl;

How long an issued blob stays valid. An echoed blob past exp fails verification and re-elicits. Defaults to 5 minutes.