Itinai.com llm large language model structure neural network f4a47649 bac3 4c47 9657 40c8c084d268 2
Itinai.com llm large language model structure neural network f4a47649 bac3 4c47 9657 40c8c084d268 2

WorkOS auth.md Simplifies Agent OAuth Registration

For years web authentication has assumed a human behind a browser: click a button, fill a form, verify an email, copy an API key and paste it elsewhere. That model breaks down when the user delegates work to an AI agent. Agents are already writing code, opening pull requests, triaging tickets, querying systems and updating records, yet most services still have no native way for an agent to register. The common workaround—handing the agent a raw API key or session token—creates credentials that are unscoped, hard to audit per session and impossible to revoke selectively.

The auth.md protocol solves this by providing an open, plain‑text description of how agents can register and receive scoped, auditable credentials. A service publishes a small markdown file at a well‑known location (for example service.com/auth.md) that lists the supported registration flows, available scopes and the endpoints used to issue, audit and revoke access. Because the file is plain text it works both as developer documentation and as a machine‑readable artifact that agents can fetch and interpret automatically.

Discovery is built on existing OAuth mechanisms. When an API call returns 401 the service includes a WWW‑Authenticate header pointing to the Protected Resource Metadata at /.well‑known/oauth‑protected‑resource. That document points to the Authorization Server metadata at /.well‑known/oauth‑authorization‑server, which contains an agent_auth block with the exact URLs for registration, claim and revocation, as well as the identity types the server accepts.

Two registration flows are defined. The agent verified flow relies on the agent’s identity provider (OpenAI, Anthropic, Cursor, etc.) to issue an ID‑JAG attestation. The agent posts that token to the service’s /agent/auth endpoint; the service verifies the signature against the provider’s JWKS, validates claims and returns credentials synchronously. No OTP, no email round‑trip and no human interaction are required. Access tokens issued this way do not include refresh tokens—the agent must present a fresh ID‑JAG to extend access.

The user claimed flow is OTP‑based and needs no provider participation. The agent can start anonymously, receive a credential with limited pre‑claim scopes and later upgrade it by having the user read a one‑time code sent to email. Alternatively, the agent can supply an email up front and withhold any credential until the OTP ceremony completes.

When credentials are issued the service matches the registration to an existing user by checking prior delegation records, then verified email, then falling back to JIT provisioning or rejection per policy. Standard audit events—registration created, claim requested, OTP generated, claim confirmed, registration expired and registration revoked—should be recorded, with iss, sub and agent_platform included for ID‑JAG flows to correlate with provider logs.

Implementation checklist: publish auth.md, publish the protected resource and authorization server metadata, return WWW‑Authenticate on every 401, implement the /agent/auth endpoint handling both anonymous and identity_assertion types, add the OTP claim endpoints for the user claimed flow, maintain a trusted provider list and verify ID‑JAG signatures with replay protection.

This approach gives agents scoped, independently revocable credentials, provides clear audit trails and eliminates the need for insecure API key sharing.

#AI #Product #Auth #Security #DevOps #OpenSource

Itinai.com office ai background high tech quantum computing 0002ba7c e3d6 4fd7 abd6 cfe4e5f08aeb 0

Vladimir Dyachkov, Ph.D
Editor-in-Chief itinai.com

I believe that AI is only as powerful as the human insight guiding it.