From 9d8ee0de5325e7d68b18167658d78c17c36a6303 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 27 Oct 2023 12:22:40 -0400 Subject: [PATCH] Update obo test Signed-off-by: Craig Perkins --- .../security/http/OnBehalfOfJwtAuthenticationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/integrationTest/java/org/opensearch/security/http/OnBehalfOfJwtAuthenticationTest.java b/src/integrationTest/java/org/opensearch/security/http/OnBehalfOfJwtAuthenticationTest.java index da4c21dded..15e9d0eecc 100644 --- a/src/integrationTest/java/org/opensearch/security/http/OnBehalfOfJwtAuthenticationTest.java +++ b/src/integrationTest/java/org/opensearch/security/http/OnBehalfOfJwtAuthenticationTest.java @@ -173,7 +173,7 @@ public void shouldNotAuthenticateForNonAdminUserWithoutOBOPermission() { public void shouldNotIncludeRolesFromHostMappingInOBOToken() { String oboToken = generateOboToken(OBO_USER_NAME_WITH_HOST_MAPPING, DEFAULT_PASSWORD); - Claims claims = Jwts.parser().setSigningKey(Base64.getDecoder().decode(signingKey)).build().parseClaimsJws(oboToken).getBody(); + Claims claims = Jwts.parser().setSigningKey(signingKey.getBytes(StandardCharsets.UTF_8)).build().parseClaimsJws(oboToken).getBody(); Object er = claims.get("er"); EncryptionDecryptionUtil encryptionDecryptionUtil = new EncryptionDecryptionUtil(encryptionKey);