You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/08/18 14:05:31 UTC

[GitHub] [nifi] exceptionfactory commented on a change in pull request #5262: NIFI-8766 Implemented Public Key Algorithm for JWT Signing

exceptionfactory commented on a change in pull request #5262:
URL: https://github.com/apache/nifi/pull/5262#discussion_r691271795



##########
File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/CsrfCookieRequestMatcher.java
##########
@@ -35,6 +33,6 @@
      */
     @Override
     public boolean matches(final HttpServletRequest httpServletRequest) {
-        return WebUtils.getCookie(httpServletRequest, DEFAULT_CSRF_COOKIE_NAME) != null;
+        return WebUtils.getCookie(httpServletRequest, SecurityCookieName.AUTHORIZATION_BEARER.getName()) != null;

Review comment:
       That's correct. Changes in NIFI-7870 introduced sending the JWT in an HTTP session cookie, but retained sending the JWT in the Authorization header. This helps mitigate potential CSRF issues since the browser automatically sends Cookies, but does not send the Authorization header unless the NiFi UI includes it as part of the request.




-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org