Docs: note that Bun resources don't trust the dev cert via NODE_EXTRA_CA_CERTS (upstream Bun bug)

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

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

Đá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
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bun
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với các trang tài liệu AppHost về Certificate configuration và JavaScript apps được nêu trong issue, đặc biệt là các phần Bun/AddBunApp. Thêm cảnh báo liên kết đến oven-sh/bun#44365, giải thích rằng NODE_EXTRA_CA_CERTS không thiết lập đáng tin cậy sự tin cậy đối với chứng chỉ phát triển, và ghi lại cách giải quyết tạm thời bằng endpoint plain-HTTP; hoàn tất khi cả hai trang đều chứa hướng dẫn liên quan.

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

Mô tả

Problem

Aspire sets up development certificate trust for the various resource types, but for Bun resources (AddBunApp/addBunApp), that doesn't actually work today. Aspire configures NODE_EXTRA_CA_CERTS (and SSL_CERT_DIR) on Bun resources automatically, pointing at the generated dev cert. Confirmed by inspecting the actual running process's environment. But Bun's fetch() still rejects the certificate with:

TypeError: unable to verify the first certificate
  code: "UNABLE_TO_VERIFY_LEAF_SIGNATURE"

This is a genuine Bun bug, not an Aspire misconfiguration: Bun doesn't trust a pinned self-signed leaf certificate with basicConstraints: CA:FALSE via NODE_EXTRA_CA_CERTS, even though Node.js does for the exact same certificate and env var. I filed and reproduced this upstream with a minimal, Aspire-independent repro: oven-sh/bun#44365.

Net effect: any Bun-hosted resource (e.g. a CopilotKit/AG-UI runtime bridge, or any custom Bun service) that calls another Aspire project resource over HTTPS in local development will fail with UNABLE_TO_VERIFY_LEAF_SIGNATURE out of the box, with no Aspire-side configuration able to fix it. The only current workaround is to call the target resource's plain-HTTP endpoint instead of HTTPS for that specific call.

Request

Please add a note to the relevant docs pages so other users don't lose time rediscovering this:

Ngôn ngữ chính
MDX
Star
201
Fork
95
Merge trung bình
1 ngày 19 giờ
Pull request đã merge (30 ngày)
78

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 microsoft/aspire.dev

Tất cả issue của microsoft/aspire.dev

Issue tương tự

Thêm issue về Documentation

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.