Update Redis ACL examples for auth server#4675
Merged
tgrunnagle merged 1 commit intomainfrom Apr 8, 2026
Merged
Conversation
The Redis ACL examples in the repo were missing commands that the auth server actually uses, which would cause runtime permission errors for upstream token storage and user creation flows. This audits `pkg/authserver/storage/redis.go` against the documented ACL entries and adds the missing commands. ## Changes | File | What changed | |------|-------------| | `examples/operator/redis-storage/sentinel-service.yaml` | Added `+PEXPIRE +PTTL +MGET` to the example ACL entry | | `docs/redis-storage.md` | Added `+SETNX +PEXPIRE +PTTL +MGET +EVALSHA` to the ACL example and updated the security note prose to list all required commands | ## Missing commands and why they're needed | Command | Used by | |---------|---------| | `SETNX` | `CreateUser`, `CreateProviderIdentity` — atomic check-and-set for uniqueness | | `PEXPIRE` | `storeUpstreamTokensScript` Lua script — millisecond-precision TTL on index sets | | `PTTL` | `storeUpstreamTokensScript` Lua script — checks remaining TTL before extending | | `MGET` | `GetAllUpstreamTokens` — batch fetch of all provider tokens for a session | | `EVALSHA` | All Lua scripts after first execution — Redis caches the script and runs by SHA |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4675 +/- ##
=======================================
Coverage 68.84% 68.84%
=======================================
Files 509 509
Lines 52668 52668
=======================================
+ Hits 36259 36261 +2
+ Misses 13606 13603 -3
- Partials 2803 2804 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ChrisJBurns
approved these changes
Apr 8, 2026
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
The Redis ACL examples in the repo were missing commands that the auth server actually uses, which would cause runtime permission errors for upstream token storage and user creation flows. This audits
pkg/authserver/storage/redis.goagainst the documented ACL entries and adds the missing commands.Changes
examples/operator/redis-storage/sentinel-service.yaml+PEXPIRE +PTTL +MGETto the example ACL entrydocs/redis-storage.md+SETNX +PEXPIRE +PTTL +MGET +EVALSHAto the ACL example and updated the security note prose to list all required commandsMissing commands and why they're needed
SETNXCreateUser,CreateProviderIdentity— atomic check-and-set for uniquenessPEXPIREstoreUpstreamTokensScriptLua script — millisecond-precision TTL on index setsPTTLstoreUpstreamTokensScriptLua script — checks remaining TTL before extendingMGETGetAllUpstreamTokens— batch fetch of all provider tokens for a sessionEVALSHAType of change