Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

egress: drop the empty-provider check in providerCredential

Đang mở Phù hợp với người mới
#3,428 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 1 ngày

@cloudonly đang làm issue này rồi.

Từ ngày 30/10/2026.

  • #3495 của @cloudonly — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
68/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Đọc cmd/atenet/internal/router/egress/credentials.go và so sánh bước kiểm tra provider rỗng với bước tra cứu provider ngay sau đó. Xóa bước kiểm tra sớm để các yêu cầu sử dụng đường dẫn từ chối hiện có của bước tra cứu, rồi chạy các trường hợp liên quan trong credentials_test.go; hoàn thành khi các yêu cầu vẫn bị từ chối và bước kiểm tra trùng lặp đã được xóa. Issue này phụ thuộc vào #3409, vì vậy hãy xác nhận thay đổi đó đã có trước khi bắt đầu.

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

Mô tả

area/network kind/cleanup

From review of #3409: https://github.com/agent-substrate/substrate/pull/3409#discussion_r4407716120

Handler.providerCredential in cmd/atenet/internal/router/egress/credentials.go first denies the request when h.providers is empty and logs "policy requires credential injection but no credential provider is configured". With #3409's provider map, the lookup right after it already covers that case. No provider matches the URI's host, so the request gets the same 500 and body, and the log line "credential URI names a provider this gateway does not serve" includes serves=[].

Remove the early check so there is one denial path. The only other difference: on a gateway with no providers, an unparseable URI would log "policy names an unparseable credential URI" instead.

The "no provider configured" cases in credentials_test.go only check that the request is denied, so they should keep passing.

Depends on #3409. On main the check is if h.provider == nil, and it's still needed there because the code after it calls the single provider directly.

Ngôn ngữ chính
Go
Star
5.9k
Fork
637
Merge trung bình
2 ngày 7 giờ
Pull request đã merge (30 ngày)
565

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 agent-substrate/substrate

Tất cả issue của agent-substrate/substrate

Issue tương tự

Thêm issue về Go

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.