From 7f2fc19687ba77727141b3ac63feac7fc6d6fd56 Mon Sep 17 00:00:00 2001 From: Ryan Liang Date: Thu, 24 Aug 2023 23:01:24 -0700 Subject: [PATCH] Fix some comments 08/24 Signed-off-by: Ryan Liang --- .../java/org/opensearch/security/authtoken/jwt/JwtVendor.java | 4 ++-- .../opensearch/security/securityconf/impl/v7/ConfigV7.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/opensearch/security/authtoken/jwt/JwtVendor.java b/src/main/java/org/opensearch/security/authtoken/jwt/JwtVendor.java index e2afd2d86d..d2860dacc6 100644 --- a/src/main/java/org/opensearch/security/authtoken/jwt/JwtVendor.java +++ b/src/main/java/org/opensearch/security/authtoken/jwt/JwtVendor.java @@ -111,7 +111,7 @@ public String createJwt( Integer expirySeconds, List roles, List backendRoles, - Boolean roleSecruityMode + Boolean roleSecurityMode ) throws Exception { final long nowAsMillis = timeProvider.getAsLong(); final Instant nowAsInstant = Instant.ofEpochMilli(timeProvider.getAsLong()); @@ -148,7 +148,7 @@ public String createJwt( throw new Exception("Roles cannot be null"); } - if (!roleSecruityMode && backendRoles != null) { + if (!roleSecurityMode && backendRoles != null) { String listOfBackendRoles = String.join(",", backendRoles); jwtClaims.setProperty("br", listOfBackendRoles); } diff --git a/src/main/java/org/opensearch/security/securityconf/impl/v7/ConfigV7.java b/src/main/java/org/opensearch/security/securityconf/impl/v7/ConfigV7.java index 75f7bee9b9..02f3037021 100644 --- a/src/main/java/org/opensearch/security/securityconf/impl/v7/ConfigV7.java +++ b/src/main/java/org/opensearch/security/securityconf/impl/v7/ConfigV7.java @@ -482,7 +482,7 @@ public String toString() { public static class OnBehalfOf { @JsonProperty("enabled") - private Boolean oboEnabled; + private Boolean oboEnabled = Boolean.TRUE; @JsonProperty("signing_key") private String signingKey; @JsonProperty("encryption_key") @@ -498,7 +498,7 @@ public String configAsJson() { } public Boolean getOboEnabled() { - return oboEnabled == null ? Boolean.TRUE : oboEnabled; + return oboEnabled; } public void setOboEnabled(Boolean oboEnabled) {