developer.chrome.com icon indicating copy to clipboard operation
developer.chrome.com copied to clipboard

Remove cloud-secrets util

Open matthiasrohmer opened this issue 2 years ago • 1 comments

When configuring the secrets for https://github.com/GoogleChrome/developer.chrome.com/pull/7029 I noticed our cloud-secret util has the potential to leak secrets via logs. At least by now GCP has a built-in, simple way to share secrets with cloud build jobs, via the availableSecrets and secretEnv configuration keys. This not just prevents leaking, but also makes sure scripts only have access to configured secrets they actually need.

Additionally the existing solution couldn't gracefully handle multi-line secrets.

I already did parts of it in https://github.com/GoogleChrome/developer.chrome.com/commit/d47a76ba524a80e71b5468120311ab5fbea0590e - this PR is merely for clean-up.

On top of that it saves us a dependency and code to maintain. 🙂

Leaving in dotenv is still useful for people using .env files for local development.

matthiasrohmer avatar Aug 17 '23 15:08 matthiasrohmer

:white_check_mark: Preview (app) for commit ccceccca4efdce81c90fcd96b11e60e4b20890c6 available at https://pr-7106-app-dot-dcc-staging.uc.r.appspot.com/.