Fix Redis scope to use unified scope URL for all cloud types#48746
Open
Fix Redis scope to use unified scope URL for all cloud types#48746
Conversation
Removed cloud-specific Redis scope URLs (Azure China, Azure US Government) and simplified getScopes() to always return https://redis.azure.com/.default as the default scope regardless of cloud type. Added unit tests for AzureRedisPasswordlessProperties. Fixes: #48680
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Redis passwordless authentication scope resolution in Spring Cloud Azure by unifying the default Redis token scope across all Azure cloud types, addressing issue #48680.
Changes:
- Removed cloud-specific Redis scope URLs and simplified scope selection to always use
https://redis.azure.com/.default. - Added unit tests for
AzureRedisPasswordlessPropertiesscope and default behavior. - Updated
sdk/spring/CHANGELOG.mdwith a bug-fix entry referencing #48680.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sdk/spring/spring-cloud-azure-autoconfigure/src/main/java/com/azure/spring/cloud/autoconfigure/implementation/passwordless/properties/AzureRedisPasswordlessProperties.java | Simplifies default scope logic to a single unified Redis scope. |
| sdk/spring/spring-cloud-azure-autoconfigure/src/test/java/com/azure/spring/cloud/autoconfigure/implementation/passwordless/properties/AzureRedisPasswordlessPropertiesTest.java | Adds unit coverage for default/custom scopes and default passwordless flag behavior. |
| sdk/spring/CHANGELOG.md | Documents the bug fix for invalid China cloud wildcard scope. |
...d/autoconfigure/implementation/passwordless/properties/AzureRedisPasswordlessProperties.java
Show resolved
Hide resolved
Netyyyy
approved these changes
Apr 10, 2026
Member
Netyyyy
left a comment
There was a problem hiding this comment.
LGTM except for one question: Does Redis have the same scope across different cloud types?
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.
Description
https://redis.azure.com/.defaultas the default scope regardless of cloud type.All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines