<?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 How to use Ranger to authorize access for Nifi with OpenLDAP backend and Identity mapping in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159812#M122201</link>
    <description>&lt;P&gt;I have a test environment with OpenLDAP and MIT KDC as backend directory services. I tried to use it to test Nifi authorization through Ranger and running into an issue where the user name seems to not matching correctly.&lt;/P&gt;&lt;P&gt;Here is my setup&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;HDF 2.1.1.0, Nifi 1.1.0 and Ranger 0.6.2&lt;/LI&gt;&lt;LI&gt;Cluster installed with all HDF components except Storm and kafka&lt;/LI&gt;&lt;LI&gt;Cluster Kerberized with MIT KDC&lt;/LI&gt;&lt;LI&gt;Credentials in OpenLDAP&lt;/LI&gt;&lt;LI&gt;Ranger sync with OpenLDAP&lt;/LI&gt;&lt;LI&gt;Ranger Nifi policy created for a user with all permissions.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12089-screen-shot-2017-02-03-at-122526-pm.png" style="width: 2384px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20748iB4667D79E9D08567/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12089-screen-shot-2017-02-03-at-122526-pm.png" alt="12089-screen-shot-2017-02-03-at-122526-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I could get to Nifi login page and login with the credentials from OpenLDAP, but then it complains about not have enough access&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12090-screen-shot-2017-02-03-at-122648-pm.png" style="width: 651px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20749iF230A6890579CB9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12090-screen-shot-2017-02-03-at-122648-pm.png" alt="12090-screen-shot-2017-02-03-at-122648-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looking at the audit log, the user name get logged in Ranger is hadoopadmin@FIELD.HORTONWORKS.COM rather than hadoopadmin, it seems the KDC principal name get used here&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12121-screen-shot-2017-02-03-at-122538-pm.png" style="width: 2453px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20750iEEF28A479F23C189/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12121-screen-shot-2017-02-03-at-122538-pm.png" alt="12121-screen-shot-2017-02-03-at-122538-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I haven't setup identity mapping and the values are empty now. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12122-screen-shot-2017-02-03-at-123046-pm.png" style="width: 1041px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20751iB3885624D13ED4FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12122-screen-shot-2017-02-03-at-123046-pm.png" alt="12122-screen-shot-2017-02-03-at-123046-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What values should I use to get the username mapped correctly?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Sun, 18 Aug 2019 12:02:51 GMT</pubDate>
    <dc:creator>qiwang</dc:creator>
    <dc:date>2019-08-18T12:02:51Z</dc:date>
    <item>
      <title>How to use Ranger to authorize access for Nifi with OpenLDAP backend and Identity mapping</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159812#M122201</link>
      <description>&lt;P&gt;I have a test environment with OpenLDAP and MIT KDC as backend directory services. I tried to use it to test Nifi authorization through Ranger and running into an issue where the user name seems to not matching correctly.&lt;/P&gt;&lt;P&gt;Here is my setup&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;HDF 2.1.1.0, Nifi 1.1.0 and Ranger 0.6.2&lt;/LI&gt;&lt;LI&gt;Cluster installed with all HDF components except Storm and kafka&lt;/LI&gt;&lt;LI&gt;Cluster Kerberized with MIT KDC&lt;/LI&gt;&lt;LI&gt;Credentials in OpenLDAP&lt;/LI&gt;&lt;LI&gt;Ranger sync with OpenLDAP&lt;/LI&gt;&lt;LI&gt;Ranger Nifi policy created for a user with all permissions.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12089-screen-shot-2017-02-03-at-122526-pm.png" style="width: 2384px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20748iB4667D79E9D08567/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12089-screen-shot-2017-02-03-at-122526-pm.png" alt="12089-screen-shot-2017-02-03-at-122526-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I could get to Nifi login page and login with the credentials from OpenLDAP, but then it complains about not have enough access&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12090-screen-shot-2017-02-03-at-122648-pm.png" style="width: 651px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20749iF230A6890579CB9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12090-screen-shot-2017-02-03-at-122648-pm.png" alt="12090-screen-shot-2017-02-03-at-122648-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looking at the audit log, the user name get logged in Ranger is hadoopadmin@FIELD.HORTONWORKS.COM rather than hadoopadmin, it seems the KDC principal name get used here&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12121-screen-shot-2017-02-03-at-122538-pm.png" style="width: 2453px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20750iEEF28A479F23C189/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12121-screen-shot-2017-02-03-at-122538-pm.png" alt="12121-screen-shot-2017-02-03-at-122538-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I haven't setup identity mapping and the values are empty now. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12122-screen-shot-2017-02-03-at-123046-pm.png" style="width: 1041px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20751iB3885624D13ED4FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="12122-screen-shot-2017-02-03-at-123046-pm.png" alt="12122-screen-shot-2017-02-03-at-123046-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;What values should I use to get the username mapped correctly?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 12:02:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159812#M122201</guid>
      <dc:creator>qiwang</dc:creator>
      <dc:date>2019-08-18T12:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Ranger to authorize access for Nifi with OpenLDAP backend and Identity mapping</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159813#M122202</link>
      <description>&lt;P&gt;The identity mappings in NiFi use regular expressions with capture groups, so you could do:&lt;/P&gt;&lt;P&gt;nifi.security.identity.mapping.pattern.kerb=^(.*?)@(.*?)$ &lt;/P&gt;&lt;P&gt;nifi.security.identity.mapping.value.kerb=$1&lt;/P&gt;&lt;P&gt;That pattern should match &lt;A href="mailto:hadoopadmin@FIELD.HORTONWORKS.COM"&gt;hadoopadmin@FIELD.HORTONWORKS.COM&lt;/A&gt; where group 1 would be hadoopadmin and group 2 would be FIELD.HORTONWORKS.COM.&lt;/P&gt;&lt;P&gt;Then the value property says use group 1 as the actual identity.&lt;/P&gt;&lt;P&gt;The NiFi admin guide has a description:&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#identity-mapping-properties" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#identity-mapping-properties&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 01:42:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159813#M122202</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2017-02-04T01:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Ranger to authorize access for Nifi with OpenLDAP backend and Identity mapping</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159814#M122203</link>
      <description>&lt;P&gt;You can use the following for the Kerberos identity mapping, if you want the principal to be mapped to just the shortname:&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.kerb = ^(.*?)@(.*?)$
