feat(web): publish auth.md describing agent credential paths#172
Open
jiashuoz wants to merge 1 commit into
Open
feat(web): publish auth.md describing agent credential paths#172jiashuoz wants to merge 1 commit into
jiashuoz wants to merge 1 commit into
Conversation
Adds web/public/auth.md served at https://e2a.dev/auth.md, following the WorkOS auth.md convention so MCP clients and direct API consumers can discover how to authenticate to e2a from a single LLM-readable file. The file documents what's actually in the codebase today (RFC 8414 AS metadata, RFC 7591 DCR, RFC 6750 Bearer + WWW-Authenticate challenges, the e2a_/ate2a_ bearer dispatch) and is explicit about what's missing for full auth.md compliance (agent_auth block, RFC 9728 PRM, /agent/auth endpoint, JWKS for ID-JAG issuance). Includes the corrected send-body schema (body / html_body — not text), idempotency-key semantics, the HITL 202 pending_approval path, and a forward-looking "Agent identity" section sketching e2a as an OAuth/ID-JAG issuer leveraging verified agent email addresses. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
https://e2a.dev/auth.md, following the WorkOS auth.md convention. Agents (and their authors) can discover how to authenticate to e2a from a single LLM-readable file, without reverse-engineering the OAuth surface.WWW-Authenticatechallenges, thee2a_/ate2a_bearer dispatch) and lists exactly what's missing for full auth.md compliance (agent_authblock, RFC 9728 PRM,/agent/authendpoint, JWKS for ID-JAG issuance) so we don't oversell.What's in the file
.env/~/.e2a/config.jsonlookup order).POST /api/v1/sendexample with the correct JSON field names (body/html_body, nottext) and anIdempotency-Keyexample.202 pending_approvalsection so agents handle it correctly instead of retrying and double-queueing.Test plan
npm run devfromweb/; confirmcurl http://localhost:3000/auth.mdreturns the file withContent-Type: text/markdown(ortext/plain— fine either way for the use case).curl https://e2a.dev/auth.mdreturns the file once the static export deploys.POST /api/v1/sendactually accepts (you can hit Mailpit locally viamake docker-up+make run, or just spot-check against internal/outbound/sender.go — the JSON tags are the source of truth).https://e2a.dev/.well-known/oauth-authorization-server) returns the AS metadata in prod after deploy.Not in scope (follow-ups)
/.well-known/oauth-protected-resourceandresource_metadata="..."to the 401 challenge (TODO already exists in internal/agent/api.gowriteAuthError)./agent/authitself with the three flows (anonymous,identity_assertion + verified_email,identity_assertion + id-jag). The doc declares the direction; a separate design pass referencing the WorkOS reference implementation should precede the build.🤖 Generated with Claude Code