Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Set root level access policies using NiFi REST API

Highlighted

Set root level access policies using NiFi REST API

New Contributor

Hi,

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.

86623-acess-policy-ui.png

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

5 REPLIES 5

Re: Set root level access policies using NiFi REST API

New Contributor

@Matt Clarke @Felix Albani @Matt Burgess

Can someone please help?

Re: Set root level access policies using NiFi REST API

New Contributor

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.

Re: Set root level access policies using NiFi REST API

New Contributor

Did you get any resolution ?

Re: Set root level access policies using NiFi REST API

New Contributor

@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

Re: Set root level access policies using NiFi REST API

New Contributor
Don't have an account?
Coming from Hortonworks? Activate your account here