The safest way to store this information is to use project metadata . In Flexible / ManagedVM, you can access metadata with a simple HTTP request .
From google blog post:
With a compute engine, container, and managed virtual machines, there is a magic URL that you can CURL get metadata about.
ManagedVMs is an old name for what is now called the "AppEngine Flexible Environment". Since you are saying that you are using Ruby on App Engine, you should use Flexible / ManagedVM. Therefore, you should be able to use these "magic URLs".
So, to get the secret code of mysecret
application in Ruby, you can:
Net::HTTP.get( URI.parse('http://metadata.google.internal/computeMetadata/v1/project/attributes/mysecret'))
(For @joshlf) Here's how to access project metadata in the standard AppEngine environment in Python:
source share