Skip to content

Add S3 SSE-KMS environment variable support - #2597

Open
cuppett wants to merge 1 commit into
nextcloud:masterfrom
cuppett:feat/s3-sse-kms-support
Open

Add S3 SSE-KMS environment variable support#2597
cuppett wants to merge 1 commit into
nextcloud:masterfrom
cuppett:feat/s3-sse-kms-support

Conversation

@cuppett

@cuppett cuppett commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Nextcloud server PR nextcloud/server#57623 added sse_kms_enabled and sse_kms_key_id objectstore arguments to support AWS Server-Side Encryption with KMS (SSE-KMS) for S3 primary storage.
  • Expose this via two new environment variables, mirroring the existing SSE-C support:
    • OBJECTSTORE_S3_SSE_KMS_ENABLED: enables SSE-KMS using the bucket's default KMS key
    • OBJECTSTORE_S3_SSE_KMS_KEY_ID: specific KMS key ARN/ID to use; setting this implies SSE-KMS is enabled
  • Updated .config/s3.config.php (source template) and regenerated all versioned copies via ./update.sh.
  • Documented both new variables in README.md alongside the existing SSE-C entry.

Test plan

  • php -l on the source template and a regenerated copy
  • Confirmed all versioned s3.config.php copies remain byte-identical to .config/s3.config.php
  • Verified env var matrix behavior (unset, enabled-only, key-id-only, disabled, disabled-with-key-id) produces the expected objectstore arguments
  • End-to-end test against a real S3 bucket + KMS key on a Nextcloud server version that includes the SSE-KMS support (server 34+)

🤖 Generated with Claude Code

@cuppett cuppett added enhancement upstream 3. to review Waiting for reviews feature: auto config (environment variables) Auto configuring via environment variables labels Aug 17, 2026
Nextcloud server PR nextcloud/server#57623 added sse_kms_enabled and
sse_kms_key_id objectstore arguments for AWS SSE-KMS encryption.
Expose them via OBJECTSTORE_S3_SSE_KMS_ENABLED and
OBJECTSTORE_S3_SSE_KMS_KEY_ID env vars, mirroring the existing SSE-C
support.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
@cuppett
cuppett force-pushed the feat/s3-sse-kms-support branch from 952494a to f2a47ef Compare August 18, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement feature: auto config (environment variables) Auto configuring via environment variables upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant