mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-05 00:39:38 +03:00
🐛 Bug Report: GCS S3 Compatibility: SignatureDoesNotMatch error with AWS SDK v2 (v1.16.0) #561
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @plotikai on GitHub (Dec 6, 2025).
Reproduction steps
Hey team, I've spent a bunch of time trying to implement this with ai with no success, I got it to write what ive been trying and looking for help here. Forgive me as im just a humble vibecoding homelabber trying to get this running
Description
The application fails to initialize when configured to use Google Cloud Storage (GCS) as the S3 backend, failing with a
SignatureDoesNotMatcherror. This occurs despite valid credentials and correct region configuration verified via other tools.Steps to Reproduce
us-east1).docker compose up).Troubleshooting Performed
boto3from the same machine. The script successfully listed objects in the bucket usingus-east-1(andus-east1), confirming network access and permissions are correct.us-east1(Correct GCS region for my bucket): ResultSignatureDoesNotMatch.us-east-1: ResultSignatureDoesNotMatch.auto: ResultSignatureDoesNotMatch.S3_REGION=): ResultA region must be set.S3_FORCE_PATH_STYLEbetweentrueandfalse. The error persists (thoughfalseis generally recommended for GCS).Analysis
The error
operation error S3: ListObjectsV2suggests the application is using AWS SDK for Go v2. GCS S3 interoperability has known issues with AWS SDK v2's default behavior, particularly regarding:Accept-Encoding) in the signature calculation that GCS does not expect, causing the signature mismatch.It seems the current implementation prevents GCS from being used as a backend. Support for GCS (handling the specific header quirks or falling back to ListObjectsV1) would be greatly appreciated.
Expected behavior
The application should successfully authenticate with the S3-compatible GCS endpoint, initialize the storage backend, and start up.
Actual Behavior
The application fails to start and enters a restart loop. The logs show a 403 Forbidden error with
SignatureDoesNotMatchduring theListObjectsV2operation:Pocket ID Version
1.16.0
Database
PostgreSQL 17.6
OS and Environment
Ubuntu 24.04.3 LTS, Docker v29.0.2, Docker Compose v2.40.3
Traefik v3.6.1
Log Output
@stonith404 commented on GitHub (Dec 17, 2025):
Thanks for the bug report. This seems like a common issue with the new AWS SDK: https://github.com/aws/aws-sdk-go-v2/issues/1816.
We would have to implement a custom middleware that ignores the
Accept-Encodingheader for GCS. In my opinion it's not worth to implement custom logic for a specific S3 provider, this should rather be fixed by Google or Amazon.Here are the changes that would be necessary to add support for GCS to Pocket ID. If you really need GCS compatibility you can fork the project and apply those changes:
GCS compatibility.patch