Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to provide externally authorization token or username and password #14

Open
carlo161 opened this issue Feb 18, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@carlo161
Copy link

Hello,
I think it could be useful to let the user perform an external authentication and provide his own token to the node.
Otherwise he should be allowed to provide username and password and the node should perform an authentication (if it is not yet connected).

This will prevent the user to be able to browse the datalayer but it could be useful to avoid errors when node-red starts before the ctrlX and the authentication will fail.
It could be also useful if the user will want to insert his credentials in a form.

I think the user should be able to:

  • provide credentials via the node frontend (actual solution)
  • provide credentials via msg (e.g.: msg.username and msg.password)
  • deal externally with the authentication and provide his token (e.g.: via msg.authToken)

I provide an example (just a simple subflow) of my idea:
flows.zip

Thanks and best regards

@krauskopf
Copy link
Contributor

Hi,

thanks for your message. Regarding your points:

This will prevent the user to be able to browse the datalayer but it could be useful to avoid errors when node-red starts before the ctrlX and the authentication will fail.

Actually that is a bug, that should be handled with the upcoming version 1.8.2. Authentication will wait until server is available or re-authenticate when connection is lost.

I think the user should be able to:
* provide credentials via msg (e.g.: msg.username and msg.password)
* deal externally with the authentication and provide his token (e.g.: via msg.authToken)

I understand your use-case. Although I'm not so happy about storing readable passwords in the flow. But as far as I can imagine your intention is mainly about injecting the username and password from the UI dashboard?
So let's say I will add support to provide these settings via the input msg, then these credentials will only be effective for this node but not update the settings in the config node. Does this meet your expectation?

@krauskopf krauskopf added the enhancement New feature or request label Feb 24, 2021
@carlo161
Copy link
Author

Hello,
yes that is exactly the use case I was thinking about. The user could provide his credentials from a UI object, and that will have the priority on the settings on the config node (for example left empty) and will not update them.
I agree on not storing readable passwords in the flow.
With this enhancement we could allow different users with different permissions and avoiding to set the credentials directly in the node config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants