Support skipping TLS certificate/hostname verification for S3 snapshot storage (private CA / self-signed endpoints) #8166
dragonclaw-dragonflydb
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
Dragonfly's S3 snapshot storage (
--s3_endpoint, used forSAVE/snapshot upload+load to S3-compatible backends) always performs strict TLS certificate verification with no way to disable it. This is implemented inhelio/util/http/http_client.cc,TlsClient::CreateSslContext():There's no flag or environment variable to relax this. The only way to avoid a
certificate verify failederror today is--s3_use_https=false, which drops TLS entirely (plaintext HTTP) rather than just skipping verification — not an acceptable tradeoff for traffic carrying AWS SigV4-signed credentials.This is a real blocker for anyone running Dragonfly against internal/private S3-compatible object stores (e.g. NetApp StorageGrid, MinIO, Ceph RGW) that use a private/self-signed CA not present in the container's OS trust store. Rebuilding images or using init containers to inject a custom CA bundle into the system trust store works, but is operationally heavier than it needs to be, and other tools in the same observability/data pipeline space already support this out of the box.
For example, Vector supports this directly for its
aws_s3sink:Describe the solution you'd prefer
Add flags to control S3 TLS certificate/hostname verification independently, keeping HTTPS enabled (encryption in transit preserved, just skipping trust validation):
--s3_tls_verify_certificate(default:true) — whenfalse, skip CA chain verification (SSL_VERIFY_NONEinstead ofSSL_VERIFY_PEER)--s3_tls_verify_hostname(default:true) — whenfalse, skip hostname/SNI matching against the certThis mirrors Vector's naming/semantics, which should feel familiar to anyone already managing a mixed observability pipeline including both tools.
Implementation-wise, this would need to thread through from
server_family.cc(flag definitions) →AwsS3SnapshotStorageconstructor (src/server/detail/snapshot_storage.cc) →TlsClient::CreateSslContext()(helio/util/http/http_client.cc), likely by parameterizing the verify mode passed toSSL_CTX_set_verifyinstead of hardcodingSSL_VERIFY_PEER.Describe alternatives you've considered
--s3_use_https=false— works, but disables TLS entirely (plaintext transport), which is not acceptable when the traffic is on a network you don't fully control, or when compliance requires encryption in transit even if cert validation is relaxed.update-ca-certificatesvia init container or custom image build) — works today, but adds operational overhead to every deployment against a private-CA S3 endpoint, and doesn't fit well with the dragonfly-operator's standard pod template for users who don't control the base image.Additional context
Confirmed by reading the current TLS context setup in
helio/util/http/http_client.cc::TlsClient::CreateSslContext()— verification is unconditionallySSL_VERIFY_PEERwith no override path, and there's no CA-bundle injection flag for the S3 client either (s3_use_helio_clientpath uses OS default cert locations only, no custom CA file/dir option).This would primarily help teams running Dragonfly for snapshot storage against internal S3-compatible endpoints with private CAs (StorageGrid, MinIO, Ceph RGW, etc.) in air-gapped or private-network deployments.
All reactions