Re: [PR] NIFI-13026 - Add a read only mode to non secured NiFi Registry [nifi]
pvillard31 closed pull request #8630: NIFI-13026 - Add a read only mode to non secured NiFi Registry URL: https://github.com/apache/nifi/pull/8630 -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] NIFI-13026 - Add a read only mode to non secured NiFi Registry [nifi]
pvillard31 commented on PR #8630: URL: https://github.com/apache/nifi/pull/8630#issuecomment-2050549928 Closing as this is a very particular edge case. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] NIFI-13026 - Add a read only mode to non secured NiFi Registry [nifi]
pvillard31 commented on PR #8630: URL: https://github.com/apache/nifi/pull/8630#issuecomment-2050213770 Thanks @exceptionfactory! What about the following approach where I have the DefaultAuthorizer moved to its own class and in authorizers.xml, have something like: default-authorizer org.apache.nifi.registry.security.authorization.DefaultAuthorizer false And then instead of public Authorizer getAuthorizer() throws AuthorizerFactoryException { if (authorizer == null) { if (properties.getSslPort() == null) { // use a default authorizer... only allowable when running not securely authorizer = createDefaultAuthorizer(); } else { I would instantiate the DefaultAuthorizer the same way as the other ones are instantiated. Thoughts? If we think this is not worth it because it is for a very specific use case, I'll maintain my own version of the NiFi Registry. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] NIFI-13026 - Add a read only mode to non secured NiFi Registry [nifi]
exceptionfactory commented on code in PR #8630: URL: https://github.com/apache/nifi/pull/8630#discussion_r1561351573 ## nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/security/authorization/AuthorizerFactory.java: ## @@ -523,6 +523,9 @@ private Authorizer createDefaultAuthorizer() { return new Authorizer() { @Override public AuthorizationResult authorize(final AuthorizationRequest request) throws AuthorizationAccessException { +if(properties.isReadOnly() && !request.getAction().equals(RequestAction.READ)) { Review Comment: Injecting this property check into the default is not an optimal approach because it requires evaluating the property on every request, as opposed to configuring a specific authorizer. -- 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-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org