<?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: LDAP authorization issue with NiFi cluster in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221753#M183627</link>
    <description>&lt;P&gt;Thank you very much &lt;A href="https://community.hortonworks.com/questions/174063/ldap-authorization-issue-with-nifi-cluster.html#"&gt;@Bryan Bende&lt;/A&gt; for your valuable inputs. I finally got it working by following your suggestion. Here is my working &lt;STRONG&gt;authorizers.xml&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;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;CN=node1-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial User Identity 2"&amp;gt;CN=node2-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial User Identity 3"&amp;gt;cn=admin,ou=users,dc=nifi,dc=ldap,dc=jp&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;file-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;cn=admin,ou=users,dc=nifi,dc=ldap,dc=jp&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;CN=node1-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;CN=node2-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 3"&amp;gt;cn=admin,ou=users,dc=nifi,dc=ldap,dc=jp&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;/authorizers&amp;gt;&lt;/PRE&gt;&lt;P&gt;Apart from the above changes, I have modified identity mapping pattern in &lt;STRONG&gt;nifi.properties&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.dn=^cn=(.*?),ou=(.*?),dc=(.*?),dc=(.*?),dc=(.*?)$
nifi.security.identity.mapping.value.dn=$1&lt;/PRE&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2018 11:06:02 GMT</pubDate>
    <dc:creator>dilnafathimath8</dc:creator>
    <dc:date>2018-02-22T11:06:02Z</dc:date>
    <item>
      <title>LDAP authorization issue with NiFi cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221751#M183625</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62464-ldap.png" style="width: 1898px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15764i4117C2AF8518B777/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62464-ldap.png" alt="62464-ldap.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;
 &lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;
 
&lt;LI&gt;&lt;B&gt;&lt;/B&gt;2 Node NiFi cluster running NiFi 1.5.0&lt;/LI&gt; 
&lt;LI&gt;Basic LDAP server for user authentication.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;
 &lt;STRONG&gt;Issue background:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;
 I am trying to secure NiFi using LDAP authentication. I have used `tls-toolkit` to generate security.keystore and `security.truststore` files and configured `nifi.properties` in both the nodes to access NiFi UI using HTTPS:&lt;/P&gt;
&lt;PRE&gt;# tls-toolkit.sh standalone -n 'node[1-2]-nifi.jp.local' -C 'CN=admin,OU=NIFI'
&lt;/PRE&gt;&lt;P&gt;
 I also configured 'login-identity-providers.xml' and 'authorizers.xml' but NiFi is not getting started due to LDAP configuration issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error message:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizer': FactoryBean threw exception on object creation; nested exception is org.apache.nifi.authorization.exception.AuthorizerCreationException: org.apache.nifi.authorization.exception.AuthorizerCreationException: Unable to locate initial admin CN=admin,OU=NIFI to seed policies

        ... 95 common frames omitted
