<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: NiFi RestApi and AzureAD Login in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371613#M241027</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97072"&gt;@mbraunerde&lt;/a&gt;&amp;nbsp;Based on what you shared , you are not configured to interact/use your AzureAD at all.&lt;BR /&gt;&lt;BR /&gt;Your nifi.properties is configured to use the out-of-the-box "&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#single_user_identity_provider" target="_self"&gt;single-user-provider&lt;/A&gt;":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nifi.security.user.login.identity.provider=single-user-provider&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This login provider generates a single local user with the specific username and password configured in the provider's configuration within the login-identity-providers.xml&lt;BR /&gt;&lt;BR /&gt;The only authorizer that supports the single-user-provider is the single-user-authorizer which simply gives your single configured user complete access to everything in your NiFi.&amp;nbsp; The other authorizer in your authorizers.xml is not being used at all.&amp;nbsp; These single user authentication and authorization providers also are not support in a NiFi cluster setup.&amp;nbsp; Their intent when created was simply to make it real easy for user just starting to experiment with NiFi to have a secured setup, so that their NiFi UI was not exposed to the world over http.&lt;BR /&gt;&lt;BR /&gt;The first thing i'd recommend is setting up your NiFi in a more production ready configuration using certificate you generate or generate through a certificate authority.&amp;nbsp; Then switch to a different &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#user_authentication" target="_self"&gt;authentication&lt;/A&gt; and &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#multi-tenant-authorization" target="_self"&gt;authorization&lt;/A&gt; providers.&amp;nbsp; For example the ldap- provider for login which can be configured to authenticate users via LDAP/AD.&amp;nbsp; &amp;nbsp;Then pair that with a managed authorizer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This production ready authentication and authorization setup will then give you the ability to support authentication for multiple users and give you ability to set user specific authorizations that control what each user is allowed to access and interact with.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As far as interfacing with your NiFi via the &lt;A href="https://nifi.apache.org/docs/nifi-docs/rest-api/index.html" target="_self"&gt;NiFi-API&lt;/A&gt;, the recommend method would be to create a clientAuth certificate for the interaction.&amp;nbsp; A secured NiFi (HTTPS) will support authentication via a mutualTLS handshake (only if not using single user) always.&amp;nbsp; Meaning it will WANT a client certificate when interacting with the URL or via the rest-api.&amp;nbsp; If the a client certificate is not presented, NiFi will attempt next configured authentication method.&amp;nbsp; While you can use other authentication methods to interact with the rest-api (like ldap-provider), it is more difficult to manage since you would first need to interact with the login rest-api endpoint to get a client token and store that token so it can be passed in every additional rest-api call you make.&amp;nbsp; That token does expire which means you would need to fetch a new token periodically.&amp;nbsp; With a clientTLS certificate through a mutualTLS based authentication, you simply include that client certificate in every rest-api call (no need to get a token). Client certificate can have a configurable expiration (typically 1 or 2 years by default).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 17:08:39 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2023-05-26T17:08:39Z</dc:date>
    <item>
      <title>NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371183#M240915</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm working on a NiFi 1.21.0 and the user login is connected to AzureAd. It's working a nice way for all humans, but we want to check the nifi with our monitoring solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My login-identity-providers.xml contains&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;loginIdentityProviders&amp;gt;
    &amp;lt;provider&amp;gt;
        &amp;lt;identifier&amp;gt;single-user-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authentication.single.user.SingleUserLoginIdentityProvider&amp;lt;/class&amp;gt;
        &amp;lt;property name="Username"&amp;gt;known-user&amp;lt;/property&amp;gt;
        &amp;lt;property name="Password"&amp;gt;hashed-known-password&amp;lt;/property&amp;gt;
    &amp;lt;/provider&amp;gt;
