Add Redis Sentinel session storage tutorial and TLS docs#606
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@danbarr I was reviewing @aron-muon's patches and created a bunch of test manifests. I thought I'd reuse them to document the Redis integration. I wasn't sure if an integration is the right place at all though. Also, given the bitnami charts deprecation, there is a bunch of manifests which make the page longer..we could put them into examples in the toolhive repo as an option, but then the tutorial wouldn't be self-contained. I'll be happy to redo the docs of course, but wanted to get something out there for discussion. |
There was a problem hiding this comment.
Pull request overview
Adds documentation for using Redis Sentinel as persistent session storage for ToolHive’s embedded authorization server, including a new end-to-end Kubernetes-manifest-based tutorial and related guide cross-links.
Changes:
- Adds a new Redis Sentinel session storage tutorial under ToolHive Integrations, including TLS configuration guidance.
- Updates the embedded auth Kubernetes guide with a Redis Sentinel session storage snippet and links to the full tutorial.
- Updates backend auth concept doc to point to the new session storage docs and resolves a small merge conflict.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| sidebars.ts | Adds the new Redis session storage doc to the Integrations sidebar. |
| docs/toolhive/integrations/redis-session-storage.mdx | New tutorial covering Redis Sentinel deployment/manifests, ToolHive storage config, and TLS guidance. |
| docs/toolhive/guides-k8s/auth-k8s.mdx | Adds a “Configure session storage” section with a Redis Sentinel configuration snippet and link to the full tutorial. |
| docs/toolhive/concepts/backend-auth.mdx | Updates session storage warning to link to the new guide/tutorial. |
You can also share your feedback on Copilot code review. Take the survey.
| users.acl: | ||
| 'user toolhive-auth on ><REDIS_ACL_PASSWORD> ~thv:auth:* &* +GET +SET +SETNX | ||
| +DEL +EXISTS +EXPIRE +SADD +SREM +SMEMBERS +EVAL +MULTI +EXEC +EVALSHA +PING' |
There was a problem hiding this comment.
The users.acl value is wrapped onto a second line inside single quotes. In YAML this introduces a newline into the Secret value, which contradicts the comment “the ACL entry is a single line” and can break Redis ACL parsing. Consider keeping it on one line, or using a folded scalar (>-) so line breaks render as spaces.
| users.acl: | |
| 'user toolhive-auth on ><REDIS_ACL_PASSWORD> ~thv:auth:* &* +GET +SET +SETNX | |
| +DEL +EXISTS +EXPIRE +SADD +SREM +SMEMBERS +EVAL +MULTI +EXEC +EVALSHA +PING' | |
| users.acl: >- | |
| user toolhive-auth on ><REDIS_ACL_PASSWORD> ~thv:auth:* &* +GET +SET +SETNX +DEL +EXISTS +EXPIRE +SADD +SREM +SMEMBERS +EVAL +MULTI +EXEC +EVALSHA +PING |
There was a problem hiding this comment.
In these particular cases, I wonder if the <PLACEHOLDER> convention is too confusing because of the need for the preceding literal > character?
| serviceName: redis | ||
| replicas: 1 | ||
| selector: |
There was a problem hiding this comment.
This manifest deploys only a single Redis pod (replicas: 1). With no Redis replicas configured, Sentinel cannot perform an automatic failover (there’s nothing to promote), so the tutorial’s HA/failover claims won’t hold as written. Either adjust the text to reflect this limitation or extend the manifests to include Redis replicas configured for replication so Sentinel can fail over.
| The manifests above don't disable the Redis default user, which has full access | ||
| with no password. For production deployments, add `user default off` to the | ||
| `users.acl` entry in the `redis-acl` Secret: | ||
|
|
||
| ```text | ||
| user default off | ||
| user toolhive-auth on ><PASSWORD> ~thv:auth:* &* +GET +SET +SETNX ... | ||
| ``` |
There was a problem hiding this comment.
The tutorial recommends disabling the default Redis user for production, but neither the Sentinel config nor the probes are set up to authenticate to Redis. If user default off is applied, Sentinel monitoring and commands like redis-cli PING/ACL LIST will fail unless you configure sentinel auth-user/sentinel auth-pass (or equivalent) and update the probe/troubleshooting commands to authenticate.
| tls: | ||
| enabled: true | ||
| caCertSecretRef: | ||
| name: redis-ca-cert | ||
| key: ca.crt | ||
| # highlight-end |
There was a problem hiding this comment.
The examples introduce redis.tls / redis.sentinelTls, but the linked CRD reference currently documents RedisStorageConfig without any TLS-related fields (only sentinelConfig/aclUserConfig/timeouts). If TLS is not actually supported by the CRD, these examples will not apply; if it is supported, the CRD reference doc likely needs to be updated alongside this tutorial so users can validate the schema and available fields.
| - If using self-signed certificates for testing, you can set | ||
| `insecureSkipVerify: true` to bypass verification (not recommended for | ||
| production) |
There was a problem hiding this comment.
insecureSkipVerify: true is mentioned as a supported knob, but it is not shown in the TLS examples and it does not appear in the CRD reference doc. If this field isn’t supported, the troubleshooting guidance should be removed; if it is supported, document it in the TLS config examples and ensure it’s reflected in the CRD reference.
| - If using self-signed certificates for testing, you can set | |
| `insecureSkipVerify: true` to bypass verification (not recommended for | |
| production) |
| kubectl create secret generic redis-acl-secret \ | ||
| --namespace toolhive-system \ | ||
| --from-literal=username=toolhive-auth \ | ||
| --from-literal=password="<YOUR_REDIS_PASSWORD>" |
There was a problem hiding this comment.
The placeholder password here (<YOUR_REDIS_PASSWORD>) is inconsistent with the rest of the Redis tutorial/examples (<REDIS_ACL_PASSWORD>). Using one consistent placeholder name across docs helps avoid users wiring the wrong Secret value.
| --from-literal=password="<YOUR_REDIS_PASSWORD>" | |
| --from-literal=password="<REDIS_ACL_PASSWORD>" |
|
@jhrozek Hmm yeah, I'm also not sure Integrations is the right spot for this since it's not so much about integrating with existing enterprise systems; feels more like a how-to guide in the category of "enterprise deployment patterns" -- which is something I think we'll be having more of going forward (platform-wide architectures, HA configs, prod-ready examples etc.), but we don't really have enough of those to get their own section just yet. For now maybe it just lands in the K8s Operator section below the other auth topics, and is slightly repositioned as a how-to instead of a tutorial? Re: the long manifests, in some other spots we've used the approach of |
|
@claude Use the docs-review skill to perform an editorial review of this new content. Take existing review comments into account. Also, consider the discussion about placement - given the current information architecture and user journey, where might this best fit? |
|
Claude finished @danbarr's task in 2m 46s —— View job Editorial reviewSummaryThe content is well-structured and fills a genuine documentation gap—the deprecation of the Bitnami chart means users have no existing path to production-ready Redis Sentinel on Kubernetes, and the inline manifests solve that directly. The writing quality is good, voice and style are consistent, and the cross-file changes ( Primary issues1. Placement: Integrations vs. K8s operator how-to guidesI agree with @danbarr's instinct here. The More importantly, this content's prerequisites section explicitly requires "a Kubernetes cluster with the ToolHive Operator installed" and frames itself as a follow-on to the embedded auth server setup. That makes it contextually part of the K8s operator how-to guides, not the integrations catalog. Recommendation: Move to 2. Diataxis classification drift: tutorial vs. how-toThe front matter description says "How to deploy Redis Sentinel…", the prerequisites admonition assumes an existing cluster setup, and the content is task-oriented—all of which align with a how-to guide, not a tutorial. But the document is placed under a Tutorials-style structure (numbered "Step N" headings, numbered progression). This isn't a blocking issue on its own, but the mismatch causes an internal tension:
Recommendation: Reframe as a how-to. Drop the "Step N:" prefix or reserve the step numbering only for the core required path and separate optional extensions (TLS, disabling default user) as standalone sections. 3. Technical accuracy issues from existing review commentsThese were flagged by Copilot and need author/SME resolution before merge—editorial cannot resolve them, but they affect documentation accuracy:
4. Inconsistent placeholder names across files
Secondary issues
What works well
|
Add a new how-to guide at docs/toolhive/guides-k8s/redis-session-storage.mdx that walks through deploying Redis Sentinel as the session storage backend for the embedded authorization server. The guide uses self-contained Kubernetes manifests instead of the Bitnami Helm chart, which Broadcom moved behind a paid subscription in August 2025. No maintained, freely available Helm chart with Sentinel support exists as a replacement, so the manifests are provided inline. Also adds TLS configuration documentation for Redis connections (both master and Sentinel), updates the auth-k8s guide's session storage snippet for consistency, and resolves a merge conflict in backend-auth.mdx. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9ae5a5d to
e19f89a
Compare
|
Updated based on all review feedback:
|
Replace <REDIS_ACL_PASSWORD> with YOUR_REDIS_ACL_PASSWORD (no angle brackets) to avoid confusing ><PLACEHOLDER> syntax in Redis ACL entries. Remove unused vercel.json redirect since the page was never published at the old integrations/ path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Description
Add a new tutorial at docs/toolhive/integrations/redis-session-storage.mdx that walks through deploying Redis Sentinel as the session storage backend for the embedded authorization server. The tutorial uses self-contained Kubernetes manifests instead of the Bitnami Helm chart, which Broadcom moved behind a paid subscription in August 2025. No maintained, freely available Helm chart with Sentinel support exists as a replacement, so the manifests are provided inline.
Also adds TLS configuration documentation for Redis connections (both master and Sentinel), updates the auth-k8s guide's session storage snippet to match, and resolves a merge conflict in backend-auth.mdx.
Type of change
Related issues/PRs
stacklok/toolhive#3899
Screenshots
Submitter checklist
Content and formatting
Navigation
sidebars.ts) updated for added, deleted, reordered, or renamed filesvercel.jsonfor moved, renamed, or deleted pages (i.e., if the URL slug changed)Reviewer checklist
Content