Skip to content

fix: grant the instance role access to the SSE-C key secret - #1

Merged
schaurian merged 1 commit into
schaurian:feat/s3-sse-cfrom
andrein:ssec-rbac
Sep 8, 2026
Merged

schaurian merged 1 commit into
schaurian:feat/s3-sse-cfrom
andrein:ssec-rbac

Conversation

@andrein

@andrein andrein commented Sep 8, 2026

Copy link
Copy Markdown

Fix on top of your feat/s3-sse-c branch (cloudnative-pg#1017), so it lands as part of that PR.

The sidecar reads credential Secrets through the per-cluster Role that BuildRoleRules assembles from CollectSecretNamesFromCredentials. The new sseCustomerKey reference is not in that list, so a key kept in its own Secret, as in the aws-sse-c example in the docs, is forbidden to the sidecar and every barman-cloud command fails to resolve credentials. It only works today when the key shares a Secret with the access keys. This adds the reference to the collection, with a test.

Sits directly on your branch head (adb7045), nothing else pulled in.

One observation while testing against an S3 provider that only offers SSE-C: the branch is based on v0.14.0, whose sidecar pins Barman 3.19.1, and --sse-customer-key exists from 3.20.0, which main pins since v0.15.0. A rebase onto main is needed before the feature can work end to end.

The sidecar reads credential secrets through a Role whose resource
names are collected from the credential references. Without the new
reference in that list, a key kept in its own secret, as in the docs
example, is forbidden and every barman-cloud command fails.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Andrei Nistor <andrei@nistor.tech>
@andrein
andrein marked this pull request as ready for review September 8, 2026 12:19
@schaurian
schaurian merged commit 0b42a5f into schaurian:feat/s3-sse-c Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants