ChinmayHegde24 commented on code in PR #901:
URL: https://github.com/apache/ranger/pull/901#discussion_r3019889021


##########
ranger-authn/src/main/java/org/apache/ranger/authz/handler/jwt/RangerJwtAuthHandler.java:
##########
@@ -290,6 +303,38 @@ protected boolean validateAudiences(final SignedJWT 
jwtToken) {
         return valid;
     }
 
+    /**
+     * Validate whether any of the accepted issuer claims is present in the 
issued
+     * token claims list for issuer. Override this method in subclasses in 
order
+     * to customize the audience validation behavior.
+     *
+     * @param jwtToken the JWT token from which the JWT issuer will be obtained
+     * @return true if an expected issuer is present, otherwise false
+     */
+    protected boolean validateIssuer(final SignedJWT jwtToken) {

Review Comment:
   @kumaab Thank you for the suggestion.
   I think it makes more sense to keep validateIssuer as a standalone method in 
this PR, and then replace all three methods together with a single 
DefaultJWTClaimsVerifier in a follow-up PR.
   
   Handling the issuer claim with DefaultJWTClaimsVerifier here would introduce 
inconsistency, As the other validations are still separate and out of scope for 
this PR.
   Please correct me if I'm wrong.
   
   



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