exceptionfactory commented on code in PR #11273:
URL: https://github.com/apache/nifi/pull/11273#discussion_r3289875216


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/connector/ProxyHeaderValidatorCustomizer.java:
##########
@@ -65,6 +71,24 @@ public Request customize(final Request request, final 
HttpFields.Mutable respons
     }
 
     private Request customizeSecureRequest(final Request request) {
+        final X509Certificate peerCertificate = findPeerCertificate(request);
+
+        // Requests not authenticated with Client Certificates require header 
validation
+        if (peerCertificate == null) {
+            processProxyHostHeaders(request);
+        } else {

Review Comment:
   I considered that additional approach, but it places additional constraints 
on information that is not necessarily available. The current approach places 
inherent security constraints with mTLS, and also fits within current 
configuration boundaries.



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