constellation_utils.secrets¶
Public secrets API.
Top-level functions return frozen Pydantic models holding the resolved credential values. Each function is cached per-process so repeated calls are free.
Auth flows:
Laptops:
opCLI uses the desktop app’s biometric-unlocked session.Rigs / unattended: same
opCLI consumesOP_SERVICE_ACCOUNT_TOKENfrom the environment without a desktop app.Tests / CI: if
R2_ACCESS_KEY_IDis already set in env, the env backend short-circuits the op CLI entirely.
Profile selection: CONSTELLATION_PROFILE=testing|production
(default testing).
Submodules¶
Package Contents¶
Functions¶
Return the R2 credentials for the current profile. |
|
Return the Cloudflare account API credentials for the current profile. |
API¶
- constellation_utils.secrets.r2() constellation_utils.secrets.models.R2Secrets[source]¶
Return the R2 credentials for the current profile.
Reads from 1Password via the
opCLI by default, or fromR2_*env vars in test/CI environments. Cached for the lifetime of the process.Raises
ConstellationAuthErrorif no auth backend is available (e.g.opis not installed andR2_ACCESS_KEY_IDis not set).
- constellation_utils.secrets.cloudflare() constellation_utils.secrets.models.CloudflareSecrets[source]¶
Return the Cloudflare account API credentials for the current profile.
Reads from 1Password via the
opCLI by default, or fromCLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_IDenv vars in test/CI environments. Cached for the lifetime of the process.Raises
ConstellationAuthErrorif thecloudflare:block is missing from the active profile’s YAML, or if no auth backend is available.