<?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 AuthorizerCreationException: Unable to locate initial admin to seed policies in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231069#M67526</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11929/alvinuw.html" nodeid="11929"&gt;@Alvin Jin&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;That authorizers.xml file looks a little off.&lt;/P&gt;&lt;P&gt;This is what it should look like:&lt;/P&gt;&lt;PRE&gt;&amp;lt;authorizers&amp;gt;
   &amp;lt;authorizer&amp;gt;
        &amp;lt;identifier&amp;gt;file-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.FileAuthorizer&amp;lt;/class&amp;gt;
        &amp;lt;property name="Authorizations File"&amp;gt;./conf/authorizations.xml&amp;lt;/property&amp;gt;
        &amp;lt;property name="Users File"&amp;gt;./conf/users.xml&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial Admin Identity"&amp;gt;CN=nifiadmin, OU= NIFI.COM&amp;lt;/property&amp;gt;
        &amp;lt;property name="Legacy Authorized Users File"&amp;gt;&amp;lt;/property&amp;gt;


        &amp;lt;!-- Provide the identity (typically a DN) of each node when clustered, see above description of Node Identity. --&amp;gt;
        &amp;lt;property name="Node Identity 1"&amp;gt;CN=nifi-0, OU=NIFI.COM&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;CN=nifi-1, OU=NIFI.COM&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;CN=nifi-2, OU=NIFI.COM&amp;lt;/property&amp;gt;
    &amp;lt;/authorizer&amp;gt;
&amp;lt;/authorizers&amp;gt;
&lt;/PRE&gt;&lt;P&gt;You will have to remove the current users.xml and authorizations.xml file so NiFi will recreate them on restart.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2017 03:55:15 GMT</pubDate>
    <dc:creator>Wynner</dc:creator>
    <dc:date>2017-09-01T03:55:15Z</dc:date>
    <item>
      <title>NiFi AuthorizerCreationException: Unable to locate initial admin to seed policies</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231068#M67525</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;When I secure a three nodes nifi cluster, I got below errors during start up.&lt;/P&gt;&lt;P&gt;I use TLS tool to create certificates, and use client-certificate for authentication.&lt;/P&gt;&lt;P&gt;The setting in my &lt;STRONG&gt;authorizers.xml&lt;/STRONG&gt; is below:&lt;/P&gt;&lt;P&gt;&amp;lt;accessPolicyProvider&amp;gt; &lt;/P&gt;&lt;P&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; &lt;/P&gt;&lt;P&gt;        &amp;lt;property name="User Group Provider"&amp;gt;file-user-group-provider&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt;        &amp;lt;property name="Authorizations File"&amp;gt;./conf/authorizations.xml&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt;        &amp;lt;property name="Initial Admin Identity"&amp;gt;CN=nifiadmin, OU=NIFI.COM&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt;        &amp;lt;property name="Legacy Authorized Users File"&amp;gt;&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt;        &amp;lt;property name="Node Identity 1"&amp;gt;CN=nifi-0, OU=NIFI.COM&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;property name="Node Identity 2"&amp;gt;CN=nifi-1, OU=NIFI.COM&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;property name="Node Identity 3"&amp;gt;CN=nifi-2, OU=NIFI.COM&amp;lt;/property&amp;gt; &lt;/P&gt;&lt;P&gt; &amp;lt;/accessPolicyProvider&amp;gt;&lt;/P&gt;&lt;P&gt;From nifi-user.log ouput, it seems NiFi can locate the DN set in authorizers.xml.&lt;/P&gt;&lt;P&gt;However, I don't understand why nifi-bootstrap.log says NiFi can't initial admin. &lt;/P&gt;&lt;P&gt;Are users.xml and authorizations.xml auto-created and populated by NiFi?&lt;/P&gt;&lt;P&gt;After checking, it seems "Initial Admin Identity" user and administrative policies are NOT added to the &lt;EM&gt;users.xml&lt;/EM&gt; and &lt;EM&gt;authorizations.xml&lt;/EM&gt; files.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ cat nifi-user.log&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2017-08-31 18:54:28,424 INFO [main] o.a.n.a.FileUserGroupProvider Creating new users file at /opt/nifi/nifi-1.4.0-SNAPSHOT/./conf/users.xml &lt;/P&gt;&lt;P&gt;2017-08-31 18:54:28,453 INFO [main] o.a.n.a.FileUserGroupProvider Users/Groups file loaded at Thu Aug 31 18:54:28 UTC 2017 &lt;/P&gt;&lt;P&gt;2017-08-31 18:54:28,458 INFO [main] o.a.n.a.FileAccessPolicyProvider Creating new authorizations file at /opt/nifi/nifi-1.4.0-SNAPSHOT/./conf/authorizations.xml &lt;/P&gt;&lt;P&gt;2017-08-31 18:54:28,475 WARN [main] org.apache.nifi.authorization.FlowParser Flow Configuration does not exist or was empty &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2017-08-31 18:54:28,475 INFO [main] o.a.n.a.FileAccessPolicyProvider Populating authorizations for Initial Admin: CN=nifiadmin, OU=NIFI.COM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ cat nifi-bootstrap.log&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2017-08-31 18:54:13,151 INFO [NiFi Bootstrap Command Listener] org.apache.nifi.bootstrap.RunNiFi Apache NiFi now running and listening for Bootstrap requests on port 41600 &lt;/P&gt;&lt;P&gt;2017-08-31 18:54:29,443 ERROR [NiFi logging handler] org.apache.nifi.StdErr Failed to start web server: Error creating bean with name 'niFiWebApiSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: &lt;/P&gt;&lt;P&gt;Could not autowire method: public void org.apache.nifi.web.NiFiWebApiSecurityConfiguration.setJwtAuthenticationProvider(org.apache.nifi.web.security.jwt.JwtAuthenticationProvider); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jwtAuthenticationProvider' defined in class path resource [nifi-web-security-context.xml]: &lt;/P&gt;&lt;P&gt;Cannot resolve reference to bean 'authorizer' while setting constructor argument; nested exception is 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: &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;org.apache.nifi.authorization.exception.AuthorizerCreationException: Unable to locate initial admin CN=nifiadmin, OU=NIFI.COM to seed policies &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2017-08-31 18:54:29,444 ERROR [NiFi logging handler] org.apache.nifi.StdErr Shutting down...&lt;/P&gt;&lt;P&gt;
