-
Notifications
You must be signed in to change notification settings - Fork 977
Description
We want to move all of our API credentials into a secret management system (e.g. http://vaultproject.io). This presents us with a challenge with the initialization of the googleads client, because it absolutely requires an actual file that can be accessed in the filesystem by name, and we only have the YAML as a string in memory. It seems we can do only one of two things:
- Save the credentials to a temporary file and make sure we delete it every time we want to initialize the client
- Copy the entire implementation of
LoadFromStorageonly to modify a couple of lines there to use the in-memory configuration rather than open+read a file
Neither seems a reasonable approach. Ideally, the SDK should support shorthand initialization from other representations of the YAML data; either it should accept a file-like readable instance instead of a filename (so we could pass in a StringIO), or it should accept an actual pre-parsed data structure (so we could pass in a dictionary as it would have been returned by yaml.safe_load()).