From 859654da0ca3984fc1417ff7bf83134dee526eb3 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 22 Dec 2023 00:21:41 +0000 Subject: [PATCH] Spotless fixes Signed-off-by: Peter Nied --- .../dlic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java | 5 ++++- .../amazon/dlic/auth/http/jwt/HTTPJwtAuthenticator.java | 7 ++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/amazon/dlic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java b/src/main/java/com/amazon/dlic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java index 4115be0953..ea0a6378d7 100644 --- a/src/main/java/com/amazon/dlic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java +++ b/src/main/java/com/amazon/dlic/auth/http/jwt/AbstractHTTPJwtAuthenticator.java @@ -78,7 +78,10 @@ public AbstractHTTPJwtAuthenticator(Settings settings, Path configPath) { requiredIssuer = settings.get("required_issuer"); if (!jwtHeaderName.equals(AUTHORIZATION)) { - deprecationLog.deprecate("jwt_header", "The 'jwt_header' setting will be removed in the next major version of OpenSearch. Consult https://github.com/opensearch-project/security/issues/3886 for more details."); + deprecationLog.deprecate( + "jwt_header", + "The 'jwt_header' setting will be removed in the next major version of OpenSearch. Consult https://github.com/opensearch-project/security/issues/3886 for more details." + ); } try { 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 f9ed452013..9bf22bf7f3 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 @@ -32,7 +32,6 @@ import org.opensearch.security.auth.HTTPAuthenticator; import org.opensearch.security.filter.SecurityRequest; import org.opensearch.security.filter.SecurityResponse; -import org.opensearch.security.setting.DeprecatedSettings; import org.opensearch.security.user.AuthCredentials; import org.opensearch.security.util.KeyUtils; @@ -48,7 +47,6 @@ public class HTTPJwtAuthenticator implements HTTPAuthenticator { protected final Logger log = LogManager.getLogger(this.getClass()); protected final DeprecationLogger deprecationLog = DeprecationLogger.getLogger(this.getClass()); - private static final Pattern BASIC = Pattern.compile("^\\s*Basic\\s.*", Pattern.CASE_INSENSITIVE); private static final String BEARER = "bearer "; @@ -74,7 +72,10 @@ public HTTPJwtAuthenticator(final Settings settings, final Path configPath) { requireIssuer = settings.get("required_issuer"); if (!jwtHeaderName.equals(AUTHORIZATION)) { - deprecationLog.deprecate("jwt_header", "The 'jwt_header' setting will be removed in the next major version of OpenSearch. Consult https://github.com/opensearch-project/security/issues/3886 for more details."); + deprecationLog.deprecate( + "jwt_header", + "The 'jwt_header' setting will be removed in the next major version of OpenSearch. Consult https://github.com/opensearch-project/security/issues/3886 for more details." + ); } final JwtParserBuilder jwtParserBuilder = KeyUtils.createJwtParserBuilderFromSigningKey(signingKey, log);