Validator client: read the keymanager API token from a file

Đang mở
#820 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 6 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
authentication, backend, cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
86
Fork
34
Merge trung bình
9 ngày 20 giờ
Pull request đã merge (30 ngày)
77

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lambdaclass/ethlambda

Tất cả issue của lambdaclass/ethlambda

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.