Repository navigation
Conversation
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>
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
Extends
redisconn/azurefor Azure Managed Redis Entra authentication.Config.Usernameis now optional; when unset it is derived from the token'soidclaim (signature not verified; token never included in errors). A missingoidfails the dial, never a silent fallback to no auth.Config.Scope(new, optional) and aManagedRedisScopeconstant (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;Scopelets callers choose the URL form or another scope.Config.Validaterejects control characters (CRLF included) inUsernameandScope.Notes
Usernamewas previously required. The old "missing username" test is replaced, per the issue's "derive fromoidwhen unset".Password+DynamicAuthrefusal and cluster/sentinel provider coverage already exist inredisconntests (config.goValidate,client_test.go), so no changes there.References
Test plan
go test -race ./...inredisconn/azure(95% coverage)golangci-lint run,go vet,task license-checkCloses #466
🤖 Generated with Claude Code