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 2019/06/05 19:34:11 UTC

[GitHub] [nifi-registry] bbende commented on a change in pull request #194: NIFIREG-212 Separating proxy into Read, Write, and Delete so some pro…

bbende commented on a change in pull request #194: NIFIREG-212 Separating proxy into Read, Write, and Delete so some pro…
URL: https://github.com/apache/nifi-registry/pull/194#discussion_r290900145
 
 

 ##########
 File path: nifi-registry-core/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/security/authentication/x509/X509IdentityAuthenticationProvider.java
 ##########
 @@ -97,16 +106,51 @@ protected AuthenticationSuccessToken buildAuthenticatedToken(
             proxy = createUser(identity, groups, proxy, clientAddress, isAnonymous);
 
             if (chainIter.hasPrevious()) {
-                try {
-                    PROXY_AUTHORIZABLE.authorize(authorizer, RequestAction.WRITE, proxy);
-                } catch (final AccessDeniedException e) {
-                    throw new UntrustedProxyException(String.format("Untrusted proxy [%s].", identity));
+                final String httpMethodStr = x509RequestDetails.getHttpMethod().toUpperCase();
+                final HttpMethod httpMethod = HttpMethod.resolve(httpMethodStr);
+                LOGGER.debug("HTTP method is {}", new Object[]{httpMethod});
 
 Review comment:
   Good catch, I pushed another commit that moves it outside of the loop. 
   
   I meant to just push up that commit but ended up rebasing so force-pushed, sorry.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services