secrets
¶
Serves as an access point to the secrets table in the cloud database so that secrets don’t have to be hardcoded into the apps. Various actions require access and tokens beyond what most staff is allowed to have, so secrets ensure that only people who should be able to access a certain resource are able to access it. Restricted to admins.
Code Documentation¶
-
secrets.main.
validate_master_secret
(master_secret)[source]¶ Validates a master secret.
- Parameters
master_secret (str) – secret to be validated
- Returns
a tuple of the app and a bool for if that app is a staging app
-
secrets.main.
validates_master_secret
(func)[source]¶ Wraps a function to call a local version of validate_master_secret instead of the RPC wrapper.
- Parameters
func (function) – function to be wrapped
- Returns
wrapped function that will call validate_master_secret
-
secrets.main.
load_all_secrets
(app, is_staging, created_app_name)[source]¶ Loads all secrets for a particular app.