&amp;lt;/loginIdentityProviders&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My authorizers.xml contains&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;authorizers&amp;gt;
    &amp;lt;userGroupProvider&amp;gt;
        &amp;lt;identifier&amp;gt;file-user-group-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.FileUserGroupProvider&amp;lt;/class&amp;gt;
        &amp;lt;property name="Users File"&amp;gt;./conf/users.xml&amp;lt;/property&amp;gt;
        &amp;lt;property name="Legacy Authorized Users File"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial User Identity 1"&amp;gt;&amp;lt;/property&amp;gt;
    &amp;lt;/userGroupProvider&amp;gt;
    &amp;lt;userGroupProvider&amp;gt;
        &amp;lt;identifier&amp;gt;aad-user-group-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.azure.AzureGraphUserGroupProvider&amp;lt;/class&amp;gt;
        &amp;lt;property name="Refresh Delay"&amp;gt;5 mins&amp;lt;/property&amp;gt;
        &amp;lt;property name="Authority Endpoint"&amp;gt;https://login.microsoftonline.com&amp;lt;/property&amp;gt;
        &amp;lt;property name="Directory ID"&amp;gt;DirectoryID&amp;lt;/property&amp;gt;
        &amp;lt;property name="Application ID"&amp;gt;ApplicationID&amp;lt;/property&amp;gt;
        &amp;lt;property name="Client Secret"&amp;gt;ClientSecret&amp;lt;/property&amp;gt;
        &amp;lt;property name="Group Filter Prefix"&amp;gt;Nifi-AAD&amp;lt;/property&amp;gt;
        &amp;lt;property name="Page Size"&amp;gt;100&amp;lt;/property&amp;gt;
    &amp;lt;/userGroupProvider&amp;gt;
    &amp;lt;userGroupProvider&amp;gt;
        &amp;lt;identifier&amp;gt;composite-configurable-user-group-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.CompositeConfigurableUserGroupProvider&amp;lt;/class&amp;gt;
        &amp;lt;property name="Configurable User Group Provider"&amp;gt;file-user-group-provider&amp;lt;/property&amp;gt;
        &amp;lt;property name="User Group Provider 1"&amp;gt;aad-user-group-provider&amp;lt;/property&amp;gt;
    &amp;lt;/userGroupProvider&amp;gt;
    &amp;lt;accessPolicyProvider&amp;gt;
        &amp;lt;identifier&amp;gt;file-access-policy-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.FileAccessPolicyProvider&amp;lt;/class&amp;gt;
        &amp;lt;property name="User Group Provider"&amp;gt;composite-configurable-user-group-provider&amp;lt;/property&amp;gt;
        &amp;lt;property name="Authorizations File"&amp;gt;./conf/authorizations.xml&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial Admin Identity"&amp;gt;admin@login-domain.com&amp;lt;/property&amp;gt;
        &amp;lt;property name="Legacy Authorized Users File"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 1"&amp;gt;&amp;lt;/property&amp;gt;
    &amp;lt;/accessPolicyProvider&amp;gt;
    &amp;lt;authorizer&amp;gt;
        &amp;lt;identifier&amp;gt;managed-authorizer&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.StandardManagedAuthorizer&amp;lt;/class&amp;gt;
        &amp;lt;property name="Access Policy Provider"&amp;gt;file-access-policy-provider&amp;lt;/property&amp;gt;
    &amp;lt;/authorizer&amp;gt;
    &amp;lt;authorizer&amp;gt;
        &amp;lt;identifier&amp;gt;single-user-authorizer&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.single.user.SingleUserAuthorizer&amp;lt;/class&amp;gt;
    &amp;lt;/authorizer&amp;gt;
&amp;lt;/authorizers&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The nifi.properties contains&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nifi.authorizer.configuration.file=./conf/authorizers.xml
nifi.security.user.authorizer=single-user-authorizer
nifi.security.allow.anonymous.authentication=false
nifi.security.user.saml.authentication.expiration=12 hours

nifi.security.user.authorizer=single-user-authorizer
nifi.security.user.login.identity.provider=single-user-provider
nifi.security.user.jws.key.rotation.period=PT1H