2017-08-31 18:54:30,576 INFO [main] org.apache.nifi.bootstrap.RunNiFi NiFi never started. Will not restart NiFi&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 02:52:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231068#M67525</guid>
      <dc:creator>alvinuw</dc:creator>
      <dc:date>2017-09-01T02:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi AuthorizerCreationException: Unable to locate initial admin to seed policies</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231069#M67526</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11929/alvinuw.html" nodeid="11929"&gt;@Alvin Jin&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;That authorizers.xml file looks a little off.&lt;/P&gt;&lt;P&gt;This is what it should look like:&lt;/P&gt;&lt;PRE&gt;&amp;lt;authorizers&amp;gt;
   &amp;lt;authorizer&amp;gt;
        &amp;lt;identifier&amp;gt;file-provider&amp;lt;/identifier&amp;gt;
        &amp;lt;class&amp;gt;org.apache.nifi.authorization.FileAuthorizer&amp;lt;/class&amp;gt;
        &amp;lt;property name="Authorizations File"&amp;gt;./conf/authorizations.xml&amp;lt;/property&amp;gt;
        &amp;lt;property name="Users File"&amp;gt;./conf/users.xml&amp;lt;/property&amp;gt;
        &amp;lt;property name="Initial Admin Identity"&amp;gt;CN=nifiadmin, OU= NIFI.COM&amp;lt;/property&amp;gt;
        &amp;lt;property name="Legacy Authorized Users File"&amp;gt;&amp;lt;/property&amp;gt;


        &amp;lt;!-- Provide the identity (typically a DN) of each node when clustered, see above description of Node Identity. --&amp;gt;
        &amp;lt;property name="Node Identity 1"&amp;gt;CN=nifi-0, OU=NIFI.COM&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;CN=nifi-1, OU=NIFI.COM&amp;lt;/property&amp;gt;
        &amp;lt;property name="Node Identity 2"&amp;gt;CN=nifi-2, OU=NIFI.COM&amp;lt;/property&amp;gt;
    &amp;lt;/authorizer&amp;gt;
