Skip to main content

Module inject

Module inject 

Source
Expand description

Credential injection middleware.

Scans outgoing HTTP request bodies and headers for credential reference patterns (${CRED:ref_name}) and substitutes them with resolved secret values. Also scans response bodies to ensure credentials never leak back to the agent.

This module provides standalone async functions. Wiring into the full proxy pipeline is done in the main binary crate.

Structs§

InjectedRequest
Result of injecting credentials into a request.

Functions§

find_refs
Collect all ${CRED:...} references found in input.
inject_credentials
Inject credentials into a request body and a set of headers.
scrub_response
Encoding-aware response scrubbing using SecretString values.
scrub_response_plain
Encoding-aware response scrubbing for plain &[String] values.