Prefer AWS Secrets Manager for validator/VFN identity, fail loudly#19
Open
larryl3u wants to merge 1 commit into
Open
Prefer AWS Secrets Manager for validator/VFN identity, fail loudly#19larryl3u wants to merge 1 commit into
larryl3u wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<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.VFN_KEYS_SECRET_NAMEso the VFN identity can also come from ASM (previously only the validator path was wired, and even that was dead code).create_validator_secret_from_aws_smwithsecret_keyso it serves bothvalidator-identity.yamlandvalidator-full-node-identity.yaml..env.exampleto 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
VALIDATOR_KEYS_SECRET_NAMEset → reads from ASM, creates K8s secretVALIDATOR_IDENTITY_FILEset → reads from local fileVALIDATOR_KEYS_SECRET_NAMEpointing at a non-existent ASM secret → aborts (no fallback)DEPLOY_VFN=true🤖 Generated with Claude Code