Open dga-nagra opened 1 month ago
Hi @dga-nagra,
What is the use of the ingester's API_KEY variable, it is not used anywhere
It's a leftover from one of very first iterations, not used and is going to be removed.
Can I set up a single Diode server for multiple clients (e.g. use tokens generated from Netbox) ?
You can utilise diode server from multiple clients, but at this stage of the project we use single shared DIODE_API_KEY
across all these clients.
the variables are here to define the communication ingester -> reconciler <-> Netbox.
That's correct.
DIODE_API_KEY is shared by Netbox, the reconciler but also the client
DIODE_API_KEY
is used for ingestion (SDK/client -> diode-ingester) only. All three API keys are stored/managed in the NetBox, diode-reconciler has it as well currently as we didn't add pulling most of these keys via API from NetBox yet, but aiming to simplify the process, especially in scenarios like API keys rotation, etc.
Since the client uses DIODE_API_KEY, and since this value is defined on startup, this means that either all clients uses the same key, or we need one Diode server per client ?
As mentioned above, all clients using same DIODE_API_KEY
(per diode <--> netbox) 👍
Hi @mfiedorowicz and thank you a lot for taking the time to respond!
API_KEY
DIODE_API_KEY
is referenced in netbox.env
file: https://github.com/netboxlabs/diode/blob/develop/diode-server/docker/netbox/env/netbox.env#L41 This is why I assumed it was used by netbox.DIODE_TO_NETBOX
and NETBOX_TO_DIODE
when DIODE
user is already being createdIn my opinion, it is really important that the data being ingested uses the user's permissions and that every user can manage their own tokens. But I understand the limitations, especially, since it uses a redis queue, you cannot store the user credential for later use or give the user a permission denied
when ingesting since it will only be known during the reconciler step. If you need help and have a roadmap/feature list/... I would be glad to contribute.
Thank you again for your responses. Have a nice day.
TL;DR
Detailed question
Hi,
I am trying to configure Diode in the same docker compose as Netbox. I see that there is a
RECONCILER_API_KEY
variable set toCHANGE_.ME
https://github.com/netboxlabs/diode/blob/develop/diode-server/docker/sample.env#L2 https://github.com/netboxlabs/diode/blob/3f4235f6cee16e4b4f47d988e461bdafdd81d347/diode-server/docker/docker-compose.yaml#L39
I went in all repositories and I don't find the mention to this variable, even in the Go code: https://github.com/netboxlabs/diode/blob/3f4235f6cee16e4b4f47d988e461bdafdd81d347/diode-server/ingester/component_test.go#L37
Is this variable needed? I thought that this would be used by the clients, but from netbox-learning I am supposed to use
DIODE_API_KEY
If I understand correctly:DIODE_API_KEY
, and since this value is defined on startup on diode and netbox, this means we can only ever have only one DIODE_API_KEY even if we were to spawn multiple diode instances since the token is still passed to netbox.Please, correct me if I am wrong. Thank you in advance for your help.