feat:Add Dual Layer Server-Side Encryption via DSSE-KMS - #62539
Conversation
Follow-up to nextcloud#57623 (SSE-KMS). Adds a single `sse` objectstore argument (none/sse-s3/sse-c/sse-kms/sse-kms-dsse) so DSSE-KMS, encryption context, and S3 Bucket Keys can be configured without ambiguous or silently conflicting combinations of booleans. `sse_c_key` and `sse_kms_enabled` remain as deprecated aliases so existing configs keep working unchanged. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Stephen Cuppett <steve@cuppett.com>
…t exception Conflicting sse* arguments now resolve deterministically instead of throwing: sse_c_key + sse_kms_enabled both set falls back to SSE-C, matching the behaviour already released in Nextcloud 34, and an explicit sse argument always overrides the deprecated keys. Every resolution is recorded and logged once via getConnection(), including a warning on any SSE-C usage, so the fallback is no longer silent. sse_kms_bucket_key with sse-kms-dsse also moves from a hard exception to a warning: verified against a live bucket that S3 accepts the request and simply does not apply the bucket key, rather than rejecting it as AWS's own documentation suggests. Adds a live test suite (S3EncryptionModesLiveTest) exercising the full sse mode matrix and cross-mode reads against a real AWS bucket and KMS key, and extends the offline S3ServerSideEncryptionTest with precedence, warning, and logger-emission coverage. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Stephen Cuppett <steve@cuppett.com>
The SSE-C deprecation warning added in the previous commit hedged that upstream hadn't announced a deprecation. That was wrong: SSE-C is deprecated since Nextcloud 34 because Amazon S3 disabled SSE-C by default for new buckets in April 2026 (independently reproduced against a live bucket). Corrects the warning text and a comment that had denied the deprecation, and adds the admin-facing signal that was missing: a SetupCheck surfaced in Settings > Overview, following the same version+reason phrasing convention used elsewhere for deprecated config values (e.g. FilenameValidator, PhpOutdated). Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Stephen Cuppett <steve@cuppett.com>
Signed-off-by: Stephen Cuppett <steve@cuppett.com>
7d0a900 to
4d30006
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Extends the SSE-KMS support merged in #57623 with AWS DSSE-KMS, and replaces the two
booleans that PR introduced (
sse_c_key,sse_kms_enabled) with a singlessemodeargument (
''/sse-s3/sse-c/sse-kms/sse-kms-dsse), since a third modecouldn't be added to that config shape without either a second mutually-exclusive
boolean or a discriminator.
sseobjectstore argument selects the encryption mode explicitly.sse_c_keyand
sse_kms_enabledremain as deprecated aliases — existing configs keep workingunchanged, resolved by the same precedence Nextcloud 34 already shipped (SSE-C wins
if both are set), but the fallback is now logged instead of silent.
sse_kms_encryption_contextandsse_kms_bucket_key, the two SSE-KMS featuresthat make it useful for the multi-tenant case feat(objectstore): Add AWS SSE-KMS encryption support for S3 storage #57623 described (encryption context
for
kms:EncryptionContextpolicy conditions on a shared bucket; bucket keys forKMS request cost reduction).
SSE-C by default for new buckets in April 2026, which we hit directly during live
testing against a fresh bucket. Adds a
SetupCheck(Settings → Overview) so this isactually visible to admins, not just a log line.
from feat(objectstore): Add AWS SSE-KMS encryption support for S3 storage #57623: docs: document S3 SSE-KMS support and deprecate SSE-C documentation#15375. It predates the
sseargument, DSSE-KMS,encryption context, and bucket keys added here, so it'll need a follow-up once this
merges.
Tested against a real AWS bucket + KMS key (all
ssemodes, cross-mode reads, SSE-Cnegative-read path, multipart under DSSE) and against MinIO for the non-AWS regression
path.
TODO
admin-s3-sse-clinkToDocs()redirect key once docs: document S3 SSE-KMS support and deprecate SSE-C documentation#15375'ss3-sse-canchor existssse,sse-kms-dsse,sse_kms_encryption_context,sse_kms_bucket_keyChecklist
3. to review, feature component)stable32)AI (if applicable)