Support Questions
Find answers, ask questions, and share your expertise

Set root level access policies using NiFi REST API


When I try to install an instance of NiFi, I am able to start NiFi but to configure any flows in the canvas, I have to set the component level access policies on the canvas and provide the admin and users with rights to view/modify component and data. Only after setting this access policies, I am able to configure any flows or else I getting an error saying: HTTP/1.1 403 Forbidden: No applicable policies could be found. Contact the system administrator.


This is understandable since the UUID of the NiFi canvas change with every fresh installation of NiFi (since flow.xml.gz changes).

My question is, can the access policies be set using NiFi REST API for the canvas rather than manually adding the users via UI. I want to build a UNIX script with set of commands that uses nifi-api to set the access policies so that I can run this script and then configure the flows.

Is it possible to set access policies using nifi-api? If so, how?

Thanks and Regards,

Harish Vaibhav Kali


@Matt Clarke @Felix Albani @Matt Burgess

Can someone please help?

To be more specific about my question, I wan to know if there is any way we can set component level access policies(view/modify component/data/policies) without using UI or NiFi REST APIs.


Did you get any resolution ?

@Milan Das Yes, for the very first time we set using UI and this will create a authorizsations.xml file. For every installation after the first one, we copy the old authorizations.xml, get the current installation root id and replace the old installation root id with the current one in authorizations.xml.

This way you dont set the component level policies every time a new instance of NiFi is installed

; ;