# FR: export / import flows WITH the username and password - when they are ENV VARs

**URL:** https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602
**Category:** Feature Requests
**Created:** [8 June 2022 08:10 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602 "2022-06-08T08:10:50Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![HoussemLajili](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/houssemlajili/32/62669_2.png) [@HoussemLajili](https://discourse.nodered.org/u/HoussemLajili)
#### Post date: [8 June 2022 08:10 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/1 "2022-06-08T08:10:50Z")

</div>

username and password are lost when export / import even though they are ENV VARs

Could this be supported?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [8 June 2022 08:14 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/2 "2022-06-08T08:14:50Z")

</div>

@HoussemLajili this is the same for **all nodes** using credentials (not simply MSSQL). Please update your title and description.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [8 June 2022 08:59 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/3 "2022-06-08T08:59:17Z")

</div>

That is, as I understand it, a deliberate design choice. It ensures that you don't accidentally reveal sensitive information when exporting flows. It is a very sensible position.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [8 June 2022 09:03 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/4 "2022-06-08T09:03:15Z")

</div>

Julian, the point the OP is trying to make is when they export a flow with credentials set to (for example) `${EMAIL_USERNAME}` or `${EMAIL_PASSWORD}` they are not exported

Exporting credential fields when they are env vars do not pose (a direct) risk & the OP is asking could this be permitted.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [8 June 2022 09:48 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/5 "2022-06-08T09:48:00Z")

</div>

> [@Steve-Mcl](#):
>
> Exporting credential fields when they are env vars do not pose (a direct) risk & the OP is asking could this be permitted.

Hmm, good point. Though I'm not entirely sure I would agree. I'd need to give it some more thought. But I would say that, despite the fact that many people use them this way, environment variables are not really secure since they are very easily intercepted in-memory.

Perhaps more importantly, how would Node-RED differentiate and would the differentiation be robust enough?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [9 June 2022 05:41 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/6 "2022-06-09T05:41:51Z")

</div>

Yes with passwords often needing to include special characters a password ${mypassword} is indeed a possibility

---

<div class="post-metadata">

### Author: ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)
#### Post date: [10 June 2022 12:59 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/7 "2022-06-10T12:59:11Z")

</div>

@HoussemLajili  
Please refer to this discussion

> [@FR - export the placeholders for user/password](https://discourse.nodered.org/t/fr-export-the-placeholders-for-user-password/59367):
>
> Hi , Background :- We have multiple environments and we are developing flows and once the development finishes - we send them for QA. We are using ENV variables to set the config of MSSQL node - so that the DB connection can be defined per environment without having to touch the flow itself. While deploying to each environment , while the process of deployment is automated - what we are finding is - every time someone needs to manually insert the user/password to the mssql contrib config node…

I think its precisely your ask as well.

This was in context of MSSQL Node .

The recommendation was to move the cred file along with flows.json.

---

<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: [9 August 2022 12:59 UTC](https://discourse.nodered.org/t/fr-export-import-flows-with-the-username-and-password-when-they-are-env-vars/63602/8 "2022-08-09T12:59:35Z")

</div>

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