pzampino commented on code in PR #554:
URL: https://github.com/apache/knox/pull/554#discussion_r849646292


##########
gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java:
##########
@@ -827,6 +837,10 @@ private Response getAuthenticationToken() {
     return Response.ok().entity("{ \"Unable to acquire token.\" }").build();
   }
 
+  private boolean shouldIncludeGroups() {
+    return 
Boolean.parseBoolean(request.getParameter(KNOX_TOKEN_INCLUDE_GROUPS));

Review Comment:
   What happens if someone specifies a non-boolean value for the request param? 
No one SHOULD do that, but what happens if they do?



##########
gateway-service-knoxtoken/src/main/java/org/apache/knox/gateway/service/knoxtoken/TokenResource.java:
##########
@@ -144,6 +144,7 @@ public class TokenResource {
   private static final String TARGET_ENDPOINT_PULIC_CERT_PEM = 
TOKEN_PARAM_PREFIX + "target.endpoint.cert.pem";
   static final String QUERY_PARAMETER_DOAS = "doAs";
   static final String PROXYUSER_PREFIX = TOKEN_PARAM_PREFIX + "proxyuser";
+  public static final String KNOX_TOKEN_INCLUDE_GROUPS = 
"knox.token.include.groups";

Review Comment:
   nit: Can/should TOKEN_PARAM_PREFIX be used here?



-- 
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