本文へ移動
cccskills
無料GitHub で公開

mfa-setup

MFA/2FA implementation: TOTP, WebAuthn/Passkeys, SMS OTP, backup codes, recovery, step-up auth.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcaneスター 3(GitHub 3 + cccskills 0)
連携ツールRedis

実行スコア 未検証

インストール方法を見る

含まれるファイル(6)

  • SKILL.md4.9 KB
  • references/anti-patterns.md507 B
  • references/checklist.md771 B
  • references/rate-limiting.md385 B
  • references/role-rules.md437 B
  • references/schema-db.md489 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

MFA Setup — Educabot

MFA para productos Educabot (docentes, admins, alumnos). WebAuthn/Passkeys preferido, TOTP universal, SMS solo recovery.

Cuándo usar / NO usar

UsarNO usar
Agregar 2FA a backend Go o Node/TSSolo login social (OAuth) sin factor adicional
Integrar Passkeys en web (React+Vite) o mobile (RN)Apps consumer alumnos menores sin datos sensibles
Diseñar enrolamiento, verificación, recoveryMagic links como único factor (passwordless ≠ MFA)
Schema DB para credenciales MFA
Step-up auth en endpoints sensibles

Factores

FactorRecomendadoRiesgoLibrería
WebAuthn/PasskeysSí (preferido 2026+)Bajo@simplewebauthn/server, go-webauthn/webauthn
TOTP (RFC 6238)Sí (default universal)Medio (phishable)otplib (Node), pquerna/otp (Go)
SMS OTPSolo recoveryAlto (SIM swap)Twilio Verify, MessageBird
Backup codesObligatorioBajo si hash correctocustom + Argon2id

Regla Educabot: admins+docentes MFA obligatorio (mínimo TOTP/Passkey). Alumnos adultos opcional. Menores: NO SMS, solo TOTP/Passkey parental.

TOTP

  • Enrolamiento: generar secret BASE32, guardar encriptado (AES-256-GCM + KMS, nunca en claro). Generar otpauth:// URI → QR. Confirmar enrolamiento solo cuando user ingrese código válido.
  • Go: pquerna/otp — totp.Generate() con Issuer "Educabot", Period 30, DigitsSix, AlgorithmSHA1 (compatible Google Authenticator)
  • TS: otplib — authenticator.generateSecret() + keyuri() + QR via qrcode
  • Verificación: window ±1 step (30s) por drift. NO mayor.

WebAuthn / Passkeys

  • Registro: generateRegistrationOptions (rpName "Educabot", rpID "educabot.com", attestationType "none", residentKey "preferred"). Guardar challenge en sesión/Redis TTL 5min. Verificar response → guardar credentialID, publicKey, counter.
  • Login: generateAuthenticationOptions + verifyAuthenticationResponse. Actualizar counter cada uso (detecta clonado).
  • Cross-device: Passkeys sincronizan vía iCloud Keychain / Google Password Manager. Solo guardar public key + credentialID.

SMS OTP (solo recovery)

Twilio Verify para envío/verificación. Nunca factor primario. Nunca menores. Rate limit: 3 SMS/hora por número.

Backup codes

Generar 10 códigos, mostrar UNA VEZ. Guardar solo hash Argon2id. Al usar: verificar hash, marcar used_at, invalidar. Si quedan <3 → avisar para regenerar.

Recovery flow

  1. "No tengo acceso a mi 2FA" → email + 1 backup code válido
  2. Link recovery al email (TTL 15min, single-use)
  3. Confirma → desactivar MFA → forzar re-enrolamiento
  • NO preguntas secretas. Log detallado + alerta seguridad. Sin backup ni email → validación identidad manual (institución admin).

Step-up auth

Requerir MFA aunque sesión activa para: cambio email/password/phone, export datos (LGPD/GDPR), eliminación cuenta, cambios permisos, acceso PII alumnos. Middleware verifica lastMfaTimestamp contra maxAge.

Rate limiting

Rate limit en todos los endpoints MFA con Redis sliding window.

→ Read references/rate-limiting.md for límites y lockout por endpoint

Schema DB

Tablas: user_mfa, mfa_backup_codes, mfa_events.

→ Read references/schema-db.md for esquema detallado de cada tabla

Reglas por rol

Admins+docentes obligatorio, alumnos adultos opcional, menores nunca SMS.

→ Read references/role-rules.md for tabla detallada por rol con métodos y step-up maxAge

Anti-patterns

→ Read references/anti-patterns.md for lista completa (13 items)

Delegación

  • /scaffold-go — scaffold endpoints Go
  • /doc-rfc — documentar decisión técnica
  • /deploy-check — checklist pre-deploy
  • /audit-dev — auditar seguridad del flujo

Checklist

→ Read references/checklist.md for checklist completo (15 items)

  • Factor selection justified per user role (WebAuthn preferred, TOTP universal, SMS recovery-only)
  • Recovery flow designed with backup codes and email verification
  • Rate limits configured on all MFA verification endpoints (Redis sliding window)
  • Backup codes generated, shown once, and stored as Argon2id hashes
  • Step-up auth configured for sensitive operations (change email, export data, delete account)
  • TOTP secrets encrypted at rest (AES-256-GCM + KMS, never stored in plaintext)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

日本語の概要は準備中です。原文の説明を表示しています。

SebastianLuser/claude-code-arcane32026年10月27日 更新

SebastianLuser のスキルをすべて見る

このスキルの問題を報告する