# auth.md

Agent authentication and registration for **办公AI导航** (`https://office.mcppla.net`).

This site does **not** issue OAuth tokens or enroll third-party agents. RFC 8414 / RFC 9728 discovery JSON documents the chat proxy boundary only. Use this document as the authoritative discovery source (passive scan only; do not probe reserved `/oauth/*` flows).

## Agent audience

- **Catalog agents** — Baidu agent platform, ChatGPT-style plugins, and other integrations that call the public OpenAPI surface (`/.well-known/openapi.yaml`, `/.well-known/ai-plugin.json`).
- **Retrieval / GEO crawlers** — systems that consume `/api/tools.json`, `/llms.txt`, `/llms-full.txt`, RSS, and sitemap for grounding or indexing.
- **In-site chat assistant** — the browser chat widget on `https://office.mcppla.net` only (not a third-party agent API).

## Registration and provisioning

| Capability | Registration URI | Method | Notes |
| --- | --- | --- | --- |
| Tool directory & plugin manifest | _(none)_ | **Anonymous** | No signup, API key, or token exchange. Read-only `GET` endpoints are open. |
| Site-origin chat (`/api/chat`) | _(none)_ | **Not available to external agents** | Credentials are provisioned for the first-party web widget; there is no public agent enrollment. |

There is no `register_uri` on this host. For partnership or data-licensing questions, email **support@mcppla.net**.

## Endpoints and credentials

### Public (no authentication)

These endpoints are intended for agents and crawlers without credentials:

- `GET https://office.mcppla.net/api/tools` — Baidu/OpenAPI-compatible catalog (query: `category`, optional `keyword` / `query`)
- `GET https://office.mcppla.net/api/tools.json` — full machine-readable catalog JSON
- `GET https://office.mcppla.net/api/categories/{id}.json` — per-category JSON (`office`, `text`, `image`, `media`, `fun`, `general`, `all`)
- `GET https://office.mcppla.net/.well-known/ai-plugin.json` — plugin manifest (`auth.type`: `none`)
- `GET https://office.mcppla.net/.well-known/agent-card.json` — A2A v1.0 Agent Card（目录发现面；`supportedInterfaces` 指向 HTTP+JSON 目录 API）
- `GET https://office.mcppla.net/.well-known/openapi.yaml` — OpenAPI 3.0.1 for `getOfficeAiTools`
- `GET https://office.mcppla.net/llms.txt`, `GET https://office.mcppla.net/llms-full.txt` — LLM-oriented site summaries

**Credential use:** none. Send unauthenticated `GET` requests. `Authorization` headers are ignored for these resources.

### Restricted (not for external agents)

- `POST https://office.mcppla.net/api/chat` — proxied chat completions (Volcengine Ark).

  **Credential use:** `Authorization: Bearer <token>` when called from allowed browser origins (`https://office.mcppla.net`, local dev, Netlify preview hosts). CORS and same-origin policy block typical server-side agent calls. API keys are not issued to third-party agents via this site.

## OAuth and Protected Resource Metadata

Machine-readable discovery for the protected chat API (`POST https://office.mcppla.net/api/chat`):

- Protected Resource Metadata (RFC 9728): `GET https://office.mcppla.net/.well-known/oauth-protected-resource`
- Authorization Server metadata (RFC 8414): `GET https://office.mcppla.net/.well-known/oauth-authorization-server`

`resource` in the PRM document is `https://office.mcppla.net/api/chat`. `authorization_servers` lists `https://office.mcppla.net` (must match the AS `issuer` field). Supported scope for chat: `chat:completions` (`bearer_methods_supported`: `header`).

**Important:** Catalog APIs remain anonymous. OAuth metadata describes how to authenticate to the chat proxy only. Third-party agents are not enrolled for chat tokens on this host; see [Volcengine Ark](https://www.volcengine.com/) for upstream API access.

## Related discovery

- OAuth PRM: https://office.mcppla.net/.well-known/oauth-protected-resource
- OAuth AS: https://office.mcppla.net/.well-known/oauth-authorization-server
- Plugin manifest: https://office.mcppla.net/.well-known/ai-plugin.json
- A2A Agent Card: https://office.mcppla.net/.well-known/agent-card.json
- OpenAPI: https://office.mcppla.net/.well-known/openapi.yaml
- Web Bot Auth JWKS: https://office.mcppla.net/.well-known/http-message-signatures-directory
- About / policy context: https://office.mcppla.net/about.html
- Sitemap: https://office.mcppla.net/sitemap.xml

## Web Bot Auth (outbound bot identity)

Passive discovery on this host: `GET https://office.mcppla.net/.well-known/http-message-signatures-directory` publishes an Ed25519 JWKS (`application/http-message-signatures-directory+json`). This catalog is not a third-party crawler; outbound `Signature-Agent` / HTTP Message Signature headers are not sent. Override keys via `WEB_BOT_AUTH_PRIVATE_JWK` or `WEB_BOT_AUTH_PUBLIC_JWK` at build time when a signing agent is deployed.

Last updated: 2026-11-09.
