mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
HttpxSigV4Signer is the real SignerFactory body for the aws_sigv4 arm: it maps the typed credential source (StaticKeys / AssumeRole / Ambient) onto v1's MCPSigV4Auth, so the signed headers stay byte-identical to v1 by construction (the signer relocates into the v2 package when v1 is retired). Credentials resolve eagerly off the event loop (asyncio.to_thread) so an unassumable role or a missing ambient chain fails closed at build time rather than mid-request; STS connection errors map to upstream_unavailable, everything else to misconfigured. This is the seam-agnostic body only. Wiring it into the bridge and grafting it at _create_mcp_client's aws_auth seam (aws_sigv4 signs per request, so it cannot ride the header seam the other modes use) is a follow-up. Tests cover signing a real request (AWS4-HMAC-SHA256 + X-Amz-Date), the session-token path (X-Amz-Security-Token), region/service in the credential scope, and the error classification. |
||
|---|---|---|
| .. | ||
| mcp_server | ||