Hi,

I was tasked with writing a tool to generate a kind of "audit report". For
that I need to get all policies that people have across various systems.
NiFi is one of them.

I see that we have a REST API for Policies but that doesn't expose a method
to expose _all_ policies. I'd like to add a REST endpoint that allows
retrieving all policies.
Before I open a Jira I wanted to get feedback whether this addition would
be acceptable.

Implementation notes
This is how I see the current flow of requests from the
AccessPolicyResource to the actual AccessPolicyProider:

AccessPolicyResource -> NiFiServiceFacade (StandardNiFiServiceFacade) ->
AccessPolicyDAO (StandardPolicyBasedAuthorizerDAO) -> AccessPolicyProvider

Fortunately the AccessPolicyProvider already has a method to retrieve all
policies. Should there be custom implementations by third-parties they
already support the necessary methods and I believe the classes that need
to be changed are all NiFi internal:

* AccessPolicyResource
* NiFiServiceFacade
* StandardNiFiServiceFacade
* AccessPolicyDAO
* StandardPolicyBasedAuthorizerDAO
* And probably a bunch of others especially test classes

If I don't hear any objections I will open a Jira issue and would try and
provide a patch.

Cheers,
Lars

Reply via email to