Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

AI Bridge Proxy: authenticate tunneled traffic

Aperta
#1,352 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.
Lingua principale
Nessun dato sulla lingua
Stelle
3
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di coder/internal

Tutte le issue di coder/internal

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.