You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/02/08 18:55:08 UTC

[GitHub] [solr] dsmiley commented on a change in pull request #611: SOLR-15907 JWT Auth move to module - rebased after Spotless

dsmiley commented on a change in pull request #611:
URL: https://github.com/apache/solr/pull/611#discussion_r801954510



##########
File path: solr/core/src/java/org/apache/solr/security/JWTIssuerConfig.java
##########
@@ -408,8 +433,8 @@ private HttpsJwks create(String url) {
   }
 
   /**
-   * Config object for a OpenId Connect well-known config
-   * Typically exposed through /.well-known/openid-configuration endpoint
+   * Config object for a OpenId Connect well-known config Typically exposed through

Review comment:
       Missing period to end the sentence

##########
File path: solr/core/src/java/org/apache/solr/security/JWTPrincipalWithUserRoles.java
##########
@@ -61,11 +58,17 @@ public int hashCode() {
 
   @Override
   public String toString() {
-    return "JWTPrincipalWithUserRoles{" +
-        "username='" + username + '\'' +
-        ", token='" + "*****" + '\'' +
-        ", claims=" + claims +
-        ", roles=" + roles +
-        '}';
+    return "JWTPrincipalWithUserRoles{"
+        + "username='"
+        + username
+        + '\''

Review comment:
       this has become more awkward. It could be improved by combining the apostrophe into the string of the next line; same for further below.

##########
File path: solr/core/src/java/org/apache/solr/security/JWTPrincipal.java
##########
@@ -77,10 +75,15 @@ public int hashCode() {
 
   @Override
   public String toString() {
-    return "JWTPrincipal{" +
-        "username='" + username + '\'' +
-        ", token='" + "*****" + '\'' +
-        ", claims=" + claims +
-        '}';
+    return "JWTPrincipal{"
+        + "username='"
+        + username
+        + '\''

Review comment:
       this has become more awkward. It could be improved by combining the apostrophe into the string of the next line; same for further below.

##########
File path: solr/core/src/java/org/apache/solr/security/JWTVerificationkeyResolver.java
##########
@@ -140,16 +155,23 @@ public Key resolveKey(JsonWebSignature jws, List<JsonWebStructure> nestingContex
       }
     } catch (JoseException | IOException | InvalidJwtException | MalformedClaimException e) {
       StringBuilder sb = new StringBuilder();
-      sb.append("Unable to find a suitable verification key for JWS w/ header ").append(jws.getHeaders().getFullHeaderAsJsonString());
-      sb.append(" due to an unexpected exception (").append(e).append(") while obtaining or using keys from source ");
+      sb.append("Unable to find a suitable verification key for JWS w/ header ")
+          .append(jws.getHeaders().getFullHeaderAsJsonString());
+      sb.append(" due to an unexpected exception (")
+          .append(e)
+          .append(") while obtaining or using keys from source ");
       sb.append(keysSource);
       throw new UnresolvableKeyException(sb.toString(), e);
     }
 
     if (theChosenOne == null) {
       StringBuilder sb = new StringBuilder();

Review comment:
       This is a needless use of StringBuilder; but I can understand if you choose to not address it in this PR




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org