[ 
https://issues.apache.org/jira/browse/KNOX-2731?focusedWorklogId=756483&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-756483
 ]

ASF GitHub Bot logged work on KNOX-2731:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Apr/22 15:57
            Start Date: 13/Apr/22 15:57
    Worklog Time Spent: 10m 
      Work Description: 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?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 756483)
    Time Spent: 2h 20m  (was: 2h 10m)

> Allow group membership information to be included in issued JWTs
> ----------------------------------------------------------------
>
>                 Key: KNOX-2731
>                 URL: https://issues.apache.org/jira/browse/KNOX-2731
>             Project: Apache Knox
>          Issue Type: Improvement
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to