<?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: Ranger Group autharization not working for nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/299769#M219834</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/50045"&gt;@bhara&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While ldap/AD queries are generally case insensitive by default, NiFi is not case insensitive. So user "&lt;STRONG&gt;&lt;SPAN&gt;bbhimava&lt;/SPAN&gt;&lt;/STRONG&gt;" and user "B&lt;SPAN&gt;bhimava" would be treated as two different users.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Within the nifi.properties file you can utilize identity and group mapping patterns to manipulate the case of the returned user and groups strings.&lt;/SPAN&gt;&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" rel="noopener"&gt;https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#identity-mapping-properties&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note that mapping patterns are evaluate in alphanumeric order. First pattern that matches is applied. so make sure less specific patterns like "^(.*)$" are lats to be evaluated.&lt;BR /&gt;For example:&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.dn=&amp;lt;java regex&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Above would be evaluated before:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.username=&amp;lt;java regex&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When/If a match is found, the corresponding value is applied and transform performed:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.value.dn=$1
nifi.security.identity.mapping.transform.dn=&amp;lt;NONE, LOWER, or UPPER&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Looking at your ldap-user-group-provider configuration, I see the following&amp;nbsp;needed changes:&lt;BR /&gt;1. I recommend user set the&amp;nbsp;"Page Size" property. If the number of results exceeds the ldap max default page size, not all results may be returned to NiFi. BY setting a page size, NiFi will asks for results in multiple pages instead&amp;nbsp;of one response with&amp;nbsp;all results.&amp;nbsp; Generally, defaults are either 500 or 1000, so setting a&amp;nbsp;"Page Size" of 500 is safe.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. The&amp;nbsp;"User Search Scope" and&amp;nbsp;"Group Search Scope" properties should be set to "SUBTREE" and not "sub".&lt;BR /&gt;3. The "User Group Name Attribute" property does not support a comma separated list of attributes. Suggest just setting it to "memberOf".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Without sample output from your ldap/AD for user&amp;nbsp;bbhimava and one of the groups you are trying to sync based upon, it would&amp;nbsp;be impossible for me to validate any of your other settings.&lt;BR /&gt;&lt;BR /&gt;The log line shared below:&lt;BR /&gt;&lt;/SPAN&gt;&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;o.a.n.w.a.c.AccessDeniedExceptionMapper identity[bbhimava], groups[none] does not have permission to access the requested resource. No applicable policies could be found. Returning Forbidden response.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;indicates that when NiFi looked for user "bbhimava" was looked for by the NiFi authorizer, no associated groups were returned.&amp;nbsp; Which means Ranger policies could&amp;nbsp;only be queried for policies assigned directly to "bbhimava".&lt;BR /&gt;&lt;BR /&gt;Adding the following line to your&amp;nbsp; NiFi logback.xml file will give you debug output in your nifi-app.log when the ldap-user-group-provider executes to show you exactly what users and groups were returned based upon your settings and the resulting user/group associates that were discovered.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;logger name="org.apache.nifi.ldap.tenants.LdapUserGroupProvider" level="DEBUG"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 16:23:55 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2020-07-15T16:23:55Z</dc:date>
    <item>
      <title>Ranger Group autharization not working for nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/299767#M219832</link>
      <description>&lt;P&gt;Team ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have upgraded NIFI from 1.5 to 1.11 and trying to configure ranger authorization at group level instead of user level . But its not working . Below are the properties i have given in &lt;SPAN class="form-group control-label-span col-md-3"&gt;&lt;SPAN class="ember-view"&gt;authorizers.xml&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;userGroupProvider&amp;gt;&lt;BR /&gt;&amp;lt;identifier&amp;gt;ldap-user-group-provider&amp;lt;/identifier&amp;gt;&lt;BR /&gt;&amp;lt;class&amp;gt;org.apache.nifi.ldap.tenants.LdapUserGroupProvider&amp;lt;/class&amp;gt;&lt;BR /&gt;&amp;lt;property name="Authentication Strategy"&amp;gt;LDAPS&amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;property name="Manager DN"&amp;gt;CN=xxxx,OU=Users,OU=Standard Users,OU=Users and Computers,OU=Atlanta Corporate,OU=CCI,DC=CORP,DC=COX,DC=com&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Manager Password"&amp;gt;xxxxx&amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;property name="TLS - Keystore"&amp;gt;/etc/nifi/conf/signed-keystore.jks&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Keystore Password"&amp;gt;xxx&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Keystore Type"&amp;gt;JKS&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Truststore"&amp;gt;/etc/nifi/conf/coxca-truststore.jks&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Truststore Password"&amp;gt;xxx&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Truststore Type"&amp;gt;JKS&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Client Auth"&amp;gt;WANT&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Protocol"&amp;gt;TLS&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="TLS - Shutdown Gracefully"&amp;gt;TRUE&amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;property name="Referral Strategy"&amp;gt;FOLLOW&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Connect Timeout"&amp;gt;10 secs&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Read Timeout"&amp;gt;10 secs&amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;property name="Url"&amp;gt;ldaps://xxxxx:636&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Page Size"&amp;gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Sync Interval"&amp;gt;30 mins&amp;lt;/property&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;property name="User Search Base"&amp;gt;ou=cci,dc=corp,dc=cox,dc=com&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Object Class"&amp;gt;user&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Search Scope"&amp;gt;sub&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Search Filter"&amp;gt;(|(memberof=CN=CATL0BDDEVSA,OU=groups,OU=Atlanta Corporate,OU=CCI,DC=CORP,DC=COX,DC=com)(memberof=CN=CATL0BDDEVADMINS,OU=groups,OU=Atlanta Corporate,OU=CCI,DC=CORP,DC=COX,DC=com)(memberof=CN=CATL0BDDEVDEVELOPERS,OU=groups,OU=Atlanta Corporate,OU=CCI,DC=CORP,DC=COX,DC=com))&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Identity Attribute"&amp;gt;cn&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Group Name Attribute"&amp;gt;memberof, ismemberof&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Group Name Attribute - Referenced Group Attribute"&amp;gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Search Base"&amp;gt;ou=cci,dc=corp,dc=cox,dc=com&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Object Class"&amp;gt;group&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Search Scope"&amp;gt;sub&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Search Filter"&amp;gt;(|(cn=CATL0BDDEVSA)(cn=CATL0BDDEVADMINS)(cn=CATL0BDDEVDEVELOPERS))&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Name Attribute"&amp;gt;cn&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Member Attribute"&amp;gt;member&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Group Member Attribute - Referenced User Attribute"&amp;gt;uid&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/userGroupProvider&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;authorizer&amp;gt;&lt;BR /&gt;&amp;lt;identifier&amp;gt;ranger-authorizer&amp;lt;/identifier&amp;gt;&lt;BR /&gt;&amp;lt;class&amp;gt;org.apache.nifi.ranger.authorization.ManagedRangerAuthorizer&amp;lt;/class&amp;gt;&lt;BR /&gt;&amp;lt;property name="User Group Provider"&amp;gt;ldap-user-group-provider&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Ranger Audit Config Path"&amp;gt;/usr/hdf/current/nifi/conf/ranger-nifi-audit.xml&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Ranger Security Config Path"&amp;gt;/usr/hdf/current/nifi/conf/ranger-nifi-security.xml&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Ranger Service Type"&amp;gt;nifi&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Ranger Application Id"&amp;gt;nifi&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Allow Anonymous"&amp;gt;true&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Ranger Admin Identity"&amp;gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;property name="Ranger Kerberos Enabled"&amp;gt;false&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;lt;/authorizer&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i add AD group in ranger for access i get this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2020-07-13 17:13:33,737 INFO [NiFi Web Server-31] o.a.n.w.a.c.AccessDeniedExceptionMapper identity[bbhimava], groups[none] does not have permission to access the requested resource. No applicable policies could be found. Returning Forbidden response.&lt;BR /&gt;2020-07-13 17:13:45,698 INFO [NiFi Web Server-41] o.a.n.w.s.NiFiAuthenticationFilter Attempting request for (CN=xxxx, OU=NIFI) GET https://xxxxxx/nifi-api/site-to-site (source ip: 10.220.3.176)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;requesting your help .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 14:50:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/299767#M219832</guid>
      <dc:creator>bhara</dc:creator>
      <dc:date>2020-07-15T14:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger Group autharization not working for nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/299769#M219834</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/50045"&gt;@bhara&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While ldap/AD queries are generally case insensitive by default, NiFi is not case insensitive. So user "&lt;STRONG&gt;&lt;SPAN&gt;bbhimava&lt;/SPAN&gt;&lt;/STRONG&gt;" and user "B&lt;SPAN&gt;bhimava" would be treated as two different users.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Within the nifi.properties file you can utilize identity and group mapping patterns to manipulate the case of the returned user and groups strings.&lt;/SPAN&gt;&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" rel="noopener"&gt;https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#identity-mapping-properties&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note that mapping patterns are evaluate in alphanumeric order. First pattern that matches is applied. so make sure less specific patterns like "^(.*)$" are lats to be evaluated.&lt;BR /&gt;For example:&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.dn=&amp;lt;java regex&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Above would be evaluated before:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.pattern.username=&amp;lt;java regex&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When/If a match is found, the corresponding value is applied and transform performed:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;nifi.security.identity.mapping.value.dn=$1
