Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE: best practices for storing secret keys?

Are there any non-terrible ways of storing secret keys for Google App Engine? Or, at least, less terrible than checking them into source control?

like image 427
David Wolever Avatar asked Jun 28 '11 03:06

David Wolever


People also ask

What is the best place to store secret API keys?

Often your app will have secret credentials or API keys that you need to have in your app to function but you'd rather not have easily extracted from your app. If you are using dynamically generated secrets, the most effective way to store this information is to use the Android Keystore API.


1 Answers

In the meantime, Google added a Key Management Service: https://cloud.google.com/kms/

You could use it to encrypt your secrets before storing them in a database, or store them in source control encrypted. Only people with both 'decrypt' access to KMS and to your secrets would be able to use them.

The fact remains that people who can deploy code will always be able to get to your secrets (assuming your GAE app needs to be able to use the secrets), but there's no way around that as far as I can think of.

like image 63
Remko Avatar answered Nov 07 '22 21:11

Remko