Skip to content

feat(redisconn/azure): support Azure Managed Redis - #590

Open
reyortiz3 wants to merge 2 commits into
mainfrom
worktree-implement-issue-466
Open

reyortiz3 wants to merge 2 commits into
mainfrom
worktree-implement-issue-466

Conversation

@reyortiz3

@reyortiz3 reyortiz3 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extends redisconn/azure for Azure Managed Redis Entra authentication.

  • Config.Username is now optional; when unset it is derived from the token's oid claim (signature not verified; token never included in errors). A missing oid fails the dial, never a silent fallback to no auth.
  • Config.Scope (new, optional) and a ManagedRedisScope constant (https://redis.azure.com/.default). Empty keeps the existing default. Microsoft documents both scope forms as valid for both Azure Cache for Redis and Azure Managed Redis, so the default already works; Scope lets callers choose the URL form or another scope.
  • Config.Validate rejects control characters (CRLF included) in Username and Scope.
  • Package docs describe the Managed Redis requirements (TLS, port 10000, adding the identity as a Redis user / access policy, object-ID username), and the scope constants link to Microsoft's docs.

Notes

  • Behavior change: Username was previously required. The old "missing username" test is replaced, per the issue's "derive from oid when unset".
  • The static Password + DynamicAuth refusal and cluster/sentinel provider coverage already exist in redisconn tests (config.go Validate, client_test.go), so no changes there.

References

Test plan

  • go test -race ./... in redisconn/azure (95% coverage)
  • golangci-lint run, go vet, task license-check

Closes #466

🤖 Generated with Claude Code

reyortiz3 and others added 2 commits December 1, 2026 16:55
Add Config.Scope (empty keeps the Azure Cache for Redis scope) and a
ManagedRedisScope constant. Derive the Redis username from the token's
oid claim when Config.Username is unset. Reject control characters in
Username and Scope, and document the Managed Redis requirements.

Closes #466

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Link the Azure Cache for Redis and Azure Managed Redis Entra
authentication pages from the Scope constants, state that both scopes
are documented as valid for both services, and drop unverified claims
from the package docs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

redisconn: add an Azure Entra ID credentials provider for Azure Managed Redis

1 participant