NiFi Authentication with LDAP Groups
Hello,
I have setup NiFI 2.1.0, and am trying to figure out how to allow users in a NiFi Microsoft AD Group to authenticate to the GUI. I have it setup so users can log in if I add their LDAP account. But, I'd rather just have users in the group I created in AD be able to login instead of having to go in and add new users to NiFi each time.
Here are the configs I have setup for my authorizers.xml:
<userGroupProvider>
<identifier>file-user-group-provider</identifier>
<class>org.apache.nifi.authorization.FileUserGroupProvider</class>
<property name="Users File">./conf/users.xml</property>
<property name="Initial User Identity 1">ldapuser</property>
</userGroupProvider>
<userGroupProvider>
<identifier>ldap-user-group-provider</identifier>
<class>org.apache.nifi.ldap.tenants.LdapUserGroupProvider</class>
<property name="Authentication Strategy">LDAPS</property>
<property name="Manager DN">CN=NiFiUser,OU=Accounts,DC=my,DC=network,DC=com</property>
<property name="Manager Password">PasswordHere</property>
<property name="TLS - Keystore">./conf/keystore.p12</property>
<property name="TLS - Keystore Password">KSPasswordHere</property>
<property name="TLS - Keystore Type">PKCS12</property>
<property name="TLS - Truststore">./conf/truststore.p12</property>
<property name="TLS - Truststore Password">TSPasswordHere</property>
<property name="TLS - Truststore Type">PKCS12</property>
<property name="TLS - Client Auth">REQUIRED</property>
<property name="TLS - Protocol">TLSv1.2</property>
<property name="TLS - Shutdown Gracefully"></property>
<property name="Referral Strategy">FOLLOW</property>
<property name="Connect Timeout">10 secs</property>
<property name="Read Timeout">10 secs</property>
<property name="Url">ldaps://ldapserver.my.network.com:636</property>
<property name="Page Size"></property>
<property name="Sync Interval">30 mins</property>
<property name="Group Membership - Enforce Case Sensitivity">false</property>
<property name="User Search Base">DC=my,DC=network,DC=com</property>
<property name="User Object Class">person</property>
<property name="User Search Scope">SUBTREE</property>
<property name="User Search Filter"></property>
<property name="User Identity Attribute">sAMAccountName</property>
<property name="User Group Name Attribute"></property>
<property name="User Group Name Attribute - Referenced Group Attribute"></property>
<property name="Group Search Base">OU=Groups,DC=my,DC=network,DC=com</property>
<property name="Group Object Class">group</property>
<property name="Group Search Scope">SUBTREE</property>
<property name="Group Search Filter"></property>
<property name="Group Name Attribute">sAMAccountName</property>
<property name="Group Member Attribute">member</property>
<property name="Group Member Attribute - Referenced User Attribute"></property>
</userGroupProvider>
<accessPolicyProvider>
<identifier>file-access-policy-provider</identifier>
<class>org.apache.nifi.authorization.FileAccessPolicyProvider</class>
<property name="User Group Provider">file-user-group-provider</property>
<property name="Authorizations File">./conf/authorizations.xml</property>
<property name="Initial Admin Identity">ldapuser</property>
<property name="Node Identity 1"></property>
<property name="Node Group"></property>
</accessPolicyProvider>
<authorizer>
<identifier>managed-authorizer</identifier>
<class>org.apache.nifi.authorization.StandardManagedAuthorizer</class>
<property name="Access Policy Provider">file-access-policy-provider</property>
</authorizer>I've also tried it with setting the "Group Member Attribute" to 'cn' with the same result.
Here is my login-identity-providers.xml as well:
<provider>
<identifier>ldap-provider</identifier>
<class>org.apache.nifi.ldap.LdapProvider</class>
<property name="Authentication Strategy">LDAPS</property>
<property name="Manager DN">CN=NiFiUser,OU=Accounts,DC=my,DC=network,DC=com</property>
<property name="Manager Password">PasswordHere</property>
<property name="TLS - Keystore">./conf/keystore.p12</property>
<property name="TLS - Keystore Password">KSPasswordHere</property>
<property name="TLS - Keystore Type">PKCS12</property>
<property name="TLS - Truststore">./conf/truststore.p12</property>
<property name="TLS - Truststore Password">TSPasswordHere</property>
<property name="TLS - Truststore Type">PKCS12</property>
<property name="TLS - Client Auth">REQUIRED</property>
<property name="TLS - Protocol">TLSv1.2</property>
<property name="TLS - Shutdown Gracefully"></property>
<property name="Referral Strategy">FOLLOW</property>
<property name="Connect Timeout">10 secs</property>
<property name="Read Timeout">10 secs</property>
<property name="Url">ldaps://ldapserver.my.network.com:636</property>
<property name="User Search Base">DC=my,DC=network,DC=com</property>
<property name="User Search Filter">sAMAccountName={0}</property>
<property name="Identity Strategy">USE_USERNAME</property>
<property name="Authentication Expiration">12 hours</property>
</provider>After I configure these I am not really sure what else I would need to do as the documentation doesn't provide much instruction on what to expect after configuring these. Are the AD groups supposed to be automatically added to NiFi? Or do I need to add the group to NiFi manually? I tried manually adding to just to see but the account I was using to test still couldn't login.
Thanks in advance for helping!

