0

Couldn't find any way how to integrate spring-data-redis with Microsoft Entra ID authentication. Seems RedisTemplate can work only with RedisConnectionFactory which doesn't support connection through DefaultAzureCredentialBuilder. Is there any solution for this?

1 Answer 1

1

There seems to be no Microsoft EntraID support built in to spring-data-redis.

Good news is that both Lettuce and Jedis has their beta releases with EntraID support;

Lettuce 6.6.0.BETA2

Jedis 5.3.0-beta1

It's important to note that support for DefaultAzureCredential is not yet available in beta but work in progress for both clients.

If you don't want to wait for DefaultAzureCredential support in GA release of Jedis/Lettuce and willing to get your hands on it, here my suggestions;

  • With Lettuce, you can provide a RedisCredentialsProvider to RedisURI and configure it to auto re-authenticate. Check the user-guide for more details.

  • With Jedis, it's possible to introduce IdentityProvider by configuring it in JedisClientConfig, check this page. Since spring-data-redis does not expose JedisClientConfig to outside, it's a longer path to make it work within spring-data-redis; you need to provide the implementation for RedisConnectionFactory.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.