Passing secret variables to connector


#1

Hello,

I am developing a connector Eau du Grand Lyon for Métropole de Lyon, that gets the user’s consumption data from an API. In order to get the data I need two variables, the base URL and the API authentication key.
How do I pass those secret variables to my connector without hard coding them? I am running a self hosted cozy with docker.

I read about the COZY_PARAMETERS env. variable in the documentation, it seems to match my needs, but I have trouble understanding exactly how to use it.

What is the best way of passing secret vars to connectors?

Thanks in advance,

Iane


#2

Hello, since your question is a good question and the documentation is quite lacking on this subject, I made a PR to the documentation which I hope will help you : https://github.com/cozy/cozy.github.io/pull/128/files#diff-3ac0ecbbd5d1f7493da817c2a8c1cbf2


#3

Thank you, with these additional information I managed to make it work!


#4

Hi…this is something what could work immediately. But it is obviously not exactly secure baking the credentials into the image. Ideally these should be baked into secrets. But we do not have a solution for this right now. I wonder if could be somehow used for this purpose once it gets implemented.