nifi.security.identity.mapping.transform.dn=&amp;lt;NONE, LOWER, or UPPER&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Looking at your ldap-user-group-provider configuration, I see the following&amp;nbsp;needed changes:&lt;BR /&gt;1. I recommend user set the&amp;nbsp;"Page Size" property. If the number of results exceeds the ldap max default page size, not all results may be returned to NiFi. BY setting a page size, NiFi will asks for results in multiple pages instead&amp;nbsp;of one response with&amp;nbsp;all results.&amp;nbsp; Generally, defaults are either 500 or 1000, so setting a&amp;nbsp;"Page Size" of 500 is safe.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. The&amp;nbsp;"User Search Scope" and&amp;nbsp;"Group Search Scope" properties should be set to "SUBTREE" and not "sub".&lt;BR /&gt;3. The "User Group Name Attribute" property does not support a comma separated list of attributes. Suggest just setting it to "memberOf".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Without sample output from your ldap/AD for user&amp;nbsp;bbhimava and one of the groups you are trying to sync based upon, it would&amp;nbsp;be impossible for me to validate any of your other settings.&lt;BR /&gt;&lt;BR /&gt;The log line shared below:&lt;BR /&gt;&lt;/SPAN&gt;&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;o.a.n.w.a.c.AccessDeniedExceptionMapper identity[bbhimava], groups[none] does not have permission to access the requested resource. No applicable policies could be found. Returning Forbidden response.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;indicates that when NiFi looked for user "bbhimava" was looked for by the NiFi authorizer, no associated groups were returned.&amp;nbsp; Which means Ranger policies could&amp;nbsp;only be queried for policies assigned directly to "bbhimava".&lt;BR /&gt;&lt;BR /&gt;Adding the following line to your&amp;nbsp; NiFi logback.xml file will give you debug output in your nifi-app.log when the ldap-user-group-provider executes to show you exactly what users and groups were returned based upon your settings and the resulting user/group associates that were discovered.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;logger name="org.apache.nifi.ldap.tenants.LdapUserGroupProvider" level="DEBUG"/&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 16:23:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/299769#M219834</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2020-07-15T16:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Ranger Group autharization not working for nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/300323#M220151</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp; Thank you Sir .It worked perfectly .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bharad&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 12:23:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ranger-Group-autharization-not-working-for-nifi/m-p/300323#M220151</guid>
      <dc:creator>bhara</dc:creator>
      <dc:date>2020-07-23T12:23:47Z</dc:date>
    </item>
  </channel>
</rss>

