Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Setting User Login for my Apache NiFi

avatar
Explorer

I'm just installing Apache Nifi on linux server with version 1.25 .

this is my nifi.properties :

#nifi.security=none
#nifi.security.autoreload.enabled=false
#nifi.security.autoreload.interval=10 secs
#nifi.security.keystore=
#nifi.security.keystoreType=PKCS12
#nifi.security.keystorePasswd=
#nifi.security.keyPasswd=
#nifi.security.truststore=
#nifi.security.truststoreType=PKCS12
#nifi.security.truststorePasswd=
#nifi.security.user.authorizer=
nifi.security.allow.anonymous.authentication=false
nifi.security.user.login.identity.provider=file-login-provider
#nifi.security.user.jws.key.rotation.period=PT1H
#nifi.security.ocsp.responder.url=
#nifi.security.ocsp.responder.certificate=

this is my users.xml :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tenants>
    <users>
        <!-- Add more users as needed -->
        <user identifier="ronald">
            <identity>ronald</identity>
            <!-- Replace CREDENTIAL_VALUE with the hashed password -->
            <credential>wyojiYY_R6FGaU-XZKg5K9Mai1NlZXizt_-KGyWsHBs=</credential>
        </user>
    </users>

    <groups>
        <!-- Define groups if needed -->
    </groups>

    <policies>
        <!-- Define access policies if needed -->
    </policies>
</tenants>

and this is my authorizers.xml :

    ...
    <policies>
        <!-- Define access policies -->
        <policy identifier="ronald_policy">
            <resource>/flow</resource>
            <action>read</action>
            <action>write</action>
            <action>delete</action>
            <user>ronald</user>
        </policy>
    </policies>
</authorizers>

I still got an error when starting the app :

Caused by: java.lang.Exception: The specified login identity provider 'file-login-provider' could not be found.
        at org.apache.nifi.web.security.spring.LoginIdentityProviderFactoryBean.getObject(LoginIdentityProviderFactoryBean.java:131)
        at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
        ... 72 common frames omitted
2024-02-20 13:18:04,241 INFO [Thread-0] org.apache.nifi.NiFi Application Server shutdown started
1 ACCEPTED SOLUTION

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
3 REPLIES 3

avatar
Community Manager

@MvZ, Welcome to our community! To help you get the best possible answer, I have tagged our NiFi experts @MattWho @SAMSAL @cotopaul @TimothySpann who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Master Guru

file-login-provider is no longer a thing, maybe do single user

 

https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#user_authentication

 

https://community.cloudera.com/t5/Support-Questions/Apache-NiFi-user-authentication-creation-of-mult...

nifi.security.user.login.identity.provider=single-user-provider

avatar
Master Mentor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login