fix: remove hardcoded Engine API JWT secret and require explicit configuration#1087
Open
erhnysr wants to merge 2 commits into
Open
fix: remove hardcoded Engine API JWT secret and require explicit configuration#1087erhnysr wants to merge 2 commits into
erhnysr wants to merge 2 commits into
Conversation
…iguration The default BASE_NODE_L2_ENGINE_AUTH_RAW value was a well-known public hex string committed in the repository. Because authrpc binds to 0.0.0.0, any operator using host networking, Kubernetes, custom port mappings, or shared Docker networks was exposed to unauthenticated Engine API access. - Remove the hardcoded secret from .env.mainnet and .env.sepolia; replace with a placeholder that instructs operators to generate their own value using `openssl rand -hex 32` - Add validation in all three entrypoint scripts (reth-entrypoint, base-consensus-entrypoint, op-node-entrypoint) that exits with a clear error message if BASE_NODE_L2_ENGINE_AUTH_RAW is unset or still holds the placeholder value - Document BASE_NODE_L2_ENGINE_AUTH_RAW as a required field in README.md Fixes base#1086 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Collaborator
🟡 Heimdall Review Status
|
geth/geth-entrypoint was missing the same BASE_NODE_L2_ENGINE_AUTH_RAW validation added to reth-entrypoint, base-consensus-entrypoint, and op-node-entrypoint. Without this check, geth nodes using the default or placeholder secret would silently start with a public JWT. Co-Authored-By: Claude Sonnet 4.6 <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
Fixes #1086.
The default
BASE_NODE_L2_ENGINE_AUTH_RAWvalue (688f5d737bad920b...) was a well-known public hex string committed in the repository. Sinceauthrpcbinds to0.0.0.0:8551, any operator using host networking, Kubernetes, custom port mappings, or shared Docker networks was exposed to unauthenticated Engine API access.Changes
.env.mainnet/.env.sepolia: Replace the hardcoded secret with a<your-secret-jwt>placeholder and a comment instructing operators to generate their own value withopenssl rand -hex 32.reth/reth-entrypoint,base-consensus-entrypoint,op-node-entrypoint: Add a validation block before writing the JWT file. IfBASE_NODE_L2_ENGINE_AUTH_RAWis unset or still holds the placeholder, the script exits with a clear error message and theopensslcommand to generate a valid secret.README.md: DocumentBASE_NODE_L2_ENGINE_AUTH_RAWas a required field under Configuration → Required Settings, explaining that both containers must share the same value.Test plan
BASE_NODE_L2_ENGINE_AUTH_RAW— confirm all three entrypoints exit with the error message and generation hint.BASE_NODE_L2_ENGINE_AUTH_RAW=$(openssl rand -hex 32)in.env.mainnet— confirm the node starts and execution/consensus containers authenticate successfully.🤖 Generated with Claude Code