Nodered security: login failed

1,683 views
Skip to first unread message

ing. Carmine Manfredi

unread,
Jan 21, 2017, 3:48:53 PM1/21/17
to Node-RED
Hi,
i configured "settings.js" so:

// Securing Node-RED
    // -----------------
    // To password protect the Node-RED editor and admin API, the following
    // property can be used. See http://nodered.org/docs/security.html for details.
    adminAuth: {
        type: "credentials",
        users: [{
            username: "user",
            password: "$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.",
            permissions: "*"
        }]
    },

    // To password protect the node-defined HTTP endpoints (httpNodeRoot), or
    // the static content (httpStatic), the following properties can be used.
    // The pass field is a bcrypt hash of the password.
    // See http://nodered.org/docs/security.html#generating-the-password-hash
    httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
    httpStaticAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},

but at login, I see message errore: "login failed".
Why ?
Where I wrong ?

Mark Setrem

unread,
Jan 21, 2017, 4:31:58 PM1/21/17
to Node-RED
you need to change the pass to be the hash of the password you create see the "Generating the password hash" section of the page in the docs you linked to
 

carmine manfredi

unread,
Jan 21, 2017, 4:54:27 PM1/21/17
to node...@googlegroups.com
ok. thank you.
I have used:

node-red-admin hash-pw

I have inserted the password and I copied generating hash code in settings.js file.

It works !

2017-01-21 22:31 GMT+01:00 Mark Setrem <mse...@gmail.com>:
you need to change the pass to be the hash of the password you create see the "Generating the password hash" section of the page in the docs you linked to
 

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/a1OxjJiqdtE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/45f2ed7d-4289-4890-b90d-ac6ac23f00dc%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages