You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Madhan Vishwas <ma...@gmail.com> on 2020/07/04 15:32:03 UTC
Question about Using NiFi API of Secured Instance
Hi All,
This is a Question about Using NiFi API of Secured Instance.
I have been able to Secure NiFi instance and am using Secure instance
through browser using the Certificate imported inside browser.
I intend to use the same mechanism (without using LDAP / Kerberos / OpenID
authentication and just sticking to the Certificate) for using API of
Secure NiFi instance.
Is this possible ?
Any examples / samples etc . to do it ?
As another added hint / supplement to the problem statement - my intent is
to use this through c# (.NET) code.
Please help.
Thanks in Advance.
Regards,
Madhan.
Re: Question about Using NiFi API of Secured Instance
Posted by Bryan Bende <bb...@gmail.com>.
Hello,
Yes this is possible. I don't know C#, but in Java code you need to create
an SSLContext where you specify the keystore and truststore, and then make
an https connection that is configured with that SSLContext.
Here is some sample code that shows creating an SSLContext in Java:
https://github.com/apache/nifi-registry/blob/master/nifi-registry-core/nifi-registry-client/src/main/java/org/apache/nifi/registry/client/NiFiRegistryClientConfig.java#L72-L132
And here is where it used, this is with the Jersey http client, so it would
be specific to whatever language/client you are using:
https://github.com/apache/nifi-registry/blob/master/nifi-registry-core/nifi-registry-client/src/main/java/org/apache/nifi/registry/client/impl/JerseyNiFiRegistryClient.java#L99-L105
Thanks,
Bryan
On Sat, Jul 4, 2020 at 11:44 AM Madhan Vishwas <ma...@gmail.com>
wrote:
> Hi All,
> This is a Question about Using NiFi API of Secured Instance.
> I have been able to Secure NiFi instance and am using Secure instance
> through browser using the Certificate imported inside browser.
> I intend to use the same mechanism (without using LDAP / Kerberos / OpenID
> authentication and just sticking to the Certificate) for using API of
> Secure NiFi instance.
> Is this possible ?
> Any examples / samples etc . to do it ?
> As another added hint / supplement to the problem statement - my intent is
> to use this through c# (.NET) code.
> Please help.
> Thanks in Advance.
> Regards,
> Madhan.
>