Class IdentityReservedInboundHeaders

Assembly: redb.Identity.Contracts.dll

Exchange header names that carry internal, server-derived state and must never arrive from a
caller. Every transport connector (HTTP, gRPC metadata and envelope headers, SOAP over HTTP)
copies the caller's headers into In.Headers verbatim, while Core processors trust these
names as if a facade processor had set them: session_user_id becomes the authenticated
principal on the authorize route, user_id / ip_address / user_agent /
client_id sign the audit log, access_token / client_secret feed
authentication. Each facade removes them as its first step, so only its own trusted processors
(cookie, Authorization header, body, path, method address) can populate them afterwards. The one
list lives here so a name added for one transport is stripped on all of them.

Deliberately NOT here: operation. Over HTTP it is internal (derived from the method and
path, so the HTTP facade strips it on its own), but on the gRPC envelope route the caller names
the operation in metadata by design — that transport's equivalent of a URL path.


Also here: Set-Cookie, a response header no caller has any business sending. The routes
answer on the request message, and the cookie writers add to whatever Set-Cookie is already
on it — so a caller's own value ended up in the same array as ours and went back out with it. The
transport refuses to echo a request header only while it is the untouched object the client sent,
and an array built around it is not.

public static class IdentityReservedInboundHeaders

Inheritance

Object→IdentityReservedInboundHeaders

Methods

Strip(IDictionary<string, object?>)

Removes every reserved name from headers (case-insensitive dictionaries remove any casing).

public static void Strip(IDictionary<string, object?> headers)