In this article
Trust the authenticated forwarding path and sanitize caller fields before using reported certificate identity; parsing a certificate does not establish its provenance.
Locate the TLS peer before trusting its certificate identity
An enterprise AI tool backend sits behind a reverse proxy that terminates mutual TLS. The backend receives an HTTP field containing a client certificate and uses it to select a protected account. The original client did not establish TLS directly with that backend. The trust question is therefore how the certificate observation crosses the proxy boundary, and whether a public caller can supply an indistinguishable field.
Use the forwarding contract rather than an arbitrary header
RFC 9440 defines Client-Cert and Client-Cert-Chain for a TLS-terminating reverse proxy. It requires removing or overwriting incoming occurrences before forwarding, including sanitizing requests without client-certificate authentication. The backend must accept these fields only from a trusted forwarding path. Enabling the ordinary happy path is insufficient: a proxy can forward the genuine certificate correctly while also leaving a route through which an untrusted caller controls the identity field.
Parse the specified representation
The fields use Structured Fields byte-sequence and list representations. RFC 8941 defines a byte sequence as base64 between colon delimiters. Follow the certificate field’s declared encoding and cardinality rather than interpreting it as an arbitrary PEM string or splitting every value with a generic text helper. Parsing validity establishes representation, not that the bytes came from the trusted proxy. Those checks belong at different boundaries and need different failure evidence.
Protect the route between proxy and origin
Document which authenticated connection or constrained network path makes the proxy trusted to report the original client. A direct backend listener available to ordinary callers can defeat an otherwise correct edge configuration. Keep forwarding enabled only where its intended contract applies. When the backend authorizes a tool operation, bind the validated client identity to the requested resource using application policy. A client certificate does not automatically grant all operations exposed behind the proxy.
Test injection alongside ordinary authentication
Use an authorized test certificate and a harmless protected resource. Compare genuine mutual-TLS requests, requests without a client certificate and requests that deliberately include a forged certificate field at the public edge. Inspect what reaches the backend. Exercise any permitted direct-origin route separately to confirm the expected trust restriction. Acceptance requires the backend to distinguish the validated proxy observation from caller-supplied text before creating a tool effect. No certificate deployment or injection test was executed here.
Record the original client and forwarding peer separately
Retain safe certificate identity references, proxy identity and the enforced route, without private keys or full bearer credentials. Container CA trust concerns the trust store used to validate a TLS peer; it does not establish provenance of a forwarded field. Inference telemetry redaction explains why diagnostic records need bounded content. The result here should identify who authenticated the original client and why the origin trusts that report. Successful parsing or encrypted transport alone cannot substitute for the missing forwarding trust relationship.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.