Validator client: read the keymanager API token from a file

Aberta
#820 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 6 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
72/100
Tipo de issue
Funcionalidade
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rust

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Rust
Estrelas
86
Forks
34
Merge médio
9d 20h
PRs com merge (30d)
77

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de lambdaclass/ethlambda

Todas as issues de lambdaclass/ethlambda

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.