implementing-jwt-signing-and-verification — скилл для Claude Code
implementing-jwt-signing-and-verification — скилл для Claude Code, который помогает писать и проверять JWT. Подключается при настройке аутентификации или аудите проверки токенов.
Apache-2.0 294 установок ★ 36 511 обновлён 2026-08-31
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a claude-codeЧто делает implementing-jwt-signing-and-verification
Скилл помогает реализовать подпись и проверку JWT, проверить claims и настроить срок действия токена. Он описывает HS256, RS256, ES256 и EdDSA, а также защиту от подмены алгоритма, alg=none и внедрения ключа через заголовок JWK.
Материал охватывает проверку аудитории и времени начала действия токена, ротацию ключей с JWK Sets и создание middleware аутентификации. Для работы нужны Python 3.8+ с установленными зависимостями, знание основ криптографии и тестовая или лабораторная среда; тестирование требует соответствующего разрешения.
Какие задачи решает
- реализовать подпись JWT несколькими алгоритмами
- проверять подпись, claims и срок действия токена
- защититься от подмены алгоритма и
alg=none - настроить ротацию ключей через JWK Sets
Примеры запросов агенту
- Добавь в проект подпись и проверку JWT с HS256 и проверкой срока действия.
- Проверь код верификации токенов на обход через
alg=noneи подмену алгоритма. - Настрой проверку claims и ротацию ключей через JWK Sets.
Как установить implementing-jwt-signing-and-verification
1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a claude-code2Вручную: положить файлы
~/.claude/skills/implementing-jwt-signing-and-verification/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/implementing-jwt-signing-and-verification/
1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a codex2Вручную: положить файлы
.agents/skills/implementing-jwt-signing-and-verification/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a cursor2Вручную: положить файлы
.cursor/skills/implementing-jwt-signing-and-verification/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install mukul975/Anthropic-Cybersecurity-Skills skills/implementing-jwt-signing-and-verification2Вручную: положить файлы
.github/skills/implementing-jwt-signing-and-verification/SKILL.md1Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a gemini-cli2Командой платформы
gemini skills install https://github.com/mukul975/Anthropic-Cybersecurity-Skills --path skills/implementing-jwt-signing-and-verificationВручную: положить файлы
.devin/skills/implementing-jwt-signing-and-verification/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об implementing-jwt-signing-and-verification
Как установить implementing-jwt-signing-and-verification в Claude Code?
Выполни npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-jwt-signing-and-verification -a claude-code. Файл скилла находится по пути ~/.claude/skills/implementing-jwt-signing-and-verification/SKILL.md.
Что делает implementing-jwt-signing-and-verification?
Помогает реализовать подпись и проверку JWT, валидировать claims и срок действия, а также закрыть распространённые способы обхода проверки подписи.
Что нужно для работы implementing-jwt-signing-and-verification?
Нужны Python 3.8+ с установленными зависимостями, знание основ криптографии и тестовая или лабораторная среда. Для тестирования требуется соответствующее разрешение.
Исходный текст
SKILL.md · Apache-2.0
--- name: implementing-jwt-signing-and-verification description: >- Implements secure JWT (RFC 7519) signing and verification using HMAC-SHA256, RSA-PSS, ES256, and EdDSA, including token expiration, claims validation, and defenses against algorithm-confusion, none-algorithm, and key-injection attacks. Use when adding or hardening JWT-based authentication/authorization, or when auditing token verification code for common JWT vulnerabilities. domain: cybersecurity subdomain: cryptography tags: - cryptography - jwt - authentication - token-security - digital-signatures version: '1.0' author: mahipal license: Apache-2.0 nist_csf: - PR.DS-01 - PR.DS-02 - PR.DS-10 mitre_attack: - T1600 - T1573 - T1553 --- # Implementing JWT Signing and Verification ## Overview JSON Web Tokens (JWT) defined in RFC 7519 are compact, URL-safe tokens used for authentication and authorization in web applications. This skill covers implementing secure JWT signing with HMAC-SHA256, RSA-PSS, and EdDSA algorithms, along with verification, token expiration, claims validation, and defense against common JWT attacks (algorithm confusion, none algorithm, key injection). ## When to Use - When deploying or configuring implementing jwt signing and verification capabilities in your environment - When establishing security controls aligned to compliance requirements - When building or improving security architecture for this domain - When conducting security assessments that require this implementation ## Prerequisites - Familiarity with cryptography concepts and tools - Access to a test or lab environment for safe execution - Python 3.8+ with required dependencies installed - Appropriate authorization for any testing activities ## Objectives - Implement JWT signing with HS256, RS256, ES256, and EdDSA - Verify JWT signatures and validate standard claims - Implement token expiration, not-before, and audience validation - Defend against algorithm confusion and none algorithm attacks - Implement JWT key rotation with JWK Sets - Build a complete authentication middleware ## Key Concepts ### JWT Algorithms | Algorithm | Type | Key | Security Level | |-----------|------|-----|---------------| | HS256 | Symmetric (HMAC) | Shared secret | 128-bit | | RS256 | Asymmetric (RSA) | RSA key pair | 112-bit | | ES256 | Asymmetric (ECDSA) | P-256 key pair | 128-bit | | EdDSA | Asymmetric (Ed25519) | Ed25519 pair | 128-bit | ### Common JWT Attacks - **Algorithm confusion**: Switching from RS256 to HS256, using public key as HMAC secret - **None algorithm**: Setting alg=none to bypass signature verification - **Key injection**: Embedding key in JWK header - **Weak secrets**: Brute-forcing short HMAC secrets - **Token replay**: Reusing valid tokens without expiration ## Security Considerations - Always validate the algorithm header against an allowlist - Never accept alg=none in production - Use asymmetric algorithms (RS256, ES256) for distributed systems - Set short expiration times (15 min for access tokens) - Implement token refresh mechanism - Store secrets securely (not in source code) ## Validation Criteria - [ ] JWT signing produces valid tokens for all algorithms - [ ] Signature verification rejects tampered tokens - [ ] Expired tokens are rejected - [ ] Algorithm confusion attack is prevented - [ ] None algorithm is rejected - [ ] JWK key rotation works correctly - [ ] Claims validation enforces all required claims
© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills