Repository navigation
feat(redisstore): support authenticated TLS Redis connections - #659
Merged
Merged
Conversation
2 tasks done
jhrozek
force-pushed
the
feat/redisstore-tls
branch
2 times, most recently
from
August 20, 2026 09:20
32ec9eb to
4ff5bb9
Compare
Redis connections gain ACL credentials and verified TLS, with all secret values read from Kubernetes Secret-mounted files — never from flags, environment variables, or errors. Client construction, TLS assembly, timeout defaults, and the connectivity ping delegate to the shared github.com/stacklok/toolhive-core/redis layer (already in the dependency graph via authn/oidc; no new modules enter go.sum). See ADR 0233 (this PR consolidates the original 0228/0229 draft pair into one accepted ADR). BREAKING: an address-only --redis-url is now rejected at Build. Plaintext Redis requires the explicit --redis-allow-plaintext opt-in, which the disposable kustomize fixture in deploy/mecak8s/ now passes. Production deployments use --redis-tls (system trust store) or --redis-tls-ca (private CA); any credential requires one of them. Also adds the same opt-in to e2e/k8s/oidc_helpers_test.go's baseAgentArgs() — the kind e2e suite's OIDC-patch/-restore helper, which replaces the Deployment's args wholesale. Found by actually running `task e2e:k8s`: without it, every OIDC-patched or -restored pod crash-loops on "redis store: redisstore: plaintext Redis requires explicit opt-in" the moment this commit's fail-closed check lands, which would otherwise silently break the (untouched) e2e suite for every PR built on top of this one. Client-certificate (mTLS) authentication is not supported, because the shared layer exposes no client-certificate field. Tracked upstream at stacklok/toolhive-core#240. This is the authenticated, TLS Redis slice of #374; it does not implement the snapshot-integrity MAC or event-log integrity work. Co-Authored-By: mecatl <[email protected]>
jhrozek
force-pushed
the
feat/redisstore-tls
branch
from
August 20, 2026 09:22
4ff5bb9 to
778f273
Compare
ChrisJBurns
approved these changes
Aug 20, 2026
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Redis session-store/event-log connections now support CA-verified TLS and ACL credentials (username/password), read from mounted Secret files rather than flags or chart values. Delegates client construction, TLS assembly, and connectivity checks to the shared
toolhive-core/redislayer (see ADR 0228, rewritten in this PR to describe the shipped contract directly rather than as a delta from a superseded draft).Address-only Redis stays the explicit plaintext opt-in (
--redis-allow-plaintext) for local/Kind fixtures; the production/default path never infers plaintext from an address alone.Fixes #374
Stack
This is the base of a 4-PR stack:
Test plan
go test ./internal/adapter/redisstore/...go build ./...