From fd3cc740f39469f93db280a9d435217e849ecf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Fri, 24 Apr 2026 16:02:56 +0200 Subject: [PATCH 1/7] lazy cachemanager fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .../java/org/zowe/apiml/ApimlApplication.java | 4 +- .../service/AuthenticationService.java | 40 ++++++++++++++----- .../service/AuthenticationServiceTest.java | 4 +- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/apiml/src/main/java/org/zowe/apiml/ApimlApplication.java b/apiml/src/main/java/org/zowe/apiml/ApimlApplication.java index 174d94a367..cc9212973b 100644 --- a/apiml/src/main/java/org/zowe/apiml/ApimlApplication.java +++ b/apiml/src/main/java/org/zowe/apiml/ApimlApplication.java @@ -12,6 +12,7 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.actuate.autoconfigure.logging.OpenTelemetryLoggingAutoConfiguration; +import org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.opentelemetry.OpenTelemetryAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientAutoConfiguration; @@ -28,7 +29,8 @@ ReactiveOAuth2ClientAutoConfiguration.class, OpenTelemetryAutoConfiguration.class, OpenTelemetryLoggingAutoConfiguration.class, - io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration.class + io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration.class, + CacheMetricsAutoConfiguration.class }, scanBasePackages = { "org.zowe.apiml.filter", diff --git a/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java b/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java index 99a3a2d317..2fc155c3ff 100644 --- a/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java +++ b/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java @@ -51,12 +51,7 @@ import org.zowe.apiml.zaas.security.service.zosmf.ZosmfService; import java.text.ParseException; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Optional; -import java.util.Set; +import java.util.*; import static org.zowe.apiml.security.common.util.JwtUtils.getJwtClaims; import static org.zowe.apiml.security.common.util.JwtUtils.handleJwtParserException; @@ -89,14 +84,34 @@ public class AuthenticationService { private final CacheManager cacheManager; private final CacheUtils cacheUtils; private boolean isModulithMode; - private Cache validatedJwtTokensCache; - private Cache invalidatedJwtTokensCache; + private volatile Cache validatedJwtTokensCache; + private volatile Cache invalidatedJwtTokensCache; @PostConstruct public void afterPropertiesSet() { isModulithMode = applicationContext.containsBean("modulithConfig"); - validatedJwtTokensCache = cacheManager.getCache(CACHE_VALIDATED_JWT_TOKENS); - invalidatedJwtTokensCache = cacheManager.getCache(CACHE_INVALIDATED_JWT_TOKENS); + } + + private Cache getValidatedJwtTokensCache() { + if (validatedJwtTokensCache == null) { + synchronized (AuthenticationService.class) { + if (validatedJwtTokensCache == null) { + validatedJwtTokensCache = cacheManager.getCache(CACHE_VALIDATED_JWT_TOKENS); + } + } + } + return validatedJwtTokensCache; + } + + private Cache getInvalidatedJwtTokensCache() { + if (invalidatedJwtTokensCache == null) { + synchronized (AuthenticationService.class) { + if (invalidatedJwtTokensCache == null) { + invalidatedJwtTokensCache = cacheManager.getCache(CACHE_INVALIDATED_JWT_TOKENS); + } + } + } + return invalidatedJwtTokensCache; } /** @@ -229,18 +244,21 @@ private Boolean doInvalidate(String jwtToken, boolean distribute, Application ap } private void putValidationCache(String jwtToken, TokenAuthentication tokenAuthentication) { + var validatedJwtTokensCache = getValidatedJwtTokensCache(); if (jwtToken != null && validatedJwtTokensCache != null) { validatedJwtTokensCache.put(jwtToken, tokenAuthentication); } } private void evictValidationCache(String jwtToken) { + var validatedJwtTokensCache = getValidatedJwtTokensCache(); if (validatedJwtTokensCache != null) { validatedJwtTokensCache.evict(jwtToken); } } private void putInvalidatedCache(String jwtToken) { + var invalidatedJwtTokensCache = getInvalidatedJwtTokensCache(); if (invalidatedJwtTokensCache != null) { invalidatedJwtTokensCache.put(jwtToken, Boolean.TRUE); } @@ -307,6 +325,7 @@ private boolean invalidateTokenOnAnotherInstance(String jwtToken, Application ap * @return true - token is invalidated, otherwise token is still valid */ public boolean isInvalidated(String jwtToken) { + var invalidatedJwtTokensCache = getInvalidatedJwtTokensCache(); if (invalidatedJwtTokensCache == null) { return false; } @@ -361,6 +380,7 @@ public TokenAuthentication validateJwtToken(String jwtToken) { throw new TokenNotValidException("Token ...%s was invalidated.".formatted(StringUtils.right(jwtToken, 15))); } + var validatedJwtTokensCache = getValidatedJwtTokensCache(); if (validatedJwtTokensCache != null) { Cache.ValueWrapper cached = validatedJwtTokensCache.get(jwtToken); if (cached != null) { diff --git a/zaas-service/src/test/java/org/zowe/apiml/zaas/security/service/AuthenticationServiceTest.java b/zaas-service/src/test/java/org/zowe/apiml/zaas/security/service/AuthenticationServiceTest.java index 6eeffda6c4..e2fe08c42c 100644 --- a/zaas-service/src/test/java/org/zowe/apiml/zaas/security/service/AuthenticationServiceTest.java +++ b/zaas-service/src/test/java/org/zowe/apiml/zaas/security/service/AuthenticationServiceTest.java @@ -127,8 +127,8 @@ void setup() { authConfigurationProperties = new AuthConfigurationProperties(); authConfigurationProperties.getZosmf().setServiceId(ZOSMF); - when(cacheManager.getCache("validatedJwtTokens")).thenReturn(validatedJwtTokensCache); - when(cacheManager.getCache("invalidatedJwtTokens")).thenReturn(invalidatedJwtTokensCache); + lenient().when(cacheManager.getCache("validatedJwtTokens")).thenReturn(validatedJwtTokensCache); + lenient().when(cacheManager.getCache("invalidatedJwtTokens")).thenReturn(invalidatedJwtTokensCache); authService = new AuthenticationService( applicationContext, authConfigurationProperties, jwtSecurityInitializer, From ea17c2b67037b39a037daa3469923200238d2bd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Fri, 24 Apr 2026 17:08:50 +0200 Subject: [PATCH 2/7] simplifying the distributed cache configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .../service/infinispan/config/InfinispanConfig.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java b/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java index f82908a5a0..1510774408 100644 --- a/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java +++ b/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java @@ -211,12 +211,11 @@ synchronized LazyCacheManager cacheManager(ResourceLoader resourceLoader, Applic System.setProperty("infinispan.ssl.trustStore", trustStore); System.setProperty("infinispan.ssl.trustStorePassword", trustStorePass); - var caches = Stream.of(CACHE_ZOWE, CACHE_ZOWE_INVALIDATED_TOKEN) - .collect(Collectors.toMap( cacheName -> cacheName, cacheName -> getDistributedCacheConfig())); + var caches = new HashMap(); + caches.put(CACHE_ZOWE, getDistributedCacheConfig()); + caches.put(CACHE_ZOWE_INVALIDATED_TOKEN, getDistributedCacheConfig()); if (applicationInfo.isModulith()) { - caches.put(CACHE_ZOWE, getDistributedCacheConfig()); - caches.put(CACHE_ZOWE_INVALIDATED_TOKEN, getDistributedCacheConfig()); caches.put("invalidatedJwtTokens", getDistributedCacheConfig()); // 1 minute to force zosmf tokens validation against zosmf for invalidated tokens From b2d0935ee782baff32358c40f4bfba5d5bb375e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Fri, 24 Apr 2026 17:26:30 +0200 Subject: [PATCH 3/7] clean up IT configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .github/workflows/integration-tests.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 41262afd59..3e3969594b 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -997,7 +997,6 @@ jobs: caching-service: image: ghcr.io/balhar-jakub/caching-service:${{ github.run_id }}-${{ github.run_number }} env: - ZWE_CACHING_SERVICE_PERSISTENT: 'infinispan' CACHING_STORAGE_MODE: "infinispan" JGROUPS_BIND_ADDRESS: "caching-service" JGROUPS_BIND_PORT: "7600" @@ -2164,7 +2163,6 @@ jobs: caching-service: image: ghcr.io/balhar-jakub/caching-service:${{ github.run_id }}-${{ github.run_number }} env: - ZWE_CACHING_SERVICE_PERSISTENT: 'infinispan' JGROUPS_BIND_PORT: "7600" SERVER_SSL_KEYSTORETYPE: "PKCS12" CACHING_STORAGE_INFINISPAN_PERSISTENCE_DATALOCATION: "data_replica" @@ -2175,7 +2173,6 @@ jobs: caching-service-2: image: ghcr.io/balhar-jakub/caching-service:${{ github.run_id }}-${{ github.run_number }} env: - ZWE_CACHING_SERVICE_PERSISTENT: 'infinispan' JGROUPS_BIND_PORT: "7600" SERVER_SSL_KEYSTORETYPE: "PKCS12" CACHING_STORAGE_INFINISPAN_PERSISTENCE_DATALOCATION: "data" @@ -2250,13 +2247,13 @@ jobs: APIML_SECURITY_X509_ENABLED: true APIML_SECURITY_SSL_NONSTRICTVERIFYSSLCERTIFICATESOFSERVICES: true APIML_DISCOVERY_ALLPEERSURLS: https://apiml-2:10011/eureka,https://apiml:10011/eureka - ZWE_CACHING_SERVICE_PERSISTENT: 'infinispan' - JGROUPS_BIND_PORT: "7600" SERVER_SSL_KEYSTORETYPE: "PKCS12" - CACHING_STORAGE_INFINISPAN_INITIALHOSTS: "apiml[7600],apiml-2[7600]" + CACHING_STORAGE_INFINISPAN_NUMSEGMENTS: "16" CACHING_STORAGE_MODE: "infinispan" + CACHING_STORAGE_INFINISPAN_INITIALHOSTS: "apiml[7600],apiml-2[7600]" + JGROUPS_BIND_PORT: "7600" JGROUPS_BIND_ADDRESS: "apiml" - CACHING_STORAGE_INFINISPAN_NUMSEGMENTS: "16" + JGROUPS_KEYEXCHANGE_PORT: 7601 apiml-2: image: ghcr.io/balhar-jakub/apiml:${{ github.run_id }}-${{ github.run_number }} env: @@ -2264,15 +2261,15 @@ jobs: APIML_GATEWAY_SERVICESTOLIMITREQUESTRATE: discoverableclient APIML_SECURITY_SSL_NONSTRICTVERIFYSSLCERTIFICATESOFSERVICES: true APIML_DISCOVERY_ALLPEERSURLS: https://apiml:10011/eureka,https://apiml-2:10011/eureka - ZWE_CACHING_SERVICE_PERSISTENT: 'infinispan' - JGROUPS_BIND_PORT: "7600" SERVER_SSL_KEYSTORETYPE: "PKCS12" - CACHING_STORAGE_INFINISPAN_INITIALHOSTS: "apiml[7600],apiml-2[7600]" - CACHING_STORAGE_MODE: "infinispan" - JGROUPS_BIND_ADDRESS: "apiml-2" APIML_SERVICE_HOSTNAME: "apiml-2" logbackService: ZWEAGW2 CACHING_STORAGE_INFINISPAN_NUMSEGMENTS: "16" + CACHING_STORAGE_MODE: "infinispan" + CACHING_STORAGE_INFINISPAN_INITIALHOSTS: "apiml[7600],apiml-2[7600]" + JGROUPS_BIND_PORT: "7600" + JGROUPS_BIND_ADDRESS: "apiml-2" + JGROUPS_KEYEXCHANGE_PORT: 7601 api-catalog-services: image: ghcr.io/balhar-jakub/api-catalog-services:${{ github.run_id }}-${{ github.run_number }} volumes: From 97c3078286c5b58fa1cbb2500d89a3eedc9b39b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Fri, 24 Apr 2026 17:36:29 +0200 Subject: [PATCH 4/7] fix imports (checkstyle) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .../caching/service/infinispan/config/InfinispanConfig.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java b/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java index 1510774408..0f66feb596 100644 --- a/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java +++ b/caching-service/src/main/java/org/zowe/apiml/caching/service/infinispan/config/InfinispanConfig.java @@ -43,11 +43,9 @@ import java.io.InputStream; import java.nio.file.Paths; import java.time.Duration; -import java.util.*; +import java.util.HashMap; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import java.util.stream.Collectors; -import java.util.stream.Stream; import static org.zowe.apiml.security.SecurityUtils.formatKeyringUrl; import static org.zowe.apiml.security.SecurityUtils.isKeyring; From ad4d138bc364977f76b19461ac03945be8883373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Fri, 24 Apr 2026 17:57:39 +0200 Subject: [PATCH 5/7] fix IT config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .github/workflows/integration-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3e3969594b..41d107c3db 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -2293,7 +2293,8 @@ jobs: - name: Run Startup Check if: always() run: > - ./gradlew runStartUpCheck --info -Denvironment.config=-docker-modulith + ./gradlew runStartUpCheck --info -Denvironment.config=-docker-modulith-ha + -Dgateway.instances=2 -Ddiscovery.instances=2 -Dcaching.instances=2 -Dapicatalog.instances=2 -Denvironment.modulith=true -Ddiscoverableclient.instances=1 -DcentralGateway.instances=0 -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_PASSWORD env: From 32fd30a16a4ee7eb43df8f7836b993d051ebb15d Mon Sep 17 00:00:00 2001 From: nxhafa Date: Fri, 24 Apr 2026 19:46:15 +0200 Subject: [PATCH 6/7] fix sonarqube issues (renaming fields that hide class fields) Signed-off-by: nxhafa --- .../service/AuthenticationService.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java b/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java index 2fc155c3ff..add5437542 100644 --- a/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java +++ b/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java @@ -244,23 +244,23 @@ private Boolean doInvalidate(String jwtToken, boolean distribute, Application ap } private void putValidationCache(String jwtToken, TokenAuthentication tokenAuthentication) { - var validatedJwtTokensCache = getValidatedJwtTokensCache(); - if (jwtToken != null && validatedJwtTokensCache != null) { - validatedJwtTokensCache.put(jwtToken, tokenAuthentication); + var cacheValidatedJwtTokens = getValidatedJwtTokensCache(); + if (jwtToken != null && cacheValidatedJwtTokens != null) { + cacheValidatedJwtTokens.put(jwtToken, tokenAuthentication); } } private void evictValidationCache(String jwtToken) { - var validatedJwtTokensCache = getValidatedJwtTokensCache(); - if (validatedJwtTokensCache != null) { - validatedJwtTokensCache.evict(jwtToken); + var cacheValidatedJwtTokens = getValidatedJwtTokensCache(); + if (cacheValidatedJwtTokens != null) { + cacheValidatedJwtTokens.evict(jwtToken); } } private void putInvalidatedCache(String jwtToken) { - var invalidatedJwtTokensCache = getInvalidatedJwtTokensCache(); - if (invalidatedJwtTokensCache != null) { - invalidatedJwtTokensCache.put(jwtToken, Boolean.TRUE); + var cacheInvalidatedJwtTokens = getInvalidatedJwtTokensCache(); + if (cacheInvalidatedJwtTokens != null) { + cacheInvalidatedJwtTokens.put(jwtToken, Boolean.TRUE); } } @@ -325,11 +325,11 @@ private boolean invalidateTokenOnAnotherInstance(String jwtToken, Application ap * @return true - token is invalidated, otherwise token is still valid */ public boolean isInvalidated(String jwtToken) { - var invalidatedJwtTokensCache = getInvalidatedJwtTokensCache(); - if (invalidatedJwtTokensCache == null) { + var cacheInvalidatedJwtTokens = getInvalidatedJwtTokensCache(); + if (cacheInvalidatedJwtTokens == null) { return false; } - Cache.ValueWrapper wrapper = invalidatedJwtTokensCache.get(jwtToken); + Cache.ValueWrapper wrapper = cacheInvalidatedJwtTokens.get(jwtToken); boolean result = wrapper != null && Boolean.TRUE.equals(wrapper.get()); log.debug("Token invalidation check for ...{}: {}", StringUtils.right(jwtToken, 15), result); return result; @@ -380,9 +380,9 @@ public TokenAuthentication validateJwtToken(String jwtToken) { throw new TokenNotValidException("Token ...%s was invalidated.".formatted(StringUtils.right(jwtToken, 15))); } - var validatedJwtTokensCache = getValidatedJwtTokensCache(); - if (validatedJwtTokensCache != null) { - Cache.ValueWrapper cached = validatedJwtTokensCache.get(jwtToken); + var cacheValidatedJwtTokens = getValidatedJwtTokensCache(); + if (cacheValidatedJwtTokens != null) { + Cache.ValueWrapper cached = cacheValidatedJwtTokens.get(jwtToken); if (cached != null) { var tokenAuthentication = (TokenAuthentication) cached.get(); log.debug("JWT ...{} found in the cache. Is authenticated: {}", StringUtils.right(jwtToken, 15), tokenAuthentication.isAuthenticated()); From 8aa60166c4903ac9a7315950f2f6ab945e7bc35c Mon Sep 17 00:00:00 2001 From: nxhafa Date: Fri, 24 Apr 2026 20:02:01 +0200 Subject: [PATCH 7/7] attempt to fix intentionality SonarQube issues Signed-off-by: nxhafa --- .../service/AuthenticationService.java | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java b/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java index add5437542..41155c63b7 100644 --- a/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java +++ b/zaas-service/src/main/java/org/zowe/apiml/zaas/security/service/AuthenticationService.java @@ -52,6 +52,7 @@ import java.text.ParseException; import java.util.*; +import java.util.concurrent.atomic.AtomicReference; import static org.zowe.apiml.security.common.util.JwtUtils.getJwtClaims; import static org.zowe.apiml.security.common.util.JwtUtils.handleJwtParserException; @@ -84,8 +85,8 @@ public class AuthenticationService { private final CacheManager cacheManager; private final CacheUtils cacheUtils; private boolean isModulithMode; - private volatile Cache validatedJwtTokensCache; - private volatile Cache invalidatedJwtTokensCache; + private final AtomicReference validatedJwtTokensCache = new AtomicReference<>(); + private final AtomicReference invalidatedJwtTokensCache = new AtomicReference<>(); @PostConstruct public void afterPropertiesSet() { @@ -93,25 +94,29 @@ public void afterPropertiesSet() { } private Cache getValidatedJwtTokensCache() { - if (validatedJwtTokensCache == null) { - synchronized (AuthenticationService.class) { - if (validatedJwtTokensCache == null) { - validatedJwtTokensCache = cacheManager.getCache(CACHE_VALIDATED_JWT_TOKENS); + var cacheValidatedJwtTokensCache = this.validatedJwtTokensCache.get(); + if (cacheValidatedJwtTokensCache == null) { + synchronized (validatedJwtTokensCache) { + cacheValidatedJwtTokensCache = validatedJwtTokensCache.get(); + if (cacheValidatedJwtTokensCache == null) { + validatedJwtTokensCache.set(cacheManager.getCache(CACHE_VALIDATED_JWT_TOKENS)); } } } - return validatedJwtTokensCache; + return validatedJwtTokensCache.get(); } private Cache getInvalidatedJwtTokensCache() { - if (invalidatedJwtTokensCache == null) { - synchronized (AuthenticationService.class) { - if (invalidatedJwtTokensCache == null) { - invalidatedJwtTokensCache = cacheManager.getCache(CACHE_INVALIDATED_JWT_TOKENS); + var cacheInvalidatedJwtTokensCache = this.invalidatedJwtTokensCache.get(); + if (cacheInvalidatedJwtTokensCache == null) { + synchronized (invalidatedJwtTokensCache) { + cacheInvalidatedJwtTokensCache = this.invalidatedJwtTokensCache.get(); + if (cacheInvalidatedJwtTokensCache == null) { + invalidatedJwtTokensCache.set(cacheManager.getCache(CACHE_INVALIDATED_JWT_TOKENS)); } } } - return invalidatedJwtTokensCache; + return invalidatedJwtTokensCache.get(); } /**