nifi.security.user.oidc.discovery.url=https://login.microsoftonline.com/DirecotoryID/v2.0/.well-known/openid-configuration
nifi.security.user.oidc.connect.timeout=5 secs
nifi.security.user.oidc.read.timeout=5 secs
nifi.security.user.oidc.client.id=ApplicationID
nifi.security.user.oidc.client.secret=ClientSecret
nifi.security.user.oidc.preferred.jwsalgorithm=
nifi.security.user.oidc.additional.scopes=profile
nifi.security.user.oidc.claim.identifying.user=email
nifi.security.user.oidc.fallback.claims.identifying.user=upn&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;My Questions:&lt;/P&gt;&lt;P&gt;1) Is it possible to login with the "known user" of login-identity-providers.xml?&lt;/P&gt;&lt;P&gt;2) How can I access the api?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time!&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 11:45:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371183#M240915</guid>
      <dc:creator>mbraunerde</dc:creator>
      <dc:date>2023-05-19T11:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371421#M240980</link>
      <description>&lt;P&gt;If nobody got a solution, that's okay, but does anybody got a hint for me to solve the authentication at the rest api of nifi regarding AzureAD OAuth2?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*edited - fix typo*&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 06:08:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371421#M240980</guid>
      <dc:creator>mbraunerde</dc:creator>
      <dc:date>2023-05-24T06:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371613#M241027</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97072"&gt;@mbraunerde&lt;/a&gt;&amp;nbsp;Based on what you shared , you are not configured to interact/use your AzureAD at all.&lt;BR /&gt;&lt;BR /&gt;Your nifi.properties is configured to use the out-of-the-box "&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#single_user_identity_provider" target="_self"&gt;single-user-provider&lt;/A&gt;":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nifi.security.user.login.identity.provider=single-user-provider&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This login provider generates a single local user with the specific username and password configured in the provider's configuration within the login-identity-providers.xml&lt;BR /&gt;&lt;BR /&gt;The only authorizer that supports the single-user-provider is the single-user-authorizer which simply gives your single configured user complete access to everything in your NiFi.&amp;nbsp; The other authorizer in your authorizers.xml is not being used at all.&amp;nbsp; These single user authentication and authorization providers also are not support in a NiFi cluster setup.&amp;nbsp; Their intent when created was simply to make it real easy for user just starting to experiment with NiFi to have a secured setup, so that their NiFi UI was not exposed to the world over http.&lt;BR /&gt;&lt;BR /&gt;The first thing i'd recommend is setting up your NiFi in a more production ready configuration using certificate you generate or generate through a certificate authority.&amp;nbsp; Then switch to a different &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#user_authentication" target="_self"&gt;authentication&lt;/A&gt; and &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#multi-tenant-authorization" target="_self"&gt;authorization&lt;/A&gt; providers.&amp;nbsp; For example the ldap- provider for login which can be configured to authenticate users via LDAP/AD.&amp;nbsp; &amp;nbsp;Then pair that with a managed authorizer.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This production ready authentication and authorization setup will then give you the ability to support authentication for multiple users and give you ability to set user specific authorizations that control what each user is allowed to access and interact with.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As far as interfacing with your NiFi via the &lt;A href="https://nifi.apache.org/docs/nifi-docs/rest-api/index.html" target="_self"&gt;NiFi-API&lt;/A&gt;, the recommend method would be to create a clientAuth certificate for the interaction.&amp;nbsp; A secured NiFi (HTTPS) will support authentication via a mutualTLS handshake (only if not using single user) always.&amp;nbsp; Meaning it will WANT a client certificate when interacting with the URL or via the rest-api.&amp;nbsp; If the a client certificate is not presented, NiFi will attempt next configured authentication method.&amp;nbsp; While you can use other authentication methods to interact with the rest-api (like ldap-provider), it is more difficult to manage since you would first need to interact with the login rest-api endpoint to get a client token and store that token so it can be passed in every additional rest-api call you make.&amp;nbsp; That token does expire which means you would need to fetch a new token periodically.&amp;nbsp; With a clientTLS certificate through a mutualTLS based authentication, you simply include that client certificate in every rest-api call (no need to get a token). Client certificate can have a configurable expiration (typically 1 or 2 years by default).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 17:08:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371613#M241027</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-05-26T17:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371623#M241033</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx for your hints. AzureAD Login is already working, but I will check why after my vacations and keep this topic updated.&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 09:49:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371623#M241033</guid>
      <dc:creator>mbraunerde</dc:creator>
      <dc:date>2023-05-27T09:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371778#M241084</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97072"&gt;@mbraunerde&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I guarantee your NiFi is not authenticating via your AzureAD as long as your NiFi is still configured as your configuration is shared above.&lt;BR /&gt;&lt;BR /&gt;These two nifi.properties properties are configured to which login provider and authorization provider are actively being used:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Authentication:
nifi.security.user.login.identity.provider=single-user-provider

