administering-linux
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and…
Authentication, authorization, and API security implementation. Use when building user systems, protecting APIs, or implementing access control. Covers OAuth 2.1/OIDC, JWT patterns, sessions, Passkeys/WebAuthn, RBAC/ABAC/ReBAC, policy engines (OPA, Casbin, SpiceDB), managed auth
Claude Code
$ npx -y skills add ancoleman/ai-design-components --skill securing-authentication --agent claude-code
Codex
$ npx skills add ancoleman/ai-design-components --skill securing-authentication -a codex -y
Cursor
$ npx skills add ancoleman/ai-design-components --skill securing-authentication -a cursor -y
Gemini CLI
$ npx skills add ancoleman/ai-design-components --skill securing-authentication -a gemini-cli -y
GitHub Copilot
$ npx skills add ancoleman/ai-design-components --skill securing-authentication -a github-copilot -y
OpenCode
$ npx skills add ancoleman/ai-design-components --skill securing-authentication -a opencode -y
Windsurf
$ npx skills add ancoleman/ai-design-components --skill securing-authentication -a windsurf -y
name: securing-authentication description: Authentication, authorization, and API security implementation. Use when building user systems, protecting APIs, or implementing access control. Covers OAuth 2.1/OIDC, JWT patterns, sessions, Passkeys/WebAuthn, RBAC/ABAC/ReBAC, policy engines (OPA, Casbin, SpiceDB), managed auth (Clerk, Auth0), self-hosted (Keycloak, Ory), and API security best practices.
Implement modern authentication, authorization, and API security across Python, Rust, Go, and TypeScript.
Use this skill when:
┌─────────────────────────────────────────────────────────────┐ │ OAuth 2.1 MANDATORY REQUIREMENTS │ │ (RFC 9798 - 2025) │ ├─────────────────────────────────────────────────────────────┤ │ │ │ ✅ REQUIRED (Breaking Changes from OAuth 2.0) │ │ ├─ PKCE (Proof Key for Code Exchange) MANDATORY │ │ │ └─ S256 method (SHA-256), minimum entropy 43 chars │ │ ├─ Exact redirect URI matching │ │ │ └─ No wildcard matching, no substring matching │ │ ├─ Authorization code flow ONLY for public clients │ │ │ └─ All other flows require confidential client │ │ └─ TLS 1.2+ required for all endpoints │ │ │ │ ❌ REMOVED (No Longer Supported) │ │ ├─ Implicit grant (security vulnerabilities) │ │ ├─ Resource Owner Password Credentials grant │ │ │ └─ Use OAuth 2.0 Device Flow (RFC 8628) instead │ │ └─ Bearer token in query parameters │ │ └─ Must use Authorization header or POST body │ │ │ └─────────────────────────────────────────────────────────────┘
**Critical:** PKCE is now mandatory for ALL OAuth flows, not just public clients.
1. **EdDSA with Ed25519** (Recommended)
2. **ES256 (ECDSA with P-256)**
3. **RS256 (RSA)**
**NEVER allow `alg: none` or algorithm switching attacks.**
**Refresh token rotation:** Each refresh generates new access AND refresh tokens, invalidating the old refresh token.
{
"iss": "https://auth.example.com",
"sub": "user-id-123",
"aud": "api.example.com",
"exp": 1234567890,
"iat": 1234567890,
"jti": "unique-token-id",
"scope": "read:profile write:data"
}Algorithm: Argon2id Memory cost (m): 64 MB (65536 KiB) Time cost (t): 3 iterations Parallelism (p): 4 threads Salt length: 16 bytes (128 bits) Target hash time: 150-250ms
For concrete implementations, see `references/password-hashing.md`.
**Key Points:**
Passkeys provide phishing-resistant, passwordless authentication using FIDO2/WebAuthn.
For implementation guide, see `references/passkeys-webauthn.md`.
┌─────────────────────────────────────────────────────────────┐ │ Authorization Model Selection │ ├─────────────────────────────────────────────────────────────┤ │ │ │ Simple Roles (<20 roles) │ │ └─ RBAC with Casbin (embedded, any language) │ │ Example: Admin, User, Guest │ │ │ │ Complex Attribute Rules │ │ └─ ABAC with OPA or Cerbos │ │ Example: "Allow if user.clearance >= doc.level │ │ AND user.dept == doc.dept" │ │ │ │ Relationship-Based (Multi-Tenant, Collaborative) │ │ └─ ReBAC with SpiceDB (Zanzibar model) │ │ Example: "Can edit if member of doc's workspace │ │ AND workspace.plan includes feature" │ │ Use cases: Notion-like, GitHub-like
Comprehensive UI/UX and Backend component design skills for AI-assisted development with Claude
Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and…
Data pipelines, feature stores, and embedding generation for AI/ML systems. Use when building RAG pipelines, ML feature serving,…
Strategic guidance for designing modern data platforms, covering storage paradigms (data lake, warehouse, lakehouse), modeling…
Design cloud network architectures with VPC patterns, subnet strategies, zero trust principles, and hybrid connectivity. Use when…
Design comprehensive security architectures using defense-in-depth, zero trust principles, threat modeling (STRIDE, PASTA), and…
Assembles component outputs from AI Design Components skills into unified, production-ready component systems with validated…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.