Garage implements AWS Signature Version 4 authentication for S3 API requests. This page describes how authentication works and how to configure your S3 clients.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deuxfleurs-org/garage/llms.txt
Use this file to discover all available pages before exploring further.
Authentication Methods
Garage supports the following authentication methods:Signature v4
Standard AWS authentication using signature version 4
Presigned URLs
Time-limited URLs with embedded authentication
AWS Signature Version 4
Garage uses the same authentication mechanism as Amazon S3, based on HMAC-SHA256 signatures.Request Signing Process
When making authenticated requests to Garage:- Create a canonical request - Normalize the HTTP request into a standard format
- Create a string to sign - Combine request metadata with the canonical request hash
- Calculate the signature - Use your secret key to generate an HMAC-SHA256 signature
- Add signature to request - Include the signature in the
Authorizationheader
Authorization Header Format
TheAuthorization header follows this format:
Your Garage access key ID
Date in YYYYMMDD format (e.g., “20260304”)
The S3 region configured in your Garage instance (default: “garage”)
Semicolon-separated list of headers included in the signature
The calculated HMAC-SHA256 signature as hexadecimal string
Presigned URLs
Garage supports presigned URLs that allow temporary access to objects without requiring credentials.Creating Presigned URLs
Presigned URLs embed authentication information in query parameters:Signature algorithm, must be
AWS4-HMAC-SHA256Access key and scope in format:
{access_key}/{date}/{region}/s3/aws4_requestISO 8601 timestamp when the signature was created
Number of seconds until the URL expires (max: 604800 / 7 days)
List of headers that were signed
The presigned URL signature
Example: Generate Presigned URL with AWS CLI
URL Styles
Garage supports both path-style and virtual-hosted-style URLs:Virtual-hosted-style URLs require proper DNS configuration with wildcard support.
Authentication Errors
Common authentication error responses:| Error Code | HTTP Status | Description |
|---|---|---|
AccessDenied | 403 | Invalid credentials or insufficient permissions |
SignatureDoesNotMatch | 403 | Signature calculation error |
InvalidAccessKeyId | 403 | Access key does not exist |
RequestTimeTooSkewed | 403 | Request timestamp is too far from server time |
ExpiredToken | 400 | Presigned URL has expired |
Client Configuration
AWS CLI
boto3 (Python)
AWS SDK for JavaScript
Server-Side Encryption (SSE-C)
Garage supports customer-provided encryption keys (SSE-C):Encryption algorithm, must be
AES256Base64-encoded 256-bit encryption key
Base64-encoded MD5 digest of the encryption key