Skip to content

Conversation

@v-huizhu2
Copy link
Member

  1. This request was denied due to internal policy. Local authentication methods are not allowed.
    Disable local authentication in Redis Cache creation.
  2. Microsoft Entra Authentication cannot be used cache is configured to allow non-SSL connections.
  3. Use managed identity for AOF & RDB backup configuration.

#47372

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.

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.

- Implemented `localAuthDisabled()` method to check if local auth is disabled
- Added `disableLocalAuth()` method to disable SAS authentication
- Updated Redis cache definition and update stages to include local auth settings
- Modified tests to verify local auth disable functionality
- Extended Redis cache models to support local authentication configuration
- Integrated local auth settings into Redis cache creation and update flows
- Removed disableLocalAuth() from Redis cache update operations
- Commented out Redis configuration backup settings and assertions
- Simplified test cases by removing redundant local auth disabling
- Updated public network access test to match new behavior
- Maintained core Redis cache functionality verification
…date modes

- Updated disableLocalAuth to properly set authentication flag during create mode
- Updated disableLocalAuth to properly set authentication flag during update mode
- Removed redundant disableLocalAuth call in test updates
- Added assertions to verify local auth disabled state after creation
- Enabled AAD configuration in multiple test scenarios for comprehensive coverage
- Removed deprecated `withNonSslPort()` method calls in Redis cache setup
- Updated test configurations to align with current SSL-only requirements
- Ensured firewall rules and other configurations remain unchanged
- Verified that all existing test cases pass without non-SSL port dependency
- Replace hardcoded connection string with storage account blob endpoint
- Add managed identity authentication for data persistence
- Disable secondary AOF storage connection string validation
- Maintain AOF backup enabled configuration
- Keep local auth disabled and AAD enabled settings
Update the assets tag from 87b73bc96e to 4829c91ebd in the
assets.json file for the redis resource manager package.
Copilot AI review requested due to automatic review settings December 25, 2025 08:29
@github-actions github-actions bot added the Mgmt This issue is related to a management-plane library. label Dec 25, 2025
Copy link
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 live test failures in the Azure Redis Cache management library by addressing Azure policy requirements that disallow local authentication. The changes enable Azure Active Directory (AAD) authentication, disable local/access key authentication, and configure managed identity for backup operations.

Key Changes:

  • Adds support for disabling local authentication via new disableLocalAuth() API and localAuthDisabled() getter
  • Updates all Redis Cache test creations to enable AAD authentication and disable local auth
  • Removes non-SSL port configuration (incompatible with AAD authentication)
  • Switches backup configuration from connection strings to managed identity authentication

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
RedisCacheOperationsTests.java Updates test Redis Cache creations to enable AAD, disable local auth, remove non-SSL ports, and use managed identity for RDB/AOF backup configurations
RedisCache.java Adds localAuthDisabled() method and WithLocalAuth interfaces to definition and update stages to support disabling local authentication
RedisCacheImpl.java Implements localAuthDisabled() getter and disableLocalAuth() method that sets the disableAccessKeyAuthentication property

docs(redis): update Redis cache documentation to use correct terminology

- change "Redis namespace" to "Redis cache" in interface documentation
- update method descriptions to reference Redis cache instead of namespace
- correct return type descriptions to use "Redis cache definition" terminology
- maintain consistent documentation across both creation and update stages
```
… cache tests

- Remove commented out storage connection string generation code
- Remove unused connectionString variable declaration
- Remove commented out Redis configuration lines for aof-storage-connection-string-0 and
  aof-storage-connection-string-1
- Remove commented out assertion for aofStorageConnectionString1
- Clean up redundant test code that was not being used
@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Jan 4, 2026

do fix the formatting

- Implemented enableLocalAuth method in RedisCacheImpl to enable SAS authentication
- Added disableAccessKeyAuthentication(false) setting for both create and update modes
- Added enableLocalAuth default method to RedisCache interface with proper Javadoc
- Updated test case with proper method chaining for Redis cache configuration
- Maintained consistency with existing disableLocalAuth functionality
- Removed unused AzureEnvironment import from RedisCacheOperationsTests.java
- Cleaned up import statements to remove redundant dependency
…and interfaces

- Renamed localAuthDisabled() to withAccessKeyAuthentication() in RedisCache interface
- Renamed disableLocalAuth() to disableAccessKeyAuthentication() in WithAccessKeyAuthentication interface
- Renamed enableLocalAuth() to enableAccessKeyAuthentication() in WithAccessKeyAuthentication interface
- Updated WithCreate interface to extend WithAccessKeyAuthentication instead of WithLocalAuth
- Updated Update interface to extend WithAccessKeyAuthentication instead of WithLocalAuth
- Changed method calls in test class from disableLocalAuth() to disableAccessKeyAuthentication()
- Updated assertion to check withAccessKeyAuthentication() instead of localAuthDisabled()
…henticationEnabled

- Renamed method from withAccessKeyAuthentication to isAccessKeyAuthenticationEnabled in RedisCacheImpl
- Updated default method name in RedisCache interface
- Changed method reference in test assertions to use new method name
- Maintained same functionality while improving method naming consistency
- Clarify that authentication through access keys is disabled when set as true
- Update return documentation to reflect access keys instead of local auth
- Modify stage interface descriptions to reference access keys rather than local auth
v-huizhu2 and others added 2 commits January 5, 2026 16:51
…resourcemanager/redis/models/RedisCache.java

Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com>
Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com>
v-huizhu2 and others added 2 commits January 5, 2026 17:00
Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com>
- Clarified that disabled authentication means access keys are disabled
- Updated enable authentication description to specify access key authentication
- Improved documentation clarity for Redis cache authentication methods
Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com>
feat(redis): support disabling authentication through access keys

- Added support for disabling authentication through access keys for RedisCache
- Removed unused enableAccessKeyAuthentication method from RedisCache interface
- Updated changelog to reflect the new RedisCache authentication feature
```
v-huizhu2 and others added 3 commits January 6, 2026 15:20
Co-authored-by: Xiaofei Cao <92354331+XiaofeiCao@users.noreply.github.com>
…scription

- Changed the changelog entry to accurately reflect that both enabling and
  disabling authentication through access keys is supported for RedisCache
…izhu2/azure-sdk-for-java into mgmt_livetests_redis_resourcehealth
@v-huizhu2 v-huizhu2 merged commit a2eca71 into Azure:main Jan 7, 2026
18 checks passed
@v-huizhu2 v-huizhu2 deleted the mgmt_livetests_redis_resourcehealth branch January 8, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants