Skip to content

tower: no internal authentication — any request reaching the tunnel reaches every Tower endpoint; all auth lives at the codevos.ai edge #1375

Closed as not planned

Description

@waleedkadous

Follow-up to #1370 (fixed the specific tunnel path bypass in PR #1374) — this issue tracks the general property that outlives it.

The property

  • isRequestAllowed() (server-utils.ts) returns true unconditionally, on the stated premise that binding to localhost implies a local actor.
  • The tunnel invalidates that premise by design: TunnelClient proxies cloud-edge requests into localhost:4100 via its embedded H2 server.
  • There is no 401 anywhere in the Tower server. The codev-web-key / authFetch mechanism in tower.html sends headers Tower never checks — it is client-side only.

Consequence: 100% of authentication for tunnel-borne requests lives at the codevos.ai edge, outside this repo. PR #1374 blocked the /api/tunnel/* management endpoints from tunnel origin, but every other Tower endpoint (terminals, sends, file access, spawn) remains reachable by anything the edge lets through.

Asks

  1. Cloud-side audit (blocking question): is the public /t/<towerId>/… proxy URL reachable without authentication? If yes, this is remote unauthenticated access to Tower's full API and needs an immediate edge fix. Also pull edge access logs for /workspace/*/api/tunnel/disconnect around 2026-08-08 18:28:03Z / 20:25:41Z / 22:29:15Z to identify the actor behind the three deregistrations (still unattributed; via= attribution only exists going forward).
  2. Tower-side defense in depth: authenticate tunnel-borne requests in Tower itself (e.g., a per-tower secret established at registration, checked on H2-proxied requests), so Tower's security does not depend entirely on a service outside this repo.
  3. Revisit isRequestAllowed()'s premise in the code comment — it is now documented-false.

Context: v3.3.0 (Luxor) shipped to @next with the #1374 path fix; this hardening should land before 3.3.0 promotes to @latest.

Activity

  1. added
    area/tower
    on Aug 9, 2026
  2. waleedkadous commented on Aug 9, 2026

    @waleedkadous
    ContributorAuthor

    Owner ruling (2026-08-09): known issue, and by design. Tower deliberately has no internal authentication — the codevos.ai edge is the authentication boundary for tunnel-borne traffic, and localhost binding covers the local case. This issue stays as the record of that design decision rather than as a work item; the @latest-promotion-blocker framing in the body is withdrawn. Actor attribution for future incidents is covered by #1374's via=tunnel/local logging. If the edge audit (ask 1) ever shows the public proxy URL reachable unauthenticated, that would be a cloud-side bug to fix at the edge — not grounds to reverse this design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/tower

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions