fix(s3): treat SSE-C encryption_key as a secret (CVE-2026-28377) - #6711
Conversation
…exposure (CVE-2026-28377) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses CVE-2026-28377 by preventing S3 SSE-C (CustomerEncryptionKey / encryption_key) from being handled as a plain string in configuration, reducing the risk of accidental exposure via config dumps and similar outputs.
Changes:
- Change S3 SSE-C
CustomerEncryptionKeyfromstringtoflagext.Secretand register it as a secret flag value. - Update SSE-C config building to read the secret value via
CustomerEncryptionKey.String(). - Add a CHANGELOG entry describing the fix and referencing the CVE.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tempodb/backend/s3/config.go |
Converts SSE-C encryption_key to flagext.Secret and updates flag registration to treat it as secret-like config. |
tempodb/backend/s3/s3.go |
Uses the secret wrapper value when validating/constructing MinIO SSE-C encryption config. |
CHANGELOG.md |
Documents the security fix in the unreleased changelog section. |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens Tempo’s S3 backend configuration by treating the SSE-C encryption_key as a secret, reducing the risk of exposing customer-provided encryption keys via config marshaling/dumps and similar outputs.
Changes:
- Change
SSEConfig.CustomerEncryptionKeyfromstringtoflagext.Secretand register it as a secret flag value. - Update SSE-C config building to read the key via
flagext.Secret.String(). - Add a unit test asserting the key is redacted when YAML-marshaled, and add a changelog entry referencing the CVE.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tempodb/backend/s3/s3.go | Reads SSE-C encryption key from flagext.Secret when building MinIO SSE config |
| tempodb/backend/s3/config.go | Changes SSE-C encryption_key type to flagext.Secret and updates flag registration |
| tempodb/backend/s3/compactor_test.go | Adds test verifying YAML redaction of encryption_key |
| CHANGELOG.md | Documents the security-related bugfix and CVE reference |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR mitigates accidental exposure of the S3 SSE-C customer-provided encryption key by treating encryption_key as a secret type (consistent with other S3 credentials handling in Tempo).
Changes:
- Change
SSEConfig.CustomerEncryptionKeyfromstringtoflagext.Secretand update flag registration accordingly. - Update SSE-C config construction to use the secret value via
.String(). - Add a unit test ensuring YAML marshaling redacts the encryption key and document the fix in the changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
tempodb/backend/s3/s3.go |
Uses the secret-backed encryption key when building the MinIO SSE-C config. |
tempodb/backend/s3/config.go |
Switches SSE-C encryption_key to flagext.Secret and registers it via flag.Var. |
tempodb/backend/s3/config_test.go |
Adds a YAML redaction test for the SSE-C encryption key. |
CHANGELOG.md |
Adds a CVE-related bugfix entry for the secret-handling change. |
…, changelog grammar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…as a secret (CVE-2026-28377) (#6713) * fix(s3): treat SSE-C encryption_key as a secret to prevent plaintext exposure (CVE-2026-28377) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(s3): assert SSE-C encryption_key is redacted in YAML output Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(s3): gofmt config.go and move SSE redaction test to config_test.go Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(s3): address review feedback - local var for key, yaml.v3 in test, changelog grammar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: add v2.10.3 changelog heading for CVE-2026-28377 fix Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…fana#6711) * fix(s3): treat SSE-C encryption_key as a secret to prevent plaintext exposure (CVE-2026-28377) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore: update changelog with PR number and author Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(s3): assert SSE-C encryption_key is redacted in YAML output Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(s3): gofmt config.go and move SSE redaction test to config_test.go Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(s3): address review feedback - local var for key, yaml.v3 in test, changelog grammar Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
encryption_key(CustomerEncryptionKey) was stored and registered as a plainstring, risking exposure in logs, config dumps, and API responsesflagext.Secretto match howsecret_keyandsession_tokenare already handledTest plan
go test -race ./tempodb/backend/s3/...passes🤖 Generated with Claude Code