Building on Koji's point, there is a demo in NiPyApi for setting up a
secured environment:
https://github.com/Chaffelson/nipyapi/blob/master/nipyapi/demo/secure_connection.py
That particular script creates a demo environment on Docker containers, but
you can lift the process and underlying security calls to craft to your own
requirements.

On Thu, Jul 19, 2018 at 7:02 AM Koji Kawamura <[email protected]>
wrote:

> Hello,
>
> I recommend using NiFi REST API instead of modifying authorizations
> xml directory, because:
> - What you do through UI can be done programmatically by sending the
> same REST requests that NiFi UI sends from browser. You can debug such
> requests using browser developer tool. Such as
> https://developers.google.com/web/tools/chrome-devtools/
> - You will need to restart NiFi process to reload the updated xml
> file, while REST API can change authorization against a live NiFi.
> - You will need to sync xml file content among all NiFi node in a
> cluster. If you update authorization via REST API, it will be synced
> automatically.
>
> Docs for NiFi REST API is here.
> https://nifi.apache.org/docs/nifi-docs/rest-api/index.html
>
> In order to call NiFI REST API endpoint programmatically, NiPyAPI may be
> useful.
> https://github.com/Chaffelson/nipyapi
>
> Thanks,
> Koji
>
> On Thu, Jul 19, 2018 at 2:35 PM, Dnyaneshwar Pawar
> <[email protected]> wrote:
> > Hi All,
> >
> >    We have typical requirement of implementing authorization
> > programmatically. We are new to NiFi and aware of the authorization
> through
> > UI. However, modifying authorizations.xml programmatically is something
> we
> > are looking for. Any pointer to documentation, source code would be great
> > help.
> >
> >    Thank You.
> >
> >
> >
> > Regards,
> >
> > Dnyaneshwar Pawar
> >
> >
> >
> > DISCLAIMER
> > ==========
> > This e-mail may contain privileged and confidential information which is
> the
> > property of Persistent Systems Ltd. It is intended only for the use of
> the
> > individual or entity to which it is addressed. If you are not the
> intended
> > recipient, you are not authorized to read, retain, copy, print,
> distribute
> > or use this message. If you have received this communication in error,
> > please notify the sender and delete all copies of this message.
> Persistent
> > Systems Ltd. does not accept any liability for virus infected mails.
>

Reply via email to