diff --git a/security/src/test/java/com/networknt/security/ClaimsUtil.java b/security/src/test/java/com/networknt/security/ClaimsUtil.java index 393d81ef63..de7dabc781 100644 --- a/security/src/test/java/com/networknt/security/ClaimsUtil.java +++ b/security/src/test/java/com/networknt/security/ClaimsUtil.java @@ -53,6 +53,14 @@ public static JwtClaims getTestCcClaimsScope(String clientId, String scope) { return claims; } + public static JwtClaims getTestCcClaimsScopeService(String clientId, String scope, String serviceId) { + JwtClaims claims = JwtIssuer.getDefaultJwtClaims(); + claims.setClaim("client_id", clientId); + claims.setClaim("scope", scope); + claims.setClaim("service", serviceId); + return claims; + } + public static JwtClaims getTestCcClaimsScopeScp(String clientId, String scope) { JwtClaims claims = JwtIssuer.getDefaultJwtClaims(); claims.setClaim("client_id", clientId); diff --git a/security/src/test/java/com/networknt/security/JwtIssuerTest.java b/security/src/test/java/com/networknt/security/JwtIssuerTest.java index d568770a5b..7d2d3828e2 100644 --- a/security/src/test/java/com/networknt/security/JwtIssuerTest.java +++ b/security/src/test/java/com/networknt/security/JwtIssuerTest.java @@ -197,4 +197,12 @@ public void longlivedCcLocalProxyWithScp() throws Exception { System.out.println("***Long lived token for proxy***: " + jwt); } + @Test + public void sidecarReferenceBootstrap() throws Exception { + JwtClaims claims = ClaimsUtil.getTestCcClaimsScopeService("f7d42348-c647-4efb-a52d-4c5787421e72", "portal.r portal.w", "0100"); + claims.setExpirationTimeMinutesInTheFuture(5256000); + String jwt = JwtIssuer.getJwt(claims); + System.out.println("***Reference Long lived Bootstrap token for config server and controller: " + jwt); + } + } diff --git a/server/src/main/java/com/networknt/server/DefaultConfigLoader.java b/server/src/main/java/com/networknt/server/DefaultConfigLoader.java index 95c12d73b8..e2bee91ebf 100644 --- a/server/src/main/java/com/networknt/server/DefaultConfigLoader.java +++ b/server/src/main/java/com/networknt/server/DefaultConfigLoader.java @@ -260,7 +260,7 @@ private Map getServiceConfigs(String configServerPath) { Map configs = new HashMap<>(); - logger.debug("Calling Config Server endpoint:{}{}", configServerUri, configServerPath); + logger.debug("Calling Config Server endpoint:host{}:path{}", configServerUri, configServerPath); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(configServerUri.trim() + configServerPath.trim())) .header(Headers.AUTHORIZATION_STRING, authorization)