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

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

                Author: ASF GitHub Bot
            Created on: 13/Apr/22 08:55
            Start Date: 13/Apr/22 08:55
    Worklog Time Spent: 10m 
      Work Description: zeroflag commented on code in PR #554:
URL: https://github.com/apache/knox/pull/554#discussion_r849245117


##########
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/DefaultTokenAuthorityService.java:
##########
@@ -104,26 +103,15 @@ public void setAliasService(AliasService as) {
 
   @Override
   public JWT issueToken(JWTokenAttributes jwtAttributes) throws 
TokenServiceException {
-    String[] claimArray = new String[6];
-    claimArray[0] = "KNOXSSO";
-    claimArray[1] = jwtAttributes.getUserName();
-    claimArray[2] = null;
-    if (jwtAttributes.getExpires() == -1) {
-      claimArray[3] = null;
-    }
-    else {
-      claimArray[3] = String.valueOf(jwtAttributes.getExpires());
-    }
     final String algorithm = jwtAttributes.getAlgorithm();
     if(SUPPORTED_HMAC_SIG_ALGS.contains(algorithm)) {
-      claimArray[4] = null;
-      claimArray[5] = null;
+      jwtAttributes.setKid(null);

Review Comment:
   It follows the existing behaviour. @moresandeep do you remember why we need 
to null out the the jku + kid when the sign algorithm is "HS256", "HS384" or 
"HS512" ? 





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

    Worklog Id:     (was: 756256)
    Time Spent: 1h 40m  (was: 1.5h)

> 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: 1h 40m
>  Remaining Estimate: 0h
>




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

Reply via email to