Caused by: org.apache.nifi.authorization.exception.AuthorizerCreationException: Unable to locate initial admin CN=admin,OU=NIFI to seed policies&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;login-identity-providers.xml:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;loginIdentityProviders&amp;gt; &amp;lt;provider&amp;gt;
        &amp;lt;identifier&amp;gt;ldap-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.ldap.LdapProvider&amp;lt;/class&amp;gt;
        &amp;lt;property name="Authentication Strategy"&amp;gt;SIMPLE&amp;lt;/property&amp;gt;


        &amp;lt;property name="Manager DN"&amp;gt;cn=admin,dc=nifi,dc=ldap,dc=jp&amp;lt;/property&amp;gt;
        &amp;lt;property name="Manager Password"&amp;gt;secret&amp;lt;/property&amp;gt;


        &amp;lt;property name="TLS - Keystore"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Keystore Password"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Keystore Type"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Truststore"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Truststore Password"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Truststore Type"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Client Auth"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Protocol"&amp;gt;&amp;lt;/property&amp;gt;
        &amp;lt;property name="TLS - Shutdown Gracefully"&amp;gt;&amp;lt;/property&amp;gt;


        &amp;lt;property name="Referral Strategy"&amp;gt;FOLLOW&amp;lt;/property&amp;gt;
        &amp;lt;property name="Connect Timeout"&amp;gt;10 secs&amp;lt;/property&amp;gt;
        &amp;lt;property name="Read Timeout"&amp;gt;10 secs&amp;lt;/property&amp;gt;


        &amp;lt;property name="Url"&amp;gt;ldap://192.168.2.1:389&amp;lt;/property&amp;gt;
        &amp;lt;property name="User Search Base"&amp;gt;ou=users,dc=nifi,dc=ldap,dc=jp&amp;lt;/property&amp;gt;
        &amp;lt;property name="User Search Filter"&amp;gt;uid={0}&amp;lt;/property&amp;gt;


        &amp;lt;property name="Identity Strategy"&amp;gt;USE_DN&amp;lt;/property&amp;gt;
        &amp;lt;property name="Authentication Expiration"&amp;gt;12 hours&amp;lt;/property&amp;gt;
    &amp;lt;/provider&amp;gt;&amp;lt;/loginIdentityProviders&amp;gt;
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;authorizers.xml&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;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;cn=node1-nifi.jp.local,ou=users,dc=nifi,dc=ldap,dc=jp&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial User Identity 2"&amp;gt;cn=node2-nifi.jp.local,ou=users,dc=nifi,dc=ldap,dc=jp&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;file-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;CN=admin,OU=NIFI&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;cn=node1-nifi.jp.local,ou=users,dc=nifi,dc=ldap,dc=jp&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;cn=node2-nifi.jp.local,ou=users,dc=nifi,dc=ldap,dc=jp&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;/authorizers&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;nifi.properties (security settings)&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.keystore=./conf/keystore.jks
nifi.security.keystoreType=jks
nifi.security.keystorePasswd=xx
nifi.security.keyPasswd=xx
nifi.security.truststore=./conf/truststore.jks
nifi.security.truststoreType=jks
nifi.security.truststorePasswd=xxx
nifi.security.needClientAuth=
nifi.security.user.authorizer=managed-authorizer
nifi.security.user.login.identity.provider=ldap-provider
nifi.security.ocsp.responder.url=
nifi.security.ocsp.responder.certificate=
&lt;/PRE&gt;&lt;P&gt;Refer attachment for LDAP configuration. I checked &lt;A href="https://community.hortonworks.com/questions/131557/nifi-authorizercreationexception-unable-to-locate.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/131557/nifi-authorizercreationexception-unable-to-locate.html&lt;/A&gt; but it didn't worked. Please guide me to secure my NiFi cluster using LDAP authentication.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 02:14:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221751#M183625</guid>
      <dc:creator>dilnafathimath8</dc:creator>
      <dc:date>2019-08-18T02:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP authorization issue with NiFi cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221752#M183626</link>
      <description>&lt;P&gt;In authorizers.xml you have "Initial User Identity 1" and "Initial User Identity 2" for your two node identities, you need to add another one for your initial admin.&lt;/P&gt;&lt;P&gt;You may need to delete users.xml and authorizations.xml before trying again, in case they are already created in a bad state.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2018 21:31:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221752#M183626</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2018-02-21T21:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: LDAP authorization issue with NiFi cluster</title>
      <link>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221753#M183627</link>
      <description>&lt;P&gt;Thank you very much &lt;A href="https://community.hortonworks.com/questions/174063/ldap-authorization-issue-with-nifi-cluster.html#"&gt;@Bryan Bende&lt;/A&gt; for your valuable inputs. I finally got it working by following your suggestion. Here is my working &lt;STRONG&gt;authorizers.xml&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&amp;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;CN=node1-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial User Identity 2"&amp;gt;CN=node2-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial User Identity 3"&amp;gt;cn=admin,ou=users,dc=nifi,dc=ldap,dc=jp&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;file-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;cn=admin,ou=users,dc=nifi,dc=ldap,dc=jp&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;CN=node1-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;CN=node2-nifi.jp.local, OU=NIFI&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 3"&amp;gt;cn=admin,ou=users,dc=nifi,dc=ldap,dc=jp&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;/authorizers&amp;gt;&lt;/PRE&gt;&lt;P&gt;Apart from the above changes, I have modified identity mapping pattern in &lt;STRONG&gt;nifi.properties&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.dn=^cn=(.*?),ou=(.*?),dc=(.*?),dc=(.*?),dc=(.*?)$
nifi.security.identity.mapping.value.dn=$1&lt;/PRE&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 11:06:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/LDAP-authorization-issue-with-NiFi-cluster/m-p/221753#M183627</guid>
      <dc:creator>dilnafathimath8</dc:creator>
      <dc:date>2018-02-22T11:06:02Z</dc:date>
    </item>
  </channel>
</rss>

