Skip to content

Validator client: read the keymanager API token from a file #820

Open

Description

@MegaRedHand

Summary

The validator client's keymanager API always reads its bearer token from <validators-dir>/api-token.txt, and generates one when that file is missing (load_or_create_token, crates/validator/src/http_api/mod.rs). There is no flag to point it at an existing token file.

Where it shows up

ethereum-package gives every validator client one shared token (static_files/keymanager/keymanager.txt), so its tooling can call any client's keymanager API with the same credential. The other clients take that file by flag:

Client Flag
Nimbus, Prysm --keymanager-token-file
Lodestar --keymanager.tokenFile
Teku --validator-api-bearer-file

For ethlambda, the launcher in ethpandaops/ethereum-package#1515 copies the shared file into <validators-dir>/api-token.txt before starting the client. That works, but it depends on our internal filename and on a shell wrapper around the binary.

Proposal

--keymanager-token-file <path> on ethlambda validator: read the token from that path instead of <validators-dir>/api-token.txt, with the same checks as today (trimmed, at least 16 characters, refuse an unusable file rather than regenerate it). Never write to that path. Without the flag, nothing changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions