From 0fce8d468b0f8335bd133b50d606926ee7e012d6 Mon Sep 17 00:00:00 2001
From: Yunhua Koglin <kogliny@amazon.com>
Date: Tue, 15 Jun 2021 18:52:44 +0000
Subject: [PATCH] enable redis auth token

---
 .../osdu/partition/provider/aws/cache/GroupCache.java         | 4 ++--
 .../partition-aws/src/main/resources/application.properties   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java
index 497363457..2bb063606 100644
--- a/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java
+++ b/provider/partition-aws/src/main/java/org/opengroup/osdu/partition/provider/aws/cache/GroupCache.java
@@ -23,8 +23,8 @@ import org.springframework.stereotype.Component;
 
 @Component
 public class GroupCache extends RedisCache<String, Groups> {
-    public GroupCache(@Value("${aws.elasticache.cluster.endpoint}") final String REDIS_GROUP_HOST, @Value("${aws.elasticache.cluster.port}") final String REDIS_GROUP_PORT) {
-        super(REDIS_GROUP_HOST, Integer.parseInt(REDIS_GROUP_PORT), 30, String.class, Groups.class);
+    public GroupCache(@Value("${aws.elasticache.cluster.endpoint}") final String REDIS_GROUP_HOST, @Value("${aws.elasticache.cluster.port}") final String REDIS_GROUP_PORT, @Value("${aws.elasticache.cluster.key}") final String REDIS_GROUP_KEY) {
+        super(REDIS_GROUP_HOST, Integer.parseInt(REDIS_GROUP_PORT), REDIS_GROUP_KEY, 30, String.class, Groups.class);
     }
 
     public static String getGroupCacheKey(DpsHeaders headers) {
diff --git a/provider/partition-aws/src/main/resources/application.properties b/provider/partition-aws/src/main/resources/application.properties
index 6175e3002..913f572d9 100644
--- a/provider/partition-aws/src/main/resources/application.properties
+++ b/provider/partition-aws/src/main/resources/application.properties
@@ -40,6 +40,7 @@ aws.environment=${ENVIRONMENT}
 ## AWS ElastiCache configuration
 aws.elasticache.cluster.endpoint=${CACHE_CLUSTER_ENDPOINT}
 aws.elasticache.cluster.port=${CACHE_CLUSTER_PORT}
+aws.elasticache.cluster.key=${CACHE_CLUSTER_KEY}
 
 server.ssl.enabled=${SSL_ENABLED:true}
 server.ssl.key-store-type=PKCS12
-- 
GitLab