@AlexisRub
NiFi has never offered an embedded user authentication management feature until the more recent single-user-provider authentication. This provider was only introduced in order for Apache NiFi to support HTTPS out-of-the-box default setup. Over the years since Apache NiFi was open sourced the community noticed unsecured (previous out-of-box default) exposed on the internet, so a decision was made to change the out-of-the-box setup to be secured. A secured NiFi requires that all users/clients are both authenticated and authorized. The Single-User-Provider was introduced to simplify access to a secured NiFi for evaluation purposes. This authentication provider as you have noticed does not support multiple users. The corresponding single-user-authorizer found in the authorizers.xml configuration also does not support multi-user authorization. This authorizer simply provides the single-user-provider user complete and full authorized access to everything in the NiFi. This provider also does not support NiFi clusters.
For a multi-user environment or clustered NiFi a different method of external authentication and authorization must be used.
Apache NiFi provides support for numerous user/client authentication beyond just single-user, LDAP, and kerberos listed in the User Authentication section of the admin guide.
Worth noting is that a secured NiFi requires a keytore and truststore and NiFi will generate the keystore and truststore files with self-signed clientAuth/ServerAuth certifcate if the keystore an truststore do not already exist at startup.
When NiFi is secured (HTTPS enabled and valid keystore and truststore configured) and no additional authentication methods have been configured, user/client authentication is required through the TLS exchange. This means that when you try to access the NiFi UI via yoru browser NiFi will respond to the browser (client) within the TLS exchange that a clientAuth certificate is "REQUIRED". If one is not provided the connection is closed. When additional authenication methods are configured NiFi will instead "WANT" a clientAuth certificate. If the browser does not present a client certificate, NiFi moves on to next configured authentication method.
I wanted to point out the above since certifcates are probably the next easiest way to setup a multi-user authenticated access. This would require you generating a unique clientAuth certificate for each unique user. These clientAuth certicates would either be self signed or signed by some certificate authority. If self signed the public cert for each would need to be added to the NiFi truststore file. If signed by some authority, only that signing authorities trust chain would need to be added to NiFi's truststore. The unique users would then load their client certifcate into their browser so it could be presented in the mutual TLS exchange with yoru NiFi.
In order to authorize multiple users, you would need to stop using the default single-user-authorizer and instead use the StandardManagedAuthorizer. This authorization provider will allow you to define yoru initial admin user (this user will be granted the minimum required admin authorizations. So initially this would be only user authorized to access the NiFi UI. Once access, this initial admin user can define additional user and group identities directly from the NiFi UI to which Authorization policies can be defined. Granting the same policies also granted to your initial admin user will establish a second admin user's authorizations. More information on the various policies and what they grant can be found here in the Configuring Users & Access Policies section of the admin guide.
That being said, I typically setup OpenLDAP and use the ldap-provider for authentication. But this requires that you have somewhere to install this (perhaps on same server with NiFi). The advantage here is you do not need to mess with the NiFi truststore. You can also use this ldap server for multiple instance of NiFi and NiFi-Registry.
Please help our community thrive. 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