-
Notifications
You must be signed in to change notification settings - Fork 1k
Token based authentication integration with core extension #3063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
cb51afa
to
ec791b2
Compare
atakavci
reviewed
Dec 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can anticipate what BaseRedisAuthenticationHandler
holds but lets see the actual impl before moving further.
This enables use cases like credential rotation and token based auth without client disconnect. Especially with Pub/Sub clients will reduce the chnance of missing events.
dd30876
to
78a0aea
Compare
78a0aea
to
6531424
Compare
DEFAULT_REAUTHENTICATE_BEHAVIOUR
- Moved Authentication handler to DefaultEndpoint - updated since 6.6.0
1fa739e
to
78fb436
Compare
78fb436
to
98e72fb
Compare
d33710e
to
b7efe6c
Compare
Defer the re-auth operation in case there is on-going multi Tx in lettuce need to be externally synchronised when used in multithreaded env. Since re-auth happens from different thread we need to make sure it does not happen while there is ongoing transaction.
…provider with static one provider Add unit tests for setCredentials
b7efe6c
to
7b0fb4c
Compare
move credentials() method to RedisCredentialsProvider. Resolve issue with unsafe cast after extending RedisCredentialsProvider with supportsStreaming() method
Provide a way for lettuce clients to use token-based authentication. TOKENs come with a TTL. After a Redis client authenticates with a TOKEN, if they didn't renew their authentication we need to evict (close) them. The suggested approach is to leverage the existing CredentialsProvider and add support for streaming credentials to handle token refresh scenarios. Each time a new token is received connection is reauthenticated.
432c4f9
to
528e329
Compare
Verify authentication using Azure AD with service principals
…upportsStreaming()
528e329
to
0e0f502
Compare
tishun
approved these changes
Dec 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/main/java/io/lettuce/authx/TokenBasedRedisCredentialsProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/io/lettuce/authx/TokenBasedRedisCredentialsProvider.java
Outdated
Show resolved
Hide resolved
…der.java Co-authored-by: Tihomir Krasimirov Mateev <[email protected]>
c4dafe4
to
adfe98e
Compare
adfe98e
to
a2a8e10
Compare
tishun
reviewed
Dec 19, 2024
tishun
reviewed
Dec 19, 2024
tishun
reviewed
Dec 19, 2024
TokenBasedRedisCredentialsProvider
tishun
added a commit
that referenced
this pull request
Dec 20, 2024
* Support for StreamingCredentials This enables use cases like credential rotation and token based auth without client disconnect. Especially with Pub/Sub clients will reduce the chnance of missing events. * Tests & publish ReauthEvent * Clean up & Format & Add ReauthenticateEvent test * Conditionally enable connection reauthentication based on client setting DEFAULT_REAUTHENTICATE_BEHAVIOUR * Client setting for enabling reauthentication - Moved Authentication handler to DefaultEndpoint - updated since 6.6.0 * formating * resolve conflict with main * format * dispath using connection handler * Support multi with re-auth Defer the re-auth operation in case there is on-going multi Tx in lettuce need to be externally synchronised when used in multithreaded env. Since re-auth happens from different thread we need to make sure it does not happen while there is ongoing transaction. * Fix EndpointId missing in events * format * Add unit tests for setCredenatials * Skip preProcessing of auth command to avoid replacing the credential provider with static one provider Add unit tests for setCredentials * clean up - remove dead code * Moved almost all code inside the new handler * fix inTransaction lock with dispatch command batch * Remove StreamingCredentialsProvider interface. move credentials() method to RedisCredentialsProvider. Resolve issue with unsafe cast after extending RedisCredentialsProvider with supportsStreaming() method * Add authentication handler to ClusterPubSub connections * Token based auth integration with core extension Provide a way for lettuce clients to use token-based authentication. TOKENs come with a TTL. After a Redis client authenticates with a TOKEN, if they didn't renew their authentication we need to evict (close) them. The suggested approach is to leverage the existing CredentialsProvider and add support for streaming credentials to handle token refresh scenarios. Each time a new token is received connection is reauthenticated. * rebase to address "oid" core-autx lib change formating * Add EntraId integration tests Verify authentication using Azure AD with service principals * StreamingCredentialsProvider replaced with RedisCredentialsProvider.supportsStreaming() * pub/sub test basic functionality with entraid auth * Update src/main/java/io/lettuce/authx/TokenBasedRedisCredentialsProvider.java Co-authored-by: Tihomir Krasimirov Mateev <[email protected]> * Addressing review comments from @tishun * Bump redis-authx-core & redis-authx-entraid from 0.1.0-SNAPSHOT to 0.1.1-beta1 * add java doc for TokenBasedRedisCredentialsProvider --------- Co-authored-by: Tihomir Mateev <[email protected]> Co-authored-by: Tihomir Krasimirov Mateev <[email protected]>
thachlp
pushed a commit
to thachlp/lettuce
that referenced
this pull request
Dec 31, 2024
* Support for StreamingCredentials This enables use cases like credential rotation and token based auth without client disconnect. Especially with Pub/Sub clients will reduce the chnance of missing events. * Tests & publish ReauthEvent * Clean up & Format & Add ReauthenticateEvent test * Conditionally enable connection reauthentication based on client setting DEFAULT_REAUTHENTICATE_BEHAVIOUR * Client setting for enabling reauthentication - Moved Authentication handler to DefaultEndpoint - updated since 6.6.0 * formating * resolve conflict with main * format * dispath using connection handler * Support multi with re-auth Defer the re-auth operation in case there is on-going multi Tx in lettuce need to be externally synchronised when used in multithreaded env. Since re-auth happens from different thread we need to make sure it does not happen while there is ongoing transaction. * Fix EndpointId missing in events * format * Add unit tests for setCredenatials * Skip preProcessing of auth command to avoid replacing the credential provider with static one provider Add unit tests for setCredentials * clean up - remove dead code * Moved almost all code inside the new handler * fix inTransaction lock with dispatch command batch * Remove StreamingCredentialsProvider interface. move credentials() method to RedisCredentialsProvider. Resolve issue with unsafe cast after extending RedisCredentialsProvider with supportsStreaming() method * Add authentication handler to ClusterPubSub connections * Token based auth integration with core extension Provide a way for lettuce clients to use token-based authentication. TOKENs come with a TTL. After a Redis client authenticates with a TOKEN, if they didn't renew their authentication we need to evict (close) them. The suggested approach is to leverage the existing CredentialsProvider and add support for streaming credentials to handle token refresh scenarios. Each time a new token is received connection is reauthenticated. * rebase to address "oid" core-autx lib change formating * Add EntraId integration tests Verify authentication using Azure AD with service principals * StreamingCredentialsProvider replaced with RedisCredentialsProvider.supportsStreaming() * pub/sub test basic functionality with entraid auth * Update src/main/java/io/lettuce/authx/TokenBasedRedisCredentialsProvider.java Co-authored-by: Tihomir Krasimirov Mateev <[email protected]> * Addressing review comments from @tishun * Bump redis-authx-core & redis-authx-entraid from 0.1.0-SNAPSHOT to 0.1.1-beta1 * add java doc for TokenBasedRedisCredentialsProvider --------- Co-authored-by: Tihomir Mateev <[email protected]> Co-authored-by: Tihomir Krasimirov Mateev <[email protected]>
svc-squareup-copybara
pushed a commit
to cashapp/misk
that referenced
this pull request
Jun 3, 2025
| Package | Type | Package file | Manager | Update | Change | |---|---|---|---|---|---| | [io.lettuce:lettuce-core](https://github.com/redis/lettuce) | dependencies | misk/gradle/libs.versions.toml | gradle | minor | `6.5.5.RELEASE` -> `6.7.0.RELEASE` | --- ### Release Notes <details> <summary>redis/lettuce (io.lettuce:lettuce-core)</summary> ### [`v6.7.0.RELEASE`](https://github.com/redis/lettuce/releases/tag/6.7.0.RELEASE) [Compare Source](redis/lettuce@6.6.0.RELEASE...6.7.0.RELEASE) The Lettuce team is pleased to announce the Lettuce 6.7.0 minor release! This release provides support for the newly introduced [Vector Sets](https://redis.io/docs/latest/develop/data-types/vector-sets/) data type which was released as part of Redis 8.0 and [helps Redis users with vector similarity](https://redis.io/blog/announcing-vector-sets-a-new-redis-data-type-for-vector-similarity/). Starting with 6.7 the `ConnectionPoolSupport` also provides a way to provide custom connection validations. The release comes with a bunch of smaller improvements and bugfixes. Lettuce 6.7.0 supports Redis 2.6+ up to Redis 8.x. In terms of Java runtime, Lettuce requires at least Java 8 and works with Java 24. The driver is tested against Redis 8.0, Redis 7.4 and Redis 7.2. Find the full changelog at the end of this document. Thanks to all contributors who made Lettuce 6.7.0.RELEASE possible. #### 📗 Links - Reference documentation: https://lettuce.io/core/6.7.0.RELEASE/reference/ - Javadoc: https://lettuce.io/core/6.7.0.RELEASE/api/ #### ⭐ New Features - Support Redis 8 vector sets [#​3296](redis/lettuce#3296) by [@​tishun](https://github.com/tishun) in redis/lettuce#3295 - Add custom connection validation to ConnectionPoolSupport [#​3081](redis/lettuce#3081) by [@​big-cir](https://github.com/big-cir) in redis/lettuce#3138 #### 🐞 Bug Fixes - Fix deadlock when an invalid URI is presented to DefaultClusterTopologyRefresh by [@​henry701](https://github.com/henry701) in redis/lettuce#3243 - Fix NPE in EntraIdIntegrationTests by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3254 - Deprecate DnsResolver in favor of AddressResolverGroup([#​1572](redis/lettuce#1572)) by [@​young0264](https://github.com/young0264) in redis/lettuce#3291 #### 💡 Other - Change native library default to epoll over io_uring by [@​thachlp](https://github.com/thachlp) in redis/lettuce#3278 - Use InfoPatterns enum for ReplicaTopologyProvider pattern management by [@​ori0o0p](https://github.com/ori0o0p) in redis/lettuce#3264 - Adjusting disconnectedBehavior Option to Prevent Timeout During Redis Shutdown [#​2866](redis/lettuce#2866) by [@​MagicalLas](https://github.com/MagicalLas) in redis/lettuce#2894 - Improve the performance of obtaining write connections through double-check locks. by [@​Chenrujie-85](https://github.com/Chenrujie-85) in redis/lettuce#3228 - Optimize string concatenation in NodeSelectionInvocationHandler.getNodeDescription() by [@​ori0o0p](https://github.com/ori0o0p) in redis/lettuce#3262 - DOC-4756 sorted set examples with join() by [@​andy-stark-redis](https://github.com/andy-stark-redis) in redis/lettuce#3184 - DOC-4757 list examples using join() by [@​andy-stark-redis](https://github.com/andy-stark-redis) in redis/lettuce#3185 - docs: add default threads count about NioEventLoopGroup by [@​brido4125](https://github.com/brido4125) in redis/lettuce#3221 - Guide on resolving native library conflicts by [@​thachlp](https://github.com/thachlp) in redis/lettuce#3309 #### ❤️ New Contributors - [@​big-cir](https://github.com/big-cir) made their first contribution in redis/lettuce#3138 - [@​Chenrujie-85](https://github.com/Chenrujie-85) made their first contribution in redis/lettuce#3228 - [@​brido4125](https://github.com/brido4125) made their first contribution in redis/lettuce#3221 - [@​MagicalLas](https://github.com/MagicalLas) made their first contribution in redis/lettuce#2894 - [@​young0264](https://github.com/young0264) made their first contribution in redis/lettuce#3291 - [@​henry701](https://github.com/henry701) made their first contribution in redis/lettuce#3243 **Full Changelog**: redis/lettuce@6.6.0.BETA4...6.7.0.RELEASE ### [`v6.6.0.RELEASE`](https://github.com/redis/lettuce/releases/tag/6.6.0.RELEASE) [Compare Source](redis/lettuce@6.5.5.RELEASE...6.6.0.RELEASE) The Lettuce team is pleased to announce the Lettuce 6.6.0 minor release! This release provides support for the newly introduced `HGETDEL`, `HGETEX` and `HSETEX` commands. Users of the driver are also now able to [use a command replay filter](https://redis.github.io/lettuce/advanced-usage/#controlling-replay-of-commands-in-at-lease-once-mode), that allows the user to control which (if any) commands are being retried when the reconnect feature is on. It is also possible to configure the driver to use the `HashIndexedQueue` as a backing data structure for the command queue, which speeds up the driver during disconnect / reconnect (needs to be configured using the ClientOptions). The driver comes with Microsoft EntraID authentication support. Last but not least the `STRALGO` command was replaced by the `LCS` command. Lettuce 6.6.0 supports Redis 2.6+ up to Redis 8.x. In terms of Java runtime, Lettuce requires at least Java 8 and works with Java 24. The driver is tested against Redis 8.0, Redis 7.4 and Redis 7.2. Find the full changelog at the end of this document. Thanks to all contributors who made Lettuce 6.6.0.RELEASE possible. #### 📗 Links - Reference documentation: https://lettuce.io/core/6.6.0.RELEASE/reference/ - Javadoc: https://lettuce.io/core/6.6.0.RELEASE/api/ #### ⭐ New Features - Hash Field Expiration (part II) ([#​3195](redis/lettuce#3195)) by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3204 - Introduce command replay filter to avoid command replaying after reconnect [#​1310](redis/lettuce#1310) by [@​tishun](https://github.com/tishun) in redis/lettuce#3118 - Deprecate the STRALGO command and implement the LCS in its place by [@​Dltmd202](https://github.com/Dltmd202) in redis/lettuce#3037 - fix: prevent blocking event loop thread by replacing ArrayDeque with HashIndexedQueue by [@​okg-cxf](https://github.com/okg-cxf) in redis/lettuce#2953 - Token based authentication integration with core extension by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3063 - Support for DefaultAzureCredential by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3230 - Add support up to max unsigned integer in Bitfield offset ([#​2964](redis/lettuce#2964)) by [@​psw0946](https://github.com/psw0946) in redis/lettuce#3099 - Improve code by adding some null checks by [@​tishun](https://github.com/tishun) in redis/lettuce#3115 - Introduce test matrix based on Redis server versions by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3145 - Add modules ACL support by [@​sazzad16](https://github.com/sazzad16) in redis/lettuce#3102 - Test modules CONFIG support by [@​sazzad16](https://github.com/sazzad16) in redis/lettuce#3103 - report block error when use with reactor mode [#​3168](redis/lettuce#3168) by [@​tishun](https://github.com/tishun) in redis/lettuce#3169 - Include command type in the timeout message by [@​arturaz](https://github.com/arturaz) in redis/lettuce#3167 - replace hardcoded GT and LT with CommandKeyword enum by [@​minwoo1999](https://github.com/minwoo1999) in redis/lettuce#3079 #### 🐞 Bug Fixes - Restore API that was accidently deleted when introducing the JSON feature by [@​tishun](https://github.com/tishun) in redis/lettuce#3065 - Propagate handshake failures to Handshake future by [@​mp911de](https://github.com/mp911de) in redis/lettuce#3058 - OpsForGeo producing "READONLY You can't write against a read only replica " on READS... by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3032 - Json commands not exposed in AsyncCluster [#​3048](redis/lettuce#3048) by [@​tishun](https://github.com/tishun) in redis/lettuce#3049 - WATCH during MULTI shouldn't fail transaction [#​3009](redis/lettuce#3009) by [@​tishun](https://github.com/tishun) in redis/lettuce#3027 - Fix: make sure FIFO order between write and notify channel active by [@​okg-cxf](https://github.com/okg-cxf) in redis/lettuce#2597 - UnsupportedOperationException from ListSubscriber during hrandfieldWithvalues [#​3122](redis/lettuce#3122) by [@​tishun](https://github.com/tishun) in redis/lettuce#3123 - Update CommonsPool2ConfigConverterUnitTests.java by [@​Rian-Ismael](https://github.com/Rian-Ismael) in redis/lettuce#3147 - Fix typo & add withSsl() in connecting to Entra ID enabled Redis doc by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3191 - Fix SimpleBatcher apparent deadlock [#​2196](redis/lettuce#2196) by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3148 - jsonArrpop fails with null return value ([#​3196](redis/lettuce#3196)) by [@​tishun](https://github.com/tishun) in redis/lettuce#3206 - json.arrpop forces index=-1 with root path ([#​3214](redis/lettuce#3214)) by [@​thachlp](https://github.com/thachlp) in redis/lettuce#3217 - Updates enableAdaptiveRefreshTrigger trigger assertion message by [@​ymiliaresis](https://github.com/ymiliaresis) in redis/lettuce#3216 #### 💡 Other - Add example configuration using SNI enabled TLS connection by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3045 - Disable docker image being used to call compose when running tests by [@​tishun](https://github.com/tishun) in redis/lettuce#3046 - Workflow for running benchmarks weekly by [@​tishun](https://github.com/tishun) in redis/lettuce#3052 - Fixing benchmark flow by [@​tishun](https://github.com/tishun) in redis/lettuce#3056 - Test failures not reported because step is skipped by [@​tishun](https://github.com/tishun) in redis/lettuce#3067 - Stale issues action bump by [@​tishun](https://github.com/tishun) in redis/lettuce#3182 - Migrate Lettuce test setup to use client-lib-test by [@​kiryazovi-redis](https://github.com/kiryazovi-redis) in redis/lettuce#3158 - JSON integration tests now do not use the test-containers framework by [@​tishun](https://github.com/tishun) in redis/lettuce#3203 - Test with 8.0-M05-pre by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3219 - Add sample examples to test redis.io build by [@​uglide](https://github.com/uglide) in redis/lettuce#3051 - DOC-4528 async hash examples by [@​andy-stark-redis](https://github.com/andy-stark-redis) in redis/lettuce#3069 - DOC-4531 set data type examples by [@​andy-stark-redis](https://github.com/andy-stark-redis) in redis/lettuce#3076 - DOC-4802 fix string example concurrency by [@​andy-stark-redis](https://github.com/andy-stark-redis) in redis/lettuce#3156 - Fix several typos on the advanced-usage page by [@​danicheg](https://github.com/danicheg) in redis/lettuce#3174 - docs: update Limitations section to reflect shaded JAR deprecation by [@​minwoo1999](https://github.com/minwoo1999) in redis/lettuce#3095 - Remove extra spaces in words in docs by [@​enjoy-binbin](https://github.com/enjoy-binbin) in redis/lettuce#3120 - Bump to v4 of checkout by [@​tishun](https://github.com/tishun) in redis/lettuce#3152 - Fix 'make test' test failures by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3157 - Readme doc on how to connect to Azure Managed Redis with Entra ID authentication by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3166 - refactor mget method improved readability and efficiency by [@​ori0o0p](https://github.com/ori0o0p) in redis/lettuce#3061 - Migrate JSON tests infra to use client-lilb-test by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3128 - Update the base project URLs in pom.xml by [@​danicheg](https://github.com/danicheg) in redis/lettuce#3151 - Update publish docs action to use latest versions of actions by [@​tishun](https://github.com/tishun) in redis/lettuce#3154 - Bump default client-libs-test container version by [@​ggivo](https://github.com/ggivo) in redis/lettuce#3165 - Bump org.slf4j:jcl-over-slf4j from 1.7.25 to 2.0.16 by [@​dependabot](https://github.com/dependabot) in redis/lettuce#2959 - Bump org.testcontainers:testcontainers from 1.20.1 to 1.20.4 by [@​dependabot](https://github.com/dependabot) in redis/lettuce#3082 - Bump io.micrometer:micrometer-bom from 1.12.4 to 1.14.2 by [@​dependabot](https://github.com/dependabot) in redis/lettuce#3096 - Bump io.netty.incubator:netty-incubator-transport-native-io_uring from 0.0.25.Final to 0.0.26.Final by [@​dependabot](https://github.com/dependabot) in redis/lettuce#3106 - Bump netty.version to 4.1.118.Final [#​3187](redis/lettuce#3187) by [@​tishun](https://github.com/tishun) in redis/lettuce#3189 #### ❤️ New Contributors - [@​Dltmd202](https://github.com/Dltmd202) made their first contribution in redis/lettuce#3037 - [@​andy-stark-redis](https://github.com/andy-stark-redis) made their first contribution in redis/lettuce#3069 - [@​okg-cxf](https://github.com/okg-cxf) made their first contribution in redis/lettuce#2953 - [@​minwoo1999](https://github.com/minwoo1999) made their first contribution in redis/lettuce#3079 - [@​psw0946](https://github.com/psw0946) made their first contribution in redis/lettuce#3099 - [@​ori0o0p](https://github.com/ori0o0p) made their first contribution in redis/lettuce#3061 - [@​enjoy-binbin](https://github.com/enjoy-binbin) made their first contribution in redis/lettuce#3120 - [@​sazzad16](https://github.com/sazzad16) made their first contribution in redis/lettuce#3102 - [@​danicheg](https://github.com/danicheg) made their first contribution in redis/lettuce#3151 - [@​Rian-Ismael](https://github.com/Rian-Ismael) made their first contribution in redis/lettuce#3147 - [@​kiryazovi-redis](https://github.com/kiryazovi-redis) made their first contribution in redis/lettuce#3158 - [@​ymiliaresis](https://github.com/ymiliaresis) made their first contribution in redis/lettuce#3216 - [@​arturaz](https://github.com/arturaz) made their first contribution in redis/lettuce#3167 **Full Changelog**: redis/lettuce@6.5.0.RELEASE...6.6.0.RELEASE </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am every weekday" in timezone Australia/Melbourne, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Never, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). GitOrigin-RevId: f67609a2c7de516500eacfa74f5c061609b8eff7
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:
This PR Provides the required changes to integrate the token based authentication using the
core
module from redis-authx.TokenBasedRedisCredentialsProvider is the main component which handles the id provider creation and management as well as glueing the renewal process to lettuce connection management.
An instance of
TokenBasedRedisCredentialsProvider
should be provided to Letuce connection through respectiveRedisUri
. In addtionClientOptions.ReauthenticateBehavior.ON_NEW_CREDENTIALS
should be configured on theRedisClient
TokenBasedRedisCredentialsProvider
lifecycle is not controlled by the RedisClient itself and need to me managed externaly.TokenBasedRedisCredentialsProvider.shutdown()
method need to be invoked once no longer needed to stop renewing tokens.The configuration and creation of TokenBasedRedisCredentialsProvider is achieved through identity provider-specific configuration builders.
MS EntraID identity provider is already provided within redis-authx.
A basic usage would look like;
Make sure that:
mvn formatter:format
target. Don’t submit any formatting related changes.