diff --git a/server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java b/server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java index 3c64e6aac7155..2965b81bb4a0b 100644 --- a/server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java +++ b/server/src/main/java/org/opensearch/identity/ExtensionTokenProcessor.java @@ -122,7 +122,7 @@ public PrincipalIdentifierToken generateToken(Principal principal) throws NoSuch * * @opensearch.internal * - * This method contains a placeholder simplementation. + * This method contains a placeholder implementation. * More concrete implementation will be covered in https://github.com/opensearch-project/OpenSearch/issues/4485 */ public Principal extractPrincipal(PrincipalIdentifierToken token) throws IllegalArgumentException { @@ -138,7 +138,6 @@ public Principal extractPrincipal(PrincipalIdentifierToken token) throws Illegal byte[] principalNameEncodedBytes = Arrays.copyOfRange(token_bytes, 0, KEY_SIZE); byte[] extensionNameEncodedBytes = Arrays.copyOfRange(token_bytes, KEY_SIZE, token_bytes.length); - Cipher principalCipher = Cipher.getInstance(ALGORITHM); principalCipher.init(Cipher.DECRYPT_MODE, this.secretKey, new GCMParameterSpec(TAG_LENGTH, this.initializationVector)); byte[] principalEncoding = principalCipher.doFinal(principalNameEncodedBytes);