exceptionfactory commented on code in PR #9566:
URL: https://github.com/apache/nifi/pull/9566#discussion_r1921080476
##########
nifi-registry/nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/jwt/JwtService.java:
##########
@@ -155,6 +176,7 @@ public String generateSignedToken(String identity, String
preferredUsername, Str
.audience().add(audience).and()
.claim(USERNAME_CLAIM, preferredUsername)
.claim(KEY_ID_CLAIM, key.getId())
+ .claim(GROUPS_CLAIM, groups)
Review Comment:
This `groups` claim value can be null in some cases, such as authentication
with LDAP. Instead of adding a `groups` claim with a `null` value, either an
empty list should be set, or the claim should be omitted. As this is the JWT
that NiFi Registry generates, it seems better to set an empty list when the
input `groups` parameter is null.
--
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]