mirror of
https://github.com/versity/versitygw.git
synced 2026-10-22 14:22:40 +00:00
Add request plumbing for server-side encryption with customer-provided keys (SSE-C) and stop silently ignoring it on backends that cannot honor it. Previously SSE-C headers were dropped before reaching the backend, so posix stored the data unencrypted and returned success, and later reads without the key succeeded. Clients believed their data was encrypted when it was not. Partial or malformed SSE-C header sets were also accepted instead of failing with 400 as S3 does. Rejecting SSE-C explicitly is the safe behavior until posix implements it, and azure cannot faithfully map SSE-C onto customer-provided keys. This addresses part of #2193: invalid/partial SSE-C headers now fail with 400. Requiring SSE-C headers on reads of SSE-C objects depends on posix SSE-C support and remains open. The changes also reject unsupported SSE-S3, SSE-KMS, and DSSE-KMS requests instead of silently accepting them. And enforcea TLS for SSE-C by default, with --disable-sse-c-tls-enforcement as the opt-out in case the deployment handles TLS in front of the gateway.