0

I would like to fetch secrets from google secret manager in my NodeJs Library.

This is not an App Engine application.

I'm creating a central logging library that sends logs from the firebase functions to LogScale. Because it is a library, it is being imported in another services so that we can log firebase functions. However in order for me to do that, I need a token. That token I would like it to be stored on Google Secrets Manager.

I've created the secret but I'm not able to authorize my library to GCP and therefore I'm not able to fetch the secret.

I've used google documentation for the nodejs client library: https://cloud.google.com/secret-manager/docs/reference/libraries#client-libraries-install-nodejs

But because this is not an App Engine this don't seem to work.

I guess what I'm asking is how can I authenticate my nodejs library with GCP in order to fetch secrets from secret manager (maybe using the service account .json key).

Thanks in advance :)

Nino Matos
  • 91
  • 9

0 Answers0