Skip to content

Resolve AI Gateway orgs from workspace session tokens - #30902

Draft
SasSwart wants to merge 2 commits into
mainfrom
sdlcgraph/aigov-714-1
Draft

SasSwart wants to merge 2 commits into
mainfrom
sdlcgraph/aigov-714-1

Conversation

@SasSwart

Copy link
Copy Markdown
Contributor

Add an AI Gateway org resolver at the coderd IsAuthorized boundary, detect workspace session tokens, load the workspace org, validate the user is still a member of that org, reject missing workspaces or invalid membership, and return the resolved org in IsAuthorizedResponse while leaving it unused by downstream policy. Include tests for successful workspace-token resolution, missing workspace rejection, invalid org membership rejection, and compatibility with the existing ServeHTTP flow.

Fixes AIGOV-714

@linear-code

linear-code Bot commented Oct 16, 2026

Copy link
Copy Markdown

AIGOV-714

# Conflicts:
#	coderd/aibridged/aibridged_test.go
#	coderd/aibridged/proto/aibridged.pb.go
#	coderd/aibridged/proto/aibridged.proto
#	coderd/aibridged/proto/version.go

This branch has not been deployed

No deployments
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.

1 participant