Skip to content

Store user/password in encrypted Node-RED credentials#138

Open
ukmoose wants to merge 3 commits into
alexandrainst:mainfrom
ukmoose:fix/credentials-env-global
Open

Store user/password in encrypted Node-RED credentials#138
ukmoose wants to merge 3 commits into
alexandrainst:mainfrom
ukmoose:fix/credentials-env-global

Conversation

@ukmoose
Copy link
Copy Markdown

@ukmoose ukmoose commented May 16, 2026

Moves the PostgreSQL user and password from plain-text storage in flows.json to Node-RED's encrypted credential system (flows_cred.json).
What changed:

  • User and password are now stored as Node-RED credentials (encrypted at rest)
  • A dropdown selector in the Security tab lets users choose between credential, env variable, or global context for each field
  • Existing flows are automatically migrated on first load — plain-text values are copied to credentials and a warning is logged prompting the user to deploy
  • On deploy, the old plain-text values are removed from flows.json automatically
  • Credentials take priority over flows.json values
  • Config node label still shows the username
  • Added documentation to README and in-editor help for the config node

Breaking change: version bumped to 0.16.0 as the config storage format has changed.
Closes #137

Tested by taking flows.json stored username & password and env stored username & password, upgrading to patched node,
ensuring that both still can access db, and checking flows.json for username & password values.

@Alkarex
Copy link
Copy Markdown
Member

Alkarex commented May 25, 2026

Thanks! Looking into it.
Related:

* Clarify upgrade documentation
* Catch possible errors
* i18n
@Alkarex
Copy link
Copy Markdown
Member

Alkarex commented May 25, 2026

I have made some changes but not tested thoroughly.
Could you please give it a try again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User and password details stored as plain text in flow.json file

2 participants