# AuthPosture by RungLab

> Instant **OAuth 2.1, OIDC PKCE S256, RFC 9728 MCP Auth, WebAuthn Passkey & Session Cookie Security Auditor** + **$39 Fix Pack** (6 production-ready Gap Report, OAuth 2.1/RFC 9728 JSON, __Host- Cookie & Headers, Passkey Rollout, DMARC/SPF DNS & Node ESM CI Guard files).

AuthPosture audits any public website URL via an SSRF-hardened Cloudflare Worker (`<= 20` subrequests, fail-closed DoH IP checks blocking private/NAT64/IPv4-mapped/IMDS ranges, 4.5s timeout, 512 KiB HTML cap, max 4 redirects) or analyzes pasted OIDC discovery JSON, RFC 9728 metadata, raw HTTP response headers with `Set-Cookie`, and login HTML with **zero outbound requests** (`POST /api/audit-html`).

## Endpoints & Product
- [AuthPosture Web App](https://auth.runglab.dev/): Live URL scanner, Paste Artifacts mode, OAuth 2.1 / Passkey Readiness Lab, Before->After `$39` Fix Pack uplift card & 6-file sample preview modal
- [API Health](https://auth-api.runglab.dev/health): `{ ok: true, service: "authposture-api", version: "1.0.0" }`
- [Live Audit API (GET)](https://auth-api.runglab.dev/api/audit?url=https://github.com): Returns 0..100 posture score, Grade `A+..F`, 6 checks, findings `AUTH-001..AUTH-016`, and `beforeAfterUplift`
- [Paste Artifacts Audit API (POST)](https://auth-api.runglab.dev/api/audit-html): Zero-network analysis accepting `{ url?, oidcJson?, protectedResourceJson?, passkeyEndpointsJson?, headers?, setCookie?, html? }`
- [AuthPosture $39 6-File Fix Pack (Creem)](https://www.creem.io/product/prod_4coGvBvXYsjQ9lwgSTvig3): One-time `$39` pack (`01-auth-posture-gap-report.md`, `02-oauth21-oidc-pkce-hardening.json`, `03-session-cookie-and-headers-config.md`, `04-passkey-webauthn-rollout.md`, `05-magic-link-dmarc-spf-dns.txt`, `06-ci-auth-posture-guard.mjs`)

## 100-Point Authentication Security Rubric (6 Deterministic Checks)
- **Check 1 — OIDC / OAuth 2.1 Discovery & PKCE S256 Enforcement (20 pts)**: Checks `/.well-known/openid-configuration` or `/.well-known/oauth-authorization-server` (`code_challenge_methods_supported` includes `S256`, no deprecated implicit `token` in `response_types_supported`, HTTPS `jwks_uri` & `issuer`).
- **Check 2 — RFC 9728 OAuth Protected Resource & MCP Auth Readiness (15 pts)**: `/.well-known/oauth-protected-resource` valid JSON with HTTPS `resource`, `authorization_servers`, header bearer & scopes.
- **Check 3 — Passkey / WebAuthn & Password UX Standards (15 pts)**: `/.well-known/passkey-endpoints` (`enroll`/`manage`), `/.well-known/change-password`, and login HTML `autocomplete="webauthn"`/`current-password`.
- **Check 4 — Session Cookie & Cross-Origin Isolation (20 pts)**: Inspects `Set-Cookie` (`__Host-`/`__Secure-`, `HttpOnly`, `Secure`, `SameSite=Lax|Strict`), `Cross-Origin-Opener-Policy` (`same-origin` or `same-origin-allow-popups`) & `Cache-Control: no-store`.
- **Check 5 — Auth Transport & Clickjacking Defense (20 pts)**: HTTPS, HSTS (`>= 15552000`), CSP `frame-ancestors` or `X-Frame-Options`, `X-Content-Type-Options: nosniff`, `Referrer-Policy` (`no-referrer` or `strict-origin-when-cross-origin`).
- **Check 6 — Anti-Phishing DNS for Reset/Magic-Link Emails (10 pts)**: DoH `CAA`, `DMARC` (`p=quarantine|reject`), valid single `SPF` with organizational domain inheritance.

## Machine-Readable Discovery & Docs
- [Documentation & Quickstart](https://auth.runglab.dev/docs): cURL, TypeScript & Python examples (`https://auth.runglab.dev/sdk`)
- [Pricing & Quotas](https://auth.runglab.dev/pricing): USD pricing & rate limits (`https://auth.runglab.dev/api/pricing`)
- [AGENTS.md](https://auth.runglab.dev/AGENTS.md) · [MCP Discovery](https://auth.runglab.dev/.well-known/mcp.json) · [MCP Server Card](https://auth.runglab.dev/.well-known/mcp/server-card.json) · [AgentHermes](https://auth.runglab.dev/.well-known/agent-hermes.json)
- [OpenAPI 3.1](https://auth.runglab.dev/openapi.json) · [Auth Policy](https://auth.runglab.dev/auth.md) · [OIDC Discovery](https://auth.runglab.dev/.well-known/openid-configuration) · [RFC 9728](https://auth.runglab.dev/.well-known/oauth-protected-resource) · [Status](https://auth.runglab.dev/status) · [SLA](https://auth.runglab.dev/sla) · [Support](https://auth.runglab.dev/support)
