Validator client: read the keymanager API token from a file

Aperta
#820 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start in crates/validator/src/http_api/mod.rs and trace load_or_create_token to the validator CLI argument handling. Check how the current token file is trimmed and validated, then follow those checks for the proposed flag path. Done means the flag reads the supplied file without writing to it, rejects unusable contents, and preserves current behavior when omitted.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
86
Fork
34
Merge medio
9g 20h
PR unite (30g)
77

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lambdaclass/ethlambda

Tutte le issue di lambdaclass/ethlambda

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.