Created 05-21-2025 03:40 AM
Hello,
I have a 3-node NiFi cluster, and I want to manage it using NiFi Registry. I configured both NiFi and NiFi Registry with a single certificate using the TLS Toolkit. I also set up LDAP integration. I can successfully connect to both NiFi and NiFi Registry individually using my LDAP users.
However, the LDAP user that I added and authorized in the Registry does not appear in NiFi. With the certificate user, I can view the bucket in NiFi Registry from NiFi and perform flow version control. But I cannot do this with my LDAP user.
NOTE: Even if I generate separate certificates for NiFi and NiFi Registry and trust each certificate independently, the certificate user does not have permission to view the bucket. This is because the certificate user from the Registry is also not created in NiFi. For this reason, I generated both from the same certificate.
Nifi / Nifi Registry version: 1.28.1
Nifi Registry nifi-registry.properties
# Licensed to the Apache Software Foundation (ASF) under one or more # web properties # # security properties # # sensitive property protection properties # # providers properties # # registry alias properties # # extensions working dir # # legacy database properties, used to migrate data from original DB to new DB below # database properties # extension directories # nifi.registry.extension.dir.aws=./ext/aws/lib # Identity Mapping Properties # # nifi.registry.security.identity.mapping.pattern.kerb=^(.*?)/instance@(.*?)$ # Group Mapping Properties #
# OIDC # |
Nifi Registry authorizers.xml
<authorizers> <userGroupProvider> <identifier>file-user-group-provider</identifier> <class>org.apache.nifi.registry.security.authorization.file.FileUserGroupProvider</class> <property name="Users File">./conf/users.xml</property> <property name="Initial User Identity 1">CN=nifi_amadeus_admin</property> <property name="Initial User Identity 2">CN=vtmnosqlnifip04.yyy.com, OU=NIFI</property> <property name="Initial User Identity 3">CN=vtmnosqlnifip03.yyy.com, OU=NIFI</property> <property name="Initial User Identity 4">CN=vtmnosqlnifip02.yyy.com, OU=NIFI</property> <property name="Initial User Identity 5">CN=vtmnosqlnifip01.yyy.com, OU=NIFI</property> </userGroupProvider> <accessPolicyProvider> <identifier>file-access-policy-provider</identifier> <class>org.apache.nifi.registry.security.authorization.file.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">CN=nifi_amadeus_admin</property> <property name="Node Identity 1">CN=vtmnosqlnifip04.yyy.com, OU=NIFI</property> <property name="NiFi Group Name"></property> <property name="NiFi Identity 1">CN=vtmnosqlnifip01.yyy.com, OU=NIFI</property> <property name="NiFi Identity 2">CN=vtmnosqlnifip02.yyy.com, OU=NIFI</property> <property name="NiFi Identity 3">CN=vtmnosqlnifip03.yyy.com, OU=NIFI</property> </accessPolicyProvider> <authorizer> <identifier>managed-authorizer</identifier> <class>org.apache.nifi.registry.security.authorization.StandardManagedAuthorizer</class> <property name="Access Policy Provider">file-access-policy-provider</property> </authorizer> </authorizers> |
Nifi Registry identity-providers.xml
<identityProviders> <provider> <identifier>ldap-identity-provider</identifier> <class>org.apache.nifi.registry.security.ldap.LdapIdentityProvider</class> <property name="Authentication Strategy">SIMPLE</property> <property name="Manager DN">CN=service_user,CN=Users,DC=xxx,DC=yyy,DC=com</property> <property name="Manager Password">OPGwqvD8YrHi</property> <property name="Referral Strategy">FOLLOW</property> <property name="Connect Timeout">10 secs</property> <property name="Read Timeout">10 secs</property> <property name="TLS - Keystore">/data/certs/keystore.jks</property> <property name="TLS - Keystore Password">PBSckF3zHJj8h7iAsZqes2zJhXyzjXVanE0F8Cy4NEA</property> <property name="TLS - Keystore Type">JKS</property> <property name="TLS - Truststore">/data/certs/truststore.jks</property> <property name="TLS - Truststore Password">rFXj+NsPyiH1tf43/sD6NCYW9mdXI9hZs+T/8DHs8b4</property> <property name="TLS - Truststore Type">JKS</property> <property name="TLS - Client Auth">NONE</property> <property name="TLS - Protocol">TLS</property> <property name="TLS - Shutdown Gracefully">true</property> <property name="Url">ldaps://ldap.xxx.yyy.com:636</property> <property name="User Search Base">CN=Users,DC=xxx,DC=yyy,DC=com</property> <property name="User Search Filter">(&(objectClass=user)(sAMAccountName={0}))</property> <property name="Identity Strategy">USE_USERNAME</property> <property name="Authentication Expiration">12 hours</property> </provider> |
I would appreciate your assistance on this matter.
Created 05-21-2025 06:32 AM
@melek6199
Let me try to address each of your statements as there appears to be some misunderstanding of how authentication and authorization works between NiFi and NiFi-Registry.
I have a 3-node NiFi cluster, and I want to manage it using NiFi Registry. I configured both NiFi and NiFi Registry with a single certificate using the TLS Toolkit. I also set up LDAP integration. I can successfully connect to both NiFi and NiFi Registry individually using my LDAP users.
However, the LDAP user that I added and authorized in the Registry does not appear in NiFi. With the certificate user, I can view the bucket in NiFi Registry from NiFi and perform flow version control. But I cannot do this with my LDAP user.
NOTE: Even if I generate separate certificates for NiFi and NiFi Registry and trust each certificate independently, the certificate user does not have permission to view the bucket. This is because the certificate user from the Registry is also not created in NiFi. For this reason, I generated both from the same certificate.
There are few things that don't make sense to me in your shared NiFi-Registry configuration:
NiFi-Registry identity-providers.xml:
NiFi-Registry authorizers.xml:
In the end, there are the following key things that need to know:
I know above is a lot of information, but wanted you to fully understand how the authentication and authorization between NiFi and NiFi-Registry works.
Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt