Who can read config values set by functions:config:set command?

Viewed 558

I'm working on the implementation of some Cloud Functions for Firebase and one of these require some configuration to call external providers.

I was able to successfully configure these values using firebase functions:config:set key="value" but I was wondering what are the actors able to read this value.

Is the function the only capable of read it? Should I encrypt "value"? At the end will have to have the key in order to decrypt it.

Thanks

1 Answers

Environment configuration is created exactly for keeping some settings or 3rd-party services keys.

Only your google functions will be able to extract the value on remote environment. Also you can check those values locally using firebase functions:config:get key command.

To get those variables from the code of your function use this:

const functions = require('firebase-functions');
const someEnvVar = functions.config().key  
// where key is name of key you setted before

See more in official docs

Related