# Securing Dashboard on IBM Cloud

**URL:** https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118
**Category:** Dashboard
**Created:** [27 August 2020 18:56 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118 "2020-08-27T18:56:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![alexmacabu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alexmacabu/32/27328_2.png) [@alexmacabu](https://discourse.nodered.org/u/alexmacabu)
#### Post date: [27 August 2020 18:56 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/1 "2020-08-27T18:56:35Z")

</div>

I'm trying to create some kind of user authentication to prevent unwanted access to my NodeRED's User Interface. I've searched online and found 2 solutions, that for some reason didn't worked out. Here they are:

1 - Tried to add the httpNodeAuth{user:"user", pass:"password"} key to the bluemix-settings.js but after that my dashboard kept prompting me to type username and password, even after I typed the password defined at pass:"password" field.

2 - Added the user defined Environtment Variables NODE\_RED\_USERNAME : username and NODE\_RED\_PASSWORD : password . But nothing has changed.

Those solutions were sugested here:[https://stackoverflow.com/questions/49079541/how-could-i-prohibit-anonymous-access-to-my-nodered-ui-dashboard-on-ibm-cloudbl](https://stackoverflow.com/questions/49079541/how-could-i-prohibit-anonymous-access-to-my-nodered-ui-dashboard-on-ibm-cloudbl).  
Thanks for the help, guys!

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [27 August 2020 19:17 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/2 "2020-08-27T19:17:02Z")

</div>

Hi @alexmacabu - just to clarify, you want to secure the Dashboard created by Node-RED Dashboard, rather then the editor itself?

Those two environment variables are for securing the editor, not the dashboard.

The right way to do it is with `httpNodeAuth`. When you set that up, did you hash the password before adding it to the file? More details of how to do that here: [https://nodered.org/docs/user-guide/runtime/securing-node-red#http-node-security](https://nodered.org/docs/user-guide/runtime/securing-node-red#http-node-security)

---

<div class="post-metadata">

### Author: ![alexmacabu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alexmacabu/32/27328_2.png) [@alexmacabu](https://discourse.nodered.org/u/alexmacabu)
#### Post date: [27 August 2020 19:29 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/3 "2020-08-27T19:29:04Z")

</div>

I need to secure the Dashboard, the editor is already secured. No I didn't hash the password, maybe that is why it kept prompting me to type the username and password. I've just added the line httpNodeAuth{user:"admin",password:"blah-blah-blah"}.

The thing is...Since I can't access the terminal to create the Hash, how I do this on IBM? 🤔

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [27 August 2020 19:47 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/4 "2020-08-27T19:47:56Z")

</div>

You could use any bcrypt hashing utility, such as: [https://bcrypt-generator.com/](https://bcrypt-generator.com/)

---

<div class="post-metadata">

### Author: ![alexmacabu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alexmacabu/32/27328_2.png) [@alexmacabu](https://discourse.nodered.org/u/alexmacabu)
#### Post date: [27 August 2020 20:16 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/5 "2020-08-27T20:16:46Z")

</div>

Great idea! So I just have to generate the hash for the desired password and add it here? I must be doing something wrong because I still getting the same username/password prompt

```auto
    // Serve up the welcome page
    httpStatic: path.join(__dirname,"public"),
    
    //GUI password authentication (ALEX)
    httpNodeAuth: {user:"Administrator",pass:"$2y$12$yv1xW/Pe7TN8O3pgDIKXKu7GRXmOn0676hj9FjVMo5I1uH4MOHuKD0yy"},
    functionGlobalContext: { },

```

---

<div class="post-metadata">

### Author: ![alexmacabu](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/alexmacabu/32/27328_2.png) [@alexmacabu](https://discourse.nodered.org/u/alexmacabu)
#### Post date: [28 August 2020 18:38 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/6 "2020-08-28T18:38:11Z")

</div>

Little update on the case: I tried hashes with 4, 8 and 10 rounds, but got the same behavior.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 September 2020 18:38 UTC](https://discourse.nodered.org/t/securing-dashboard-on-ibm-cloud/32118/7 "2020-09-27T18:38:17Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
