Supervisor API Key Change

Hi guys,

Based on our architecture, we need to know how ofter does the supervisor API key (BALENA_SUPERVISOR_API_KEY) changes.
Does it have any sort of rotation or basically stays the same until user explicitly asks to renew it?

Thanks

Hello @RodrigoM that’s an interesting question! Could I ask why is this important for your project?

As far as i know, the BALENA_SUPERVISOR_API_KEY only changes when the user explicitly request to renew it.

We have lambdas running in a container w/ Firecracker and they don’t have access to the environment variables of the container. So we plan to persist these values in a file and lambdas read it once they need it (to access supervisor).
If the API KEY changes out of the blue, that’s not a feasible solution.

1 Like

@RodrigoM the BALENA_SUPERVISOR_API_KEY doesn’t change! Unless you request for a change, so no worries.

Having said that, why do you need to ask to the supervisor directly instead of requesting the API or use the SDK? e.g. Balena Node.js SDK - Balena Documentation

I would like to learn more about your use case to understand more :slight_smile:

1 Like

We just thought it would be easier to query the supervisor than authenticating and querying the Balena Cloud. The info we need is available in the GET /v1/device endpoint.

Hello,
From your answer, I assume you will be running the SV query inside the container? If that’s the case then I can agree it would be much easier than querying the API. Thanks for providing the context.

2 Likes