AWS SigV4 Credential Signing
AWS SigV4 credential signing lets sandbox agents call AWS services (Bedrock, S3, STS, and others) through the proxy’s CONNECT tunnel. The proxy intercepts outbound requests, strips the sandbox client’s placeholder Authorization header, and re-signs the request with real AWS credentials from the provider. The sandbox never sees the real credentials.
Prerequisites
- A provider with
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYcredentials configured. Optionally includeAWS_SESSION_TOKENfor STS temporary credentials. - A sandbox policy with
credential_signingenabled on the target endpoint.
Provider Setup
Create a provider with AWS credentials:
For STS temporary credentials, include the session token:
Policy Configuration
Enable SigV4 signing on a per-endpoint basis using three policy fields:
Bedrock Example
The Bedrock example uses rules for fine-grained access control. When rules are present, omit the access field — they are mutually exclusive.
S3 Example
STS Example
Signing Modes
The credential_signing field accepts three values:
In sigv4 auto-detect mode, the proxy inspects the x-amz-content-sha256 header sent by the client SDK:
- Hex hash → buffer body and sign it (same as
sigv4:body). UNSIGNED-PAYLOAD→ sign headers only (same assigv4:no_body).STREAMING-UNSIGNED-PAYLOAD-TRAILER→ sign headers only, stream body through.- Absent → sign body if
Content-Lengthis present, otherwise use unsigned payload.
Chunk-signed streaming modes like STREAMING-AWS4-HMAC-SHA256-PAYLOAD are not supported. The proxy cannot reproduce per-chunk signatures. If your client SDK sends chunk-signed requests, use sigv4:no_body instead.
Region Detection
The proxy extracts the AWS region from the endpoint hostname automatically. It supports standard, dualstack, FIPS, virtual-hosted, GovCloud, and China partition hostnames.
For endpoints where the region cannot be inferred from the hostname, set signing_region explicitly:
Restrictions
credential_signingandrequest_body_credential_rewriteare mutually exclusive on the same endpoint. The policy validator rejects policies that set both.- The
sigv4:bodymode buffers at most 10 MiB. Requests with larger bodies are rejected. Usesigv4:no_bodyorsigv4(auto-detect) for large payloads. - The proxy requires
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYin the provider. If either is missing, the request fails with an error.
Use from a Sandbox
Inside a sandbox, configure the AWS SDK with placeholder credentials. The proxy replaces them with real credentials during re-signing:
Then use any AWS SDK or CLI normally. The proxy transparently re-signs requests before forwarding to AWS.