smolnar82 commented on code in PR #1515:
URL: https://github.com/apache/knox/pull/1515#discussion_r4594113552


##########
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/JWTFederationFilter.java:
##########
@@ -318,7 +343,8 @@ public void doFilter(ServletRequest request, 
ServletResponse response, FilterCha
     // RFC 8693 token exchange: getWireToken flags this via 
TokenType.TokenExchange when the
     // grant_type is in the request body. The subject_token/actor_token are 
read from the unwrapped
     // request by the handler. Reading the body only happens on this 
(header-less) grant-flow path,
-    // so a proxied backend's body is never consumed by the 
header-authenticated path.
+    // so a proxied backend's body is never consumed by the 
header-authenticated path (unless
+    // ALLOWED_GRANT_TYPES is set).
     if (wireToken != null && 
TokenType.TokenExchange.equals(wireToken.getType())) {

Review Comment:
   > So this means that any use of allowed grant types setting restricts the 
entire topology to only Knox's own APIs. If you try to proxy access to another 
service, it will have the body consumed already and fail. Right?
   > 
   > Would this be sufficiently clear to an admin?
   
   I hope this is clear enough. I updated the documentation and called it out.



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