Skip to content

Commit

Permalink
Rename the KeyUtils
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <jiallian@amazon.com>
  • Loading branch information
RyanL1997 committed Aug 22, 2023
1 parent a4e7aff commit 0f0478d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.keyUtils;
import org.opensearch.security.util.KeyUtils;

public class HTTPJwtAuthenticator implements HTTPAuthenticator {

Expand All @@ -57,7 +57,7 @@ public HTTPJwtAuthenticator(final Settings settings, final Path configPath) {
super();

String signingKey = settings.get("signing_key");
JwtParser _jwtParser = keyUtils.createJwtParserFromSigningKey(signingKey, log);
JwtParser _jwtParser = KeyUtils.createJwtParserFromSigningKey(signingKey, log);

jwtUrlParameter = settings.get("jwt_url_parameter");
jwtHeaderName = settings.get("jwt_header", HttpHeaders.AUTHORIZATION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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.keyUtils;
import org.opensearch.security.util.KeyUtils;

import static org.opensearch.security.OpenSearchSecurityPlugin.LEGACY_OPENDISTRO_PREFIX;
import static org.opensearch.security.OpenSearchSecurityPlugin.PLUGINS_PREFIX;
Expand Down Expand Up @@ -69,7 +69,7 @@ public OnBehalfOfAuthenticator(Settings settings, String clusterName) {
}

private JwtParser initParser(final String signingKey) {
JwtParser _jwtParser = keyUtils.createJwtParserFromSigningKey(signingKey, log);
JwtParser _jwtParser = KeyUtils.createJwtParserFromSigningKey(signingKey, log);

if (_jwtParser == null) {
throw new RuntimeException("Unable to find on behalf of authenticator signing key");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.Base64;
import java.util.Objects;

public class keyUtils {
public class KeyUtils {

public static JwtParser createJwtParserFromSigningKey(final String signingKey, final Logger log) {
final SecurityManager sm = System.getSecurityManager();
Expand Down

0 comments on commit 0f0478d

Please sign in to comment.