docs: add authentication page to AI Gateway docs#25459
Open
nickvigilante wants to merge 2 commits into
Open
Conversation
Document how clients authenticate to AI Gateway: - Token format (opaque ID-secret, not JWT) - Validation sequence in aibridged (7 steps) - Direct API auth path vs proxy mode - Credential modes (centralized vs BYOK) - Token lifecycle (expiry, revocation, rotation) Add auth.md to manifest after setup.md, cross-link from setup.md (new Next steps section) and audit.md.
Docs preview📖 View docs preview for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes DOCS-148.
Adds
docs/ai-coder/ai-gateway/auth.mdcovering how clients authenticate to AI Gateway.What's in this PR
New page:
docs/ai-coder/ai-gateway/auth.mdaibridgeddocs/manifest.jsoninsertsauth.mdaftersetup.mdin the AI Gateway nav.docs/ai-coder/ai-gateway/setup.mdadds a Next steps section with links to auth, clients, and audit.docs/ai-coder/ai-gateway/audit.mdadds cross-link toauth.mdin the existing Next steps section, and converts em-dashes to colons (lint requirement).Research notes
Key source files reviewed:
coderd/httpmw/apikey.go(SplitAPIToken) for token formatenterprise/aibridgedserver/aibridgedserver.go(IsAuthorized) for the validation sequence and error typesenterprise/aibridgeproxyd/aibridgeproxyd.go(extractCoderTokenFromProxyAuth) for proxy authcoderd/database/models.gofor CredentialKindCentralized / CredentialKindByokcoderd/aibridge/aibridge.gofor HeaderCoderTokenKnown limitation documented: aibridged.IsAuthorized does not currently update last_used on the token (explicit TODO in source).
Generated by Coder Agents