nifi.security.identity.mapping.value.kerb = $1&lt;/PRE&gt;&lt;P&gt;See &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDF2/HDF-2.0.0/bk_administration/content/identity-mapping-properties.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDF2/HDF-2.0.0/bk_administration/content/identity-mapping-properties.html&lt;/A&gt; and &lt;A href="https://community.hortonworks.com/articles/61729/nifi-identity-conversion.html" target="_blank"&gt;https://community.hortonworks.com/articles/61729/nifi-identity-conversion.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 01:53:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159814#M122203</guid>
      <dc:creator>slachterman</dc:creator>
      <dc:date>2017-02-04T01:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Ranger to authorize access for Nifi with OpenLDAP backend and Identity mapping</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159815#M122204</link>
      <description>&lt;P&gt;So here are the values that work in my environment&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.dn=^CN=(.*?), OU=(.*?)$
nifi.security.identity.mapping.pattern.kerb=^(.*?)@(.*?)$
nifi.security.identity.mapping.value.dn=$1
nifi.security.identity.mapping.value.kerb=$1
&lt;/PRE&gt;&lt;P&gt;Also in Ranger the Nifi nodes need to be added as internal user and create policy for them to access proxy, flow and data&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2017 02:53:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-use-Ranger-to-authorize-access-for-Nifi-with-OpenLDAP/m-p/159815#M122204</guid>
      <dc:creator>qiwang</dc:creator>
      <dc:date>2017-02-04T02:53:18Z</dc:date>
    </item>
  </channel>
</rss>

