r/GoogleAppsScript • u/PablanoPato • 2h ago
Question How are you managing secrets in Google Apps Scripts?
Just curious how others are handling secrets for things like API keys? Are you just saving them as script properties, or is there another method you've found to keep things more secure?
3
3
u/goeyj 1h ago
I've used script properties and the Google secrets manager. Usually script properties for projects that are internal and only accessible by trusted users. Most of our company projects live in a shared drive only accessible to a few admin users that would already have access to these secrets. Graduate to secrets manager if you might have editors of the script that shouldn't have direct access to the secrets. This is more of a pragmatic choice on my end, but it would be better security to use secrets manager as the default. Just a little more setup.
1
u/arundquist 39m ago
I only just realized that if you use Script Properties in a script anchored to a spreadsheet, if you let people make their own copy of the spreadsheet the script properties are deleted. I really like that for projects where I test things with my api keys but I want them to use their own.
5
u/ryanbuckner 2h ago
I save mine in the Script Properties