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

AI Bridge Proxy: authenticate tunneled traffic

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

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

Đánh giá

Issue này chưa được đánh giá.

Mô tả

must-do

Problem

AI Bridge Proxy does not perform any authentication on tunneled traffic. This applies to:

  • Non-allowlisted HTTPS CONNECT requests: tunneled via tunneledMiddleware without any credential check
  • Plain HTTP proxy requests: forwarded without any credential check (related to bug https://github.com/coder/internal/issues/1351)

For allowlisted domains (AI providers), the proxy extracts the Coder session token from Proxy-Authorization and forwards it to AI Bridge, which validates it. However, for tunneled traffic there is no AI Bridge in the path, so no authentication happens at all.

This means anyone who can reach the proxy can tunnel traffic through it to any non-allowlisted destination without credentials. This is a known limitation documented in Security Considerations.

Proposal

Validate authentication for all tunneled traffic before forwarding. The proxy should check the Proxy-Authorization header on both non-allowlisted CONNECT requests and plain HTTP proxy requests.

Open Questions

The proxy currently does not validate tokens itself, for allowlisted domains, it passes the token to AI Bridge which validates it against Coder. For tunneled traffic there is no AI Bridge in the path, so the proxy would need to validate the token directly.

Options:
  • Check header exists only: verify that Proxy-Authorization is present but don't validate the token. Simple but weak, any string would pass.
  • Validate against Coder API: make a request to Coder to verify the token. Correct but expensive, every tunneled request would hit the Coder API.
  • Validate with caching: validate the token against Coder API on first use and cache the result for a period. Balances correctness with performance.
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
3
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 coder/internal

Tất cả issue của coder/internal

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.