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
| # Release History | ||
| # (Unreleased) | ||
|
|
||
| Upgrade Spring Boot dependencies version to 4.0.5 and Spring Cloud dependencies version to 2025.1.1 |
There was a problem hiding this comment.
In the Unreleased section, the "Upgrade Spring Boot dependencies..." entry is a plain paragraph rather than a bullet under a subsection (e.g., "Dependency Updates"), which is inconsistent with the rest of this changelog that uses bullet lists. Consider converting this to a bulleted item under an appropriate heading for consistent formatting/readability.
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