3 ms·
Another great resource: https://sethvargo.com/secrets-in-serverless/ https://sethvargo.com/secrets-in-serverless/ Shows how to encrypt env vars with Cloud KMS
by asciimike 8y ago
Another great resource: https://sethvargo.com/secrets-in-serverless/ https://sethvargo.com/secrets-in-serverless/
Shows how to encrypt env vars with Cloud KMS then decrypt them in memory.
- dfischer 8y agoThis is rad. Thanks.
- CydeWeys 8y agoNeat, looks like they're using a solution similar to what we're doing, except instead of using Cloud KMS to encrypt information stored in Google Cloud Storage, we're putting our information in Datastore. The reason being that these secrets are absolutely essential for many tasks that our registry needs to perform, and the past six years of experience have shown us that Datastore has better availability than GCS. We haven't seen Datastore ever go down unless all of Cloud is down too, whereas we have seen outages isolated to just GCS. Datastore also has lower latency (since it's a DB, not bulk file storage). One caveat is that the maximum size of a single entity in Datastore is 1 MB -- if you're encrypting stuff larger than that then you'll need to shard (ugly) or just use GCS. Since none of our secrets are anything close to that large, it works just fine.