Authorization:
nifi.security.user.authorizer=single-user-authorizer&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;While your authorizers.xml has additional providers:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;file-user-group-provider
aad-user-group-provider
composite-configurable-user-group-provider
file-access-policy-provider&lt;/LI-CODE&gt;&lt;P&gt;and an additional authorizer that utilizes the above providers:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;managed-authorizer&lt;/LI-CODE&gt;&lt;P&gt;These are not being used by the NiFi application core because the nifi.properties is still pointing at the "single-user-authorizer" rather then the "managed-authorizer"&lt;BR /&gt;&lt;BR /&gt;Also the "Single-user-provider" can only be used with the "Single-user-authorizer", so you'll need to configure a different login identity provider like the "&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#ldap_login_identity_provider" target="_self"&gt;ldap-provider&lt;/A&gt;".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 19:15:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/371778#M241084</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-05-30T19:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/373750#M241718</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i've got time to check this behaviour! &lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here my changes, which i only made and the AzureAD was requested.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nifi@ad62a85cc576:/opt/nifi/nifi-current/conf$ diff nifi.properties nifi.properties.fresh
199c199
&amp;lt; nifi.security.user.oidc.discovery.url=https://login.microsoftonline.com/DirecotoryID/v2.0/.well-known/openid-configuration
---
&amp;gt; nifi.security.user.oidc.discovery.url=
202,203c202,203
&amp;lt; nifi.security.user.oidc.client.id=ApplicationID
&amp;lt; nifi.security.user.oidc.client.secret=ClientSecret
---
&amp;gt; nifi.security.user.oidc.client.id=
&amp;gt; nifi.security.user.oidc.client.secret=
205,207c205,207
&amp;lt; nifi.security.user.oidc.additional.scopes=profile
&amp;lt; nifi.security.user.oidc.claim.identifying.user=email
&amp;lt; nifi.security.user.oidc.fallback.claims.identifying.user=upn
---
&amp;gt; nifi.security.user.oidc.additional.scopes=offline_access
&amp;gt; nifi.security.user.oidc.claim.identifying.user=
&amp;gt; nifi.security.user.oidc.fallback.claims.identifying.user=&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;That was only my first try. I will keep everyone up to date, if i got more infos&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 09:07:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/373750#M241718</guid>
      <dc:creator>mbraunerde</dc:creator>
      <dc:date>2023-07-11T09:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi RestApi and AzureAD Login</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/373761#M241727</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97072"&gt;@mbraunerde&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;When you authenticate to NiFi, a client token is issued for your user. That token is then presented by your browser with all subsequent requests since every action performed in NiFi must be both authenticated and authorized.&amp;nbsp; &amp;nbsp;When the token expires, a new one must be obtained.&lt;BR /&gt;&lt;BR /&gt;While you have configured the OIDC properties to support authentication via an external AD, you are still using the Single-user-authorizer which allows full access to only the user created by the Single-user-provider.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I suggest you modify your nifi.properties file to use:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;nifi.security.user.authorizer=managed-authorizer&lt;/LI-CODE&gt;&lt;P&gt;This provider will utilize the the file-access-policy-provider (authorizations.xml file) for user authorizations.&lt;BR /&gt;With your configuration above it will set admin level authorizations for user:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;admin@login-domain.com&lt;/LI-CODE&gt;&lt;P&gt;This user would be then allowed to access the NiFi and manage additional user authorizations via the UI.&lt;BR /&gt;&lt;BR /&gt;As far as access to the NiFi rest-api, I'd recommend using a certificate instead of your AD.&lt;BR /&gt;1. No need to obtain a user token - Include the clientAuth certificate in all your rest-api calls.&lt;BR /&gt;2. Will work for as long as the client certificate is valid.&amp;nbsp; Certificate can be configured with long validity dates (often 2 years or more)&lt;BR /&gt;3. Token are only valid for the NiFi node on which they were issued.&amp;nbsp; meaning if you accessed a different NiFi node in a NiFi cluster or a different instance of NiFi, you would need to get a new token each time.&lt;BR /&gt;4. Using a token requires you then to store that token somewhere for reuse by your individual rest-api calls.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 13:12:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-RestApi-and-AzureAD-Login/m-p/373761#M241727</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-07-11T13:12:45Z</dc:date>
    </item>
  </channel>
</rss>

