Skip to content

Conversation

@alexluong
Copy link
Collaborator

No description provided.

@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
outpost-docs Ready Ready Preview, Comment Feb 2, 2026 2:14pm
outpost-website Ready Ready Preview, Comment Feb 2, 2026 2:14pm

Request Review

@alexluong alexluong merged commit 2f2ac11 into refactor-auth Feb 2, 2026
4 checks passed
@alexluong alexluong deleted the portal branch February 2, 2026 14:15
alexluong added a commit that referenced this pull request Feb 2, 2026
* fix: return 401 for malformed bearer token + add expired JWT tests

ErrInvalidBearerToken now returns 401 instead of 400 — a malformed
bearer token is an authentication failure, not a bad request.

Add expired JWT tests for Extract, TenantJWTAuthMiddleware, and
APIKeyOrTenantJWTAuthMiddleware.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor: introduce AuthMode + TenantScoped, flatten route list

Replace AuthScope/RouteMode with simpler AuthMode enum and TenantScoped
bool. Flatten 5 route slices into 2 (nonTenantRoutes + tenantRoutes)
with portal routes conditionally appended. Auto-apply
RequireTenantMiddleware via TenantScoped instead of manual Middlewares
arrays. Define narrow TenantRetriever interface to decouple middleware
from full TenantStore. Change mustTenantFromContext to panic on missing
tenant (programming bug, not user error).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: update handlers to use mustTenantFromContext

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: remove dead code — ErrTenantIDNotFound, SetTenantIDMiddleware, mustTenantIDFromContext

- Remove 3 dead symbols from auth_middleware.go
- Remove TestSetTenantIDMiddleware from auth_middleware_test.go
- RequireTenantMiddleware reads c.Param("tenantID") instead of c.Get
- Remove SetTenantIDMiddleware() from router global middleware
- Upsert handler uses c.Param("tenantID") directly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: gofmt

* refactor: rename AuthTenant -> AuthAuthenticated

* chore: rename AuthenticatedMiddleware

* refactor: simplify auth context between apikey & jwt

* test: remove old test files

* refactor: simplify router deps

* test: apirouter test setup

* test: tenant handlers

* test: destination handlers

* test: log handlers

* test: resource parent & authz

* fix: validate destination ownership in RetrieveAttempt

* test: comprehensive list & pagination tests

* test: list tenant not supported

* test: publish & retry api tests

* fix: consistent validation handling

* fix: clean up dead code and nil-check inconsistency in apirouter

* test: add missing apirouter test coverage for auth, tokens, portal, and destination types

* refactor: consolidate middleware into unified AuthMiddleware

* chore: rename path names to snake_case

* test: tenant metadata conversion

* test: clean up e2e tests

* test: comprehensive e2e suite

* test: topic matching

* chore: gofmt

* test: move e2e tests into apirouter

* fix: attempt response schema

* chore: upgrade Dockerfiles to Go 1.24

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: openapi.yaml

* fix: portal using new endpoints (#671)

* fix: use new endpoint structure

* fix: destination attempt queries

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants