I doesn't understand how the credential works in node-red.
I read about the flow.cred.son, the setting file to choose the hash key and so on.
But i didn't find an simple explanation to store a credential and use it in a flow. Someone can help?
What i want :
save some credential
retrieve one and use it in the flow
I aware that i can use some crypto and store the value in a separate file but if node-red have a build-in functionnality, i prefered use it.
I seek for someting clear but the forum is flood by exporting flow issue and i couldn't find something in the doc or in the cookbook.
When the node is written you flag which of it's properties should be considered credentials and these are then encrypted with the key mentioned and stored in the separate file. They can be retrieved by the js portion of the node when it is initialised and used as needed.
It sounds like you want to store arbitrary values as credentials and use them in your flow (e.g. pass them into a later http-request node)?
This is not something supported by the built in credentials system.
That would make a lot of sense from an end-user perspective. The implementation is harder though given how credentials are managed. Nodes have to declare to the runtime what properties are credentials. The contrib-credentials node declares a single property which it stores all of its credentials under and the runtime doesn't need to know about the individual values.
To allow any TypedInput to have a credential type would mean any node could have an indeterminate number of credentials - which makes them harder to manage. But that's a problem for me to solve in the core.
@knolleary I know the contrib-credential but it have a issue wich is the hiden password field is not hiden. That means you can not let someone see the flow on the device if you don't want give him the password.
So, go with contrib-crypto-js and make another file to handle the credentials seems to me a good alternative. Do you agree with that?
I think again about my use case and i think i will go with the contrib-credential and put it inside a subflow. It will be great to have the possibility to put a msg properti in the env variable of the subflow, it is in your plan?
Have you ever think to hide a property in the debug tab that come out of a specific node for some user ? Like a specific node which contain a property to put a user and if this user is not the current user the user property couldn't be change and the message wouldn't be treated by the debug node.
@knolleary Nick, Just took a look at the issues for the node and it seems this cropped up about NR v1.02
(see Hidden field not hidden) ad a fix was created and offered for merging in May of 2020 but has not been applied.
Okay - I'll put this topic on the backlog for 2.1.0. Whether we introduce an equivalent node into the core, or find another way to integrate credential values, I don't know. But we can give it some proper thought.