mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-09 04:32:44 -05:00
[PR #6840] feat: improve S3-compatible OpenDAL configuration via URI query params #7486
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?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/6840
Author: @g-roliveira
Created: 2/17/2026
Status: 🔄 Open
Base:
main← Head:feature/s3-compatible-opendal📝 Commits (10+)
2fdcfa6feat: add S3-compatible OpenDAL URI parameter parsing63b2538ci: add MinIO integration test job for S3-compatible mode7c95c8cdocs: document S3-compatible URI parameters and examplesb4dff01fix: satisfy clippy and rustfmt for S3 config parsing7b74969ci: harden MinIO startup in S3 integration job2b60e58fix: enforce unknown S3 params and repair MinIO CI command5996a78fix: stabilize unknown-param test and set MinIO region2f50301test: make unknown S3 parameter assertion robust7b2b450ci: add manual R2 integration workflow0f7fea5Revert "ci: add manual R2 integration workflow"📊 Changes
5 files changed (+553 additions, -12 deletions)
View changed files
📝
.env.template(+27 -1)📝
.github/workflows/build.yml(+69 -0)📝
README.md(+63 -0)➕
docs/s3-compatible-object-storage.md(+105 -0)📝
src/config.rs(+289 -11)📄 Description
Summary
This PR improves S3-compatible object storage support by parsing and applying URI query parameters for OpenDAL S3 configuration across Vaultwarden storage paths.
It keeps AWS defaults unchanged while enabling robust provider-specific overrides for MinIO, Cloudflare R2, Ceph RGW, and similar S3-compatible endpoints.
What changed
DATA_FOLDERATTACHMENTS_FOLDERICON_CACHE_FOLDERSENDS_FOLDERs3://...URIs, including:endpointregionenable_virtual_host_style(including alias handling)default_storage_class(including empty value to omit storage class)CI / tests
Docs
.env.templatewith S3-compatible parameter guidance and examples.README.mdwith practical S3-compatible usage examples.s3feature (sqlite,s3/postgresql,s3/mysql,s3).Manual validation
region=auto+ path-style.Compatibility notes
Operational notes (browser downloads on S3-compatible storage)
When attachments are stored in S3-compatible backends, Web Vault downloads use presigned URLs and are fetched directly by the browser.
To make downloads work reliably, configure both sides:
ALLOWED_CONNECT_SRCto include the object-storage origin (for examplehttps://<accountid>.r2.cloudflarestorage.com).DOMAIN) forGET/HEADand returnAccess-Control-Allow-Origin.Typical errors and causes:
violates the document's Content Security Policy-> missing/incorrectALLOWED_CONNECT_SRC.No 'Access-Control-Allow-Origin' header-> missing/incorrect bucket/provider CORS policy.Follow-up suggestion
Potential future improvement: provide an optional server-side download mode/proxy to reduce CORS setup friction for some deployments.
Trade-offs: extra traffic through Vaultwarden, higher resource usage, and different scalability characteristics.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.