I have several cloud functions (in Python) that require a modulair package auth
in which there is a subfolder with credentials
(containing mostly json files of Google Service Accounts files or Firebase configurations).
From a security perspective, I have obviously not included these files on the .git
by adding the folder in the .gitignore
file (auth/credentials
).
However, I am now stuck with what to do when deploying the Google Cloud Function (.gcloudignore
). If I deploy it with the credentials then I imagine that these keys are exposed on the server? How could I overcome this?
I have heard some speaking of environmental variables, but I am not sure if this is more secure than just deploying it?
What is the Google Way of doing it?