Skip to content
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

Spring Session Redis Integration with GCP IAM #3116

Open
hk250097 opened this issue Aug 1, 2024 · 0 comments
Open

Spring Session Redis Integration with GCP IAM #3116

hk250097 opened this issue Aug 1, 2024 · 0 comments
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Comments

@hk250097
Copy link

hk250097 commented Aug 1, 2024

Expected Behavior
Spring Session Redis / Spring Data with Redis to support Google Cloud (GCP) IAM authentication.

Spring Session / Spring Data with redis needs RedisConnectionFactory bean to be injected.
Google Redis Memstore has IAM authentication supported.
RedisConnectionFactory to support the password authentication with GCP IAM
Current Behavior
Not able to find any reference to support the password with GCP IAM

The code is pasted below,
GCP IAM sample as per GCP recommendation is https://cloud.google.com/memorystore/docs/cluster/client-library-connection#lettuce_2
Please refer the line below redisClusterConfiguration.setPassword(char[] seq);
Without this line it doesn't work as redis expected password but the question is how to set the pwd which is generated from GCP IAM.
public RedisConnectionFactory redisConnectionFactory() {
String discoveryEndPointURL = buildDiscoveryEndPointURL();
RedisClusterConfiguration redisClusterConfiguration = new RedisClusterConfiguration(Collections.singletonList(discoveryEndPointURL));
redisClusterConfiguration.setPassword(char[] seq);
LettuceConnectionFactory lettuceConnectionFactory = new LettuceConnectionFactory(redisClusterConfiguration);
lettuceConnectionFactory.afterPropertiesSet();
return lettuceConnectionFactory;
}

Context

@hk250097 hk250097 added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant