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

Freature request: Load api-token automatically on provisioning of NodeRed flow. #140

Open
KvE-DGS opened this issue Oct 23, 2023 · 2 comments

Comments

@KvE-DGS
Copy link

KvE-DGS commented Oct 23, 2023

It is not prossible to give the "InfluxDB out node" of this library a pre-shared api-token.

When InfluxDB boots it can load a token from an .env file but this is not prossible in the "InfluxDB out node" when setting up a server.

I have also tried to add an extra field to the JSON description of my flow to be able to set the api-token on load of this flow description, but this field is cleared every time the server connection is booted for the first time.

@mblackstock
Copy link
Owner

The node is storing and retrieving credentials like other nodes as described here.

I haven't tested yet, but environment variables should be able to be used in credentials properties as described in the user docs, so if you have a variable such as INFLUXDB_API_TOKEN if you put ${INFLUXDB_API_TOKEN} in that field, it should use it. This is similar to MQTT password as described here. Let me know if this works.

@taketable
Copy link

I had a similar problem. The environment variable solution works perfectly, even if the flows_cred.json is encrypted.

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

No branches or pull requests

3 participants