feat: support S3 SSE-C (customer-provided encryption keys)#1017
Draft
schaurian wants to merge 1 commit into
Draft
feat: support S3 SSE-C (customer-provided encryption keys)#1017schaurian wants to merge 1 commit into
schaurian wants to merge 1 commit into
Conversation
Surface the new `sseCustomerKey` field on `s3Credentials` through the ObjectStore CRD so users can enable Server-Side Encryption with Customer-provided keys (SSE-C). This is required by S3-compatible providers that only support SSE-C for encryption at rest, such as Hetzner Object Storage. The field flows through the embedded BarmanObjectStoreConfiguration from the barman-cloud library, so this change is limited to bumping the dependency, regenerating the CRD and the consolidated manifest, and documenting usage in the object stores guide. Depends on cloudnative-pg/barman-cloud#284 (temporarily pinned via a replace directive until that change is released). Closes cloudnative-pg#646 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Florian Schauer <florian@schauer.to>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for S3 Server-Side Encryption with Customer-provided keys (SSE-C) to the ObjectStore resource, closing #646.
S3-compatible providers such as Hetzner Object Storage do not offer bucket-managed encryption (SSE-S3 / SSE-KMS) and only support SSE-C. Without this, backups and WALs can only be stored unencrypted at rest on those providers.
Users can now reference a secret holding a base64-encoded 256-bit AES key via a new
sseCustomerKeyfield:What changed
The field is defined in the shared barman-cloud library and flows through the embedded
BarmanObjectStoreConfiguration, so the plugin change is intentionally small:go.mod/go.sumbarman-cloudto the version carryingsseCustomerKeyconfig/crd/bases/…_objectstores.yamlsseCustomerKey)manifest.yamlweb/docs/object_stores.mdNo controller logic changes are needed: the library injects
--sse-customer-key file://…into everybarman-cloud-*command (backup, wal-archive, wal-restore, restore, backup-list, backup-delete, check-wal-archive) and materializes the key from its secret, so all read/write paths are covered.This PR depends on cloudnative-pg/barman-cloud#284, which adds the
sseCustomerKeyfield and the--sse-customer-keywiring. Until that lands and is released,go.moduses a temporaryreplacedirective pointing at the change:Once barman-cloud#284 is released, the
replaceshould be dropped and therequirebumped to the released version. Kept as a draft until then.Runtime use additionally requires a sidecar image whose
barman-cloudbuild ships the--sse-customer-keyoption (barman#973, merged tomaster).Testing
go build ./...,go vet ./...— cleanmanifest.yamlregenerated withcontroller-gen v0.21.0; both parse as valid YAML and diff to exactly the new field.Closes #646
🤖 Generated with Claude Code