From 234921328d601a7a7777428682d43de193f1cc90 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Thu, 17 Aug 2023 15:54:38 -0700 Subject: [PATCH] Change the name into keyUtils with the s Signed-off-by: Ryan Liang --- .../com/amazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java | 4 ++-- .../org/opensearch/security/http/OnBehalfOfAuthenticator.java | 4 ++-- .../opensearch/security/util/{keyUtil.java => keyUtils.java} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/main/java/org/opensearch/security/util/{keyUtil.java => keyUtils.java} (99%) diff --git a/src/main/java/com/amazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java b/src/main/java/com/amazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java index dcc7f952a8..060c7a2dbe 100644 --- a/src/main/java/com/amazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java +++ b/src/main/java/com/amazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java @@ -35,7 +35,7 @@ import org.opensearch.core.rest.RestStatus; import org.opensearch.security.auth.HTTPAuthenticator; import org.opensearch.security.user.AuthCredentials; -import org.opensearch.security.util.keyUtil; +import org.opensearch.security.util.keyUtils; public class HTTPJwtAuthenticator implements HTTPAuthenticator { @@ -57,7 +57,7 @@ public HTTPJwtAuthenticator(final Settings settings, final Path configPath) { super(); String signingKey = settings.get("signing_key"); - JwtParser _jwtParser = keyUtil.createJwtParserFromSigningKey(signingKey, log); + JwtParser _jwtParser = keyUtils.createJwtParserFromSigningKey(signingKey, log); jwtUrlParameter = settings.get("jwt_url_parameter"); jwtHeaderName = settings.get("jwt_header", HttpHeaders.AUTHORIZATION); diff --git a/src/main/java/org/opensearch/security/http/OnBehalfOfAuthenticator.java b/src/main/java/org/opensearch/security/http/OnBehalfOfAuthenticator.java index 0d91025601..696855ae05 100644 --- a/src/main/java/org/opensearch/security/http/OnBehalfOfAuthenticator.java +++ b/src/main/java/org/opensearch/security/http/OnBehalfOfAuthenticator.java @@ -40,7 +40,7 @@ import org.opensearch.security.authtoken.jwt.EncryptionDecryptionUtil; import org.opensearch.security.ssl.util.ExceptionUtils; import org.opensearch.security.user.AuthCredentials; -import org.opensearch.security.util.keyUtil; +import org.opensearch.security.util.keyUtils; import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX; import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX; @@ -73,7 +73,7 @@ public OnBehalfOfAuthenticator(Settings settings, String clusterName) { } private JwtParser initParser(final String signingKey) { - JwtParser _jwtParser = keyUtil.createJwtParserFromSigningKey(signingKey, log); + JwtParser _jwtParser = keyUtils.createJwtParserFromSigningKey(signingKey, log); if (_jwtParser == null) { throw new RuntimeException("Unable to find on behalf of authenticator signing key"); diff --git a/src/main/java/org/opensearch/security/util/keyUtil.java b/src/main/java/org/opensearch/security/util/keyUtils.java similarity index 99% rename from src/main/java/org/opensearch/security/util/keyUtil.java rename to src/main/java/org/opensearch/security/util/keyUtils.java index c8370b19fc..3b7ebd1c7d 100644 --- a/src/main/java/org/opensearch/security/util/keyUtil.java +++ b/src/main/java/org/opensearch/security/util/keyUtils.java @@ -27,7 +27,7 @@ import java.util.Base64; import java.util.Objects; -public class keyUtil { +public class keyUtils { public static JwtParser createJwtParserFromSigningKey(final String signingKey, final Logger log) { final SecurityManager sm = System.getSecurityManager();