Skip to content

Fix Redis scope to use unified scope URL for all cloud types#48746

Open
rujche wants to merge 2 commits intomainfrom
rujche/main/fix-scope-of-redis
Open

Fix Redis scope to use unified scope URL for all cloud types#48746
rujche wants to merge 2 commits intomainfrom
rujche/main/fix-scope-of-redis

Conversation

@rujche
Copy link
Copy Markdown
Member

@rujche rujche commented Apr 9, 2026

Description

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

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
@rujche rujche requested a review from Copilot April 9, 2026 06:31
@rujche rujche requested review from a team, Netyyyy, moarychan and saragluna as code owners April 9, 2026 06:31
@rujche rujche self-assigned this Apr 9, 2026
@github-actions github-actions bot added the azure-spring All azure-spring related issues label Apr 9, 2026
@rujche rujche added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Apr 9, 2026
@rujche rujche moved this from Todo to In Progress in Spring Cloud Azure Apr 9, 2026
@rujche rujche added this to the 2026-05 milestone Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AzureRedisPasswordlessProperties scope and default behavior.
  • Updated sdk/spring/CHANGELOG.md with 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

# Release History
# (Unreleased)

Upgrade Spring Boot dependencies version to 4.0.5 and Spring Cloud dependencies version to 2025.1.1
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

azure-spring All azure-spring related issues bug This issue requires a change to an existing behavior in the product in order to be resolved.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Bug: AzureRedisPasswordlessProperties uses invalid wildcard scope for AZURE_CHINA, causing ManagedIdentityCredential failure

2 participants