&amp;lt;/authorizers&amp;gt;
&lt;/PRE&gt;&lt;P&gt;You will have to remove the current users.xml and authorizations.xml file so NiFi will recreate them on restart.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 03:55:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231069#M67526</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-09-01T03:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi AuthorizerCreationException: Unable to locate initial admin to seed policies</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231070#M67527</link>
      <description>&lt;P&gt;
	Hi &lt;A rel="user" href="https://community.cloudera.com/users/286/dwynne.html" nodeid="286"&gt;@Wynner&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;
	Thanks for your comments. You are right, it's the authorizers.xml format issue.&lt;/P&gt;&lt;P&gt;
	Actually, I am using nifi-1.4-snapshot. That's why my authorizers.xml is different from the 1.3 one.&lt;/P&gt;&lt;P&gt;
	When I switched to the 1.3 version authorizers.xml with nifi-1.4-snapshot, the above issue was gone.This confuses me.&lt;/P&gt;&lt;P&gt;
	Then, when I have below in authorizers.xml file&lt;/P&gt;&lt;P&gt;&amp;lt;propertyname="Node Identity 1"&amp;gt;CN=nifi-0, OU= NIFI.COM&amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;I saw errors from nifi-app.log, it seems the default OU of node identity is "NIFI".&lt;/P&gt;&lt;P&gt;
	2017-09-01 14:09:08,854 DEBUG [NiFi Web Server-19] o.a.n.w.a.c.IllegalStateExceptionMapper
java.lang.IllegalStateException: Kerberos ticket login not supported by this NiFi.
        at org.apache.nifi.web.api.AccessResource.createAccessTokenFromTicket(AccessResource.java:349)&lt;/P&gt;&lt;P&gt;
	2017-09-01 14:09:09,045 INFO [NiFi Web Server-127] o.a.n.w.s.NiFiAuthenticationFilter Attempting request for (&amp;lt;CN=nifiadmin, OU=NIFI.COM&amp;gt;&amp;lt;CN=nifi-0, OU=NIFI&amp;gt;) GET &lt;A href="https://nifi-0:9443/nifi-api/flow/current-user" target="_blank"&gt;https://nifi-0:9443/nifi-api/flow/current-user&lt;/A&gt; (source ip: 10.244.1.95)
2017-09-01 14:09:09,048 WARN [NiFi Web Server-127] o.a.n.w.s.NiFiAuthenticationFilter Rejecting access to web api: Untrusted proxy CN=nifi-0, OU=NIFI&lt;/P&gt;&lt;P&gt;
	2017-09-01 14:09:09,048 WARN [NiFi Web Server-127] o.a.n.w.s.NiFiAuthenticationFilter Rejecting access to web api: Untrusted proxy CN=nifi-0, OU=NIFI&lt;/P&gt;&lt;P&gt;But whenIf I set it as "CN=nifi-0, OU= NIFI" in above file, it works.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2017 21:56:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231070#M67527</guid>
      <dc:creator>alvinuw</dc:creator>
      <dc:date>2017-09-01T21:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi AuthorizerCreationException: Unable to locate initial admin to seed policies</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231071#M67528</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11929/alvinuw.html" nodeid="11929"&gt;@Alvin Jin&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Remove the space between "OU =NIFI" so it looks like "OU=NIFI".&lt;/P&gt;&lt;P&gt;Also, don't forget to remove the old users.xml and authorizations.xml files before restarting NiFi.&lt;/P&gt;&lt;P&gt;You should stick with released versions, instead of using the snapshot version.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Sep 2017 00:17:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-AuthorizerCreationException-Unable-to-locate-initial/m-p/231071#M67528</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-09-02T00:17:55Z</dc:date>
    </item>
  </channel>
</rss>

