feat: add INFISICAL_DISABLE_SECRETS_BACKUP to opt out of the offline secrets cache - #380
feat: add INFISICAL_DISABLE_SECRETS_BACKUP to opt out of the offline secrets cache#380devin-ai-integration[bot] wants to merge 2 commits into
Conversation
…ets cache Co-Authored-By: ashwin <ashwin@infisical.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
| Filename | Overview |
|---|---|
| packages/util/constants.go | Adds the environment-variable name used to opt out of local secret backups. |
| packages/util/secrets.go | Consistently gates the only backup write and offline-read paths, including backup-key access, using the new opt-out. |
Reviews (1): Last reviewed commit: "feat: add INFISICAL_DISABLE_SECRETS_BACK..." | Re-trigger Greptile
Co-Authored-By: ashwin <ashwin@infisical.com>
Description 📣
When logged in as a user, the CLI unconditionally writes an encrypted copy of every fetched secret set to
~/.infisical/secrets-backup/(used as an offline fallback when the API is unreachable). There is currently no way to opt out.This PR adds an
INFISICAL_DISABLE_SECRETS_BACKUPenvironment variable (same non-empty convention asINFISICAL_DISABLE_UPDATE_CHECK). When set:GetAllEnvironmentVariablesskipsWriteBackupSecretsafter a successful fetch, so no secrets are persisted to disk.ReadBackupSecretsis also skipped, so previously cached secrets are never served.Notes:
infisical reset(or logging in again) clears them via the existingDeleteBackupSecretspath.Type ✨
Tests 🛠️
Link to Devin session: https://app.devin.ai/sessions/62ffeb6f1eb8482cb13f086e98db20f1
Open in Devin Desktop: https://app.devin.ai/desktop/session/62ffeb6f1eb8482cb13f086e98db20f1?variant=devin
Requested by: @ashwin-infisical