OAuth 2.1 PKCE S256 Checklist: Exact Redirects, S256 & Token Security
Validate Authorization Code + PKCE S256 enforcement, exact redirect_uri string matching, sender-constrained refresh tokens, and deprecated OAuth 2.0 flow removal.
Score your SaaS authentication stack across 10 SOC 2 CC6.1/CC6.2 controls (PKCE S256, OIDC, Passkeys, __Host- cookies, COOP/CSP, DMARC, rotation) and export auditor evidence.
Legacy Implicit Flow (response_type=token / id_token) exposes access tokens in URL fragments & browser history — deprecated in OAuth 2.1.
https://auth.acme.example.com/oauth2/authorize?client_id=web_oauth21_client&response_type=code&redirect_uri=https%3A%2F%2Fapp.acme.example.com%2Fauth%2Fcallback&scope=openid+profile+email+mcp%3Atools&state=csprng_256bit_opaque_state_token&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256
# 1. User returns with ?code=AUTH_CODE&state=csprng_256bit_opaque_state_token # 2. Exchange authorization_code + PKCE code_verifier (HTTPS POST, zero Implicit fragments): curl -fsS -X POST "https://auth.acme.example.com/oauth2/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "grant_type=authorization_code" \ --data-urlencode "client_id=web_oauth21_client" \ --data-urlencode "code=AUTH_CODE" \ --data-urlencode "redirect_uri=https://app.acme.example.com/auth/callback" \ --data-urlencode "code_verifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
# AuthPosture Readiness & SOC 2 CC6.1 Evidence Summary — acme.example.com - **Score / Grade:** 70/100 (B-) · Status: WARN - **NIST SP 800-63B Target:** NIST SP 800-63B AAL2 (Multi-Factor / Enterprise SaaS) - **Max Reauth Windows:** Idle <= 60 min · Absolute <= 12 hours - **OIDC Issuer:** https://auth.acme.example.com - **Passed Controls (7/10):** OAuth 2.1 §4.1.1, OAuth 2.1 §2.1, OAuth 2.1 §2.3, OIDC Core / JWT, RFC 6265bis, COOP / CSP, SOC 2 CC6.1 - **Open Auth Gaps (3):** - [ ] [RFC 9728 / MCP] Published /.well-known/oauth-protected-resource + WWW-Auth (+10 pts) - [ ] [WebAuthn / AAL3] Passkeys (FIDO2/WebAuthn) + /.well-known/passkey-endpoints (+12 pts) - [ ] [DMARC / SPF] Magic-link / OTP subdomain with DMARC p=reject + SPF -all (+8 pts) ## Live Verification & Fix Pack - Audit live domain: https://auth.runglab.dev/?domain=acme.example.com&ref=tool-auth-hub ($39 AuthPosture Fix Pack) - API Hub & MCP: https://hub.runglab.dev & dev.runglab/devtools (https://mcp-server.runglab.dev/mcp)
Run an automated live authentication probe on AuthPosture (auth.runglab.dev) or integrate fleet checks via RungLab Hub API (hub.runglab.dev) and Official MCP Server dev.runglab/devtools — or ship the $39 AuthPosture Fix Pack (tailored OIDC & PKCE S256 patches, RFC 9728 MCP metadata, /.well-known/passkey-endpoints, __Host- cookie rules, COOP/CSP login headers, magic-link DMARC/SPF, and SOC 2 CC6.1 / NIST 800-63B CI gate). Prefer PayPal invoicing? Email [email protected].
| Control / Header | Hardened Baseline | Security & Compliance Rationale |
|---|---|---|
SOC 2 CC6.1 |
Logical Access Security & MFA |
Enforces strong multi-factor/passkey authentication, encryption in transit, and bounded session TTLs |
SOC 2 CC6.2 |
Credential Provisioning & Registration |
Enforces exact redirect URIs, secure onboarding tokens, and automated credential rotation |
SOC 2 CC6.3 |
Authorization & Least Privilege |
Scoped OAuth 2.1 tokens + RFC 9728 audience enforcement for APIs & MCP endpoints |
CC6.6 / CC6.7 |
Boundary Protection & Anti-Spoofing |
Login CSP frame-ancestors 'none', COOP isolation, __Host- cookies & DMARC p=reject |
# SOC 2 CC6.1 Authentication Posture Evidence
1. /.well-known/openid-configuration -> PKCE S256 only, zero Implicit ('token'), ES256/RS256 only
2. /.well-known/passkey-endpoints -> WebAuthn userVerification=required enabled for MFA/admin
3. Set-Cookie -> __Host- prefix, Secure, HttpOnly, SameSite=Lax, <=12h AAL2 session lifetime
4. /login headers -> CSP frame-ancestors 'none', XFO DENY, COOP same-origin, Referrer-Policy no-referrer
5. DNS -> DMARC p=reject + SPF -all on auth-mail subdomain
# Verify live AuthPosture & download SOC 2 CC6.1 evidence pack # Interactive UI: https://auth.runglab.dev ($39 AuthPosture Fix Pack) # REST & MCP Automation: https://hub.runglab.dev & dev.runglab/devtools
Validate Authorization Code + PKCE S256 enforcement, exact redirect_uri string matching, sender-constrained refresh tokens, and deprecated OAuth 2.0 flow removal.
Lint OpenID Connect discovery JSON for HTTPS issuers, S256-only PKCE, disabled Implicit response_types, asymmetric JWT algs (ES256/RS256), and RFC 7009 revocation.
Generate compliant RFC 9728 /.well-known/oauth-protected-resource manifests and 401 WWW-Authenticate challenges for remote Streamable HTTP MCP servers and APIs.
Generate FIDO Alliance /.well-known/passkey-endpoints JSON and hardened WebAuthn PublicKeyCredential RP policies requiring residentKey and userVerification.
Validate Set-Cookie headers against RFC 6265bis __Host- rules (Secure, Path=/, zero Domain= attribute), HttpOnly XSS defense, SameSite CSRF protection, and bounded Max-Age.
Generate hardened login-route HTTP response headers combining Cross-Origin-Opener-Policy, CSP frame-ancestors 'none', X-Frame-Options: DENY, Referrer-Policy: no-referrer, and Cache-Control: no-store.
← Back to AuthPosture Hub · AuthPosture ($39 Fix Pack) → · hub.runglab.dev → · dev.runglab/devtools →
CC6.1 (logical access & MFA), CC6.2 (registration & provisioning), CC6.3 (role/scope authorization), and CC6.6 (boundary protection against interception and clickjacking).
Yes — pair Cluster 18 with Cluster 13 (/soc2-trust-center/) and TrustReady (https://trust.runglab.dev) plus live checks at https://auth.runglab.dev.
Use the $39 AuthPosture Fix Pack CI guard from https://auth.runglab.dev or integrate RungLab via https://hub.runglab.dev and dev.runglab/devtools.