hsheinblatt commented on code in PR #1448:
URL: https://github.com/apache/knox/pull/1448#discussion_r4253756496


##########
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/K8sDestinationAudienceValidator.java:
##########
@@ -128,13 +158,16 @@ public class K8sDestinationAudienceValidator implements 
RequestAudienceValidator
    * since the header is expected to carry the routed request path directly.
    */
   public static final String PATH_HEADER_FROM_URL_PARAM = PARAM_PREFIX + 
"path.header.from.url";

Review Comment:
   The validator is new. I don't think there has been a release since it was 
added. And the extensibility model is to add a new validator. I believe it 
should be OK to change this.



##########
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/K8sDestinationAudienceValidator.java:
##########
@@ -401,10 +768,16 @@ private static String paramOrDefault(final FilterConfig 
filterConfig, final Stri
     return (value == null || value.isEmpty()) ? defaultValue : value;
   }
 
+  /**
+   * Splits on {@code ,} and trims each entry, but does not drop an entry that 
trims to empty --
+   * for example a stray {@code ,,} or a trailing {@code ,} in {@link 
#CLUSTER_DOMAINS_PARAM}.
+   * This is operator-supplied configuration, not request data, so it is 
validated strictly: an
+   * empty entry is passed through to {@link ClusterDomain#parse(String)}, 
which rejects it, the
+   * same as any other malformed entry, rather than being silently discarded 
here.
+   */
   private static List<String> parseCommaSeparated(final String 
commaSeparatedList) {
     return Arrays.stream(commaSeparatedList.split(","))

Review Comment:
   Fixed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to