Skip to content

Prefer AWS Secrets Manager for validator/VFN identity, fail loudly#19

Open
larryl3u wants to merge 1 commit into
mainfrom
asm-identity-with-local-fallback
Open

Prefer AWS Secrets Manager for validator/VFN identity, fail loudly#19
larryl3u wants to merge 1 commit into
mainfrom
asm-identity-with-local-fallback

Conversation

@larryl3u
Copy link
Copy Markdown
Collaborator

Summary

  • Identity provisioning now tries <PREFIX>_KEYS_SECRET_NAME (AWS Secrets Manager) first, then <PREFIX>_IDENTITY_FILE (local file). If neither is set — or the chosen source fails — the deploy aborts instead of silently assuming a pre-existing K8s secret.
  • Adds VFN_KEYS_SECRET_NAME so the VFN identity can also come from ASM (previously only the validator path was wired, and even that was dead code).
  • Parametrizes create_validator_secret_from_aws_sm with secret_key so it serves both validator-identity.yaml and validator-full-node-identity.yaml.
  • Rewrites the identity section of .env.example to document the new precedence and removes the old "OPTION 1 / OPTION 2" text that claimed Terraform auto-creates the K8s secret (it doesn't).

ASM errors are intentionally not caught — silent fallback to a stale local file would risk running with the wrong identity.

Test plan

  • Deploy with only VALIDATOR_KEYS_SECRET_NAME set → reads from ASM, creates K8s secret
  • Deploy with only VALIDATOR_IDENTITY_FILE set → reads from local file
  • Deploy with neither set → aborts with a clear error
  • Deploy with VALIDATOR_KEYS_SECRET_NAME pointing at a non-existent ASM secret → aborts (no fallback)
  • Same matrix for VFN when DEPLOY_VFN=true
  • Re-running a deploy where the K8s secret already exists is still a no-op

🤖 Generated with Claude Code

Identity resolution now tries ASM (<PREFIX>_KEYS_SECRET_NAME) first and
falls back to a local file only when ASM is unset. If neither is
configured, or the chosen source fails, the deploy aborts instead of
silently assuming a pre-existing K8s secret. Adds VFN_KEYS_SECRET_NAME
and parametrizes the ASM helper's secret key so it works for both
identities.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant