Community코딩 & 개발github.com

mianhtsys/landingMod3

JWT, OAuth2, 세션 관리, RBAC 등 인증 및 권한 부여 패턴을 마스터하여 안전하고 확장 가능한 접근 제어 시스템을 구축합니다. 인증 시스템 구현, API 보안, 보안 문제 디버깅 시 사용하세요.

landingMod3란 무엇인가요?

이 스킬은 개발자가 안전하고 확장 가능한 인증(Authentication) 및 권한 부여(Authorization) 시스템을 구축하는 데 필요한 포괄적인 지침과 패턴을 제공합니다. JWT, OAuth2, 세션 기반 인증, 역할 기반 접근 제어(RBAC) 등 주요 인증 전략을 다루며, 각 전략의 장단점과 적절한 사용 사례를 설명합니다. REST 또는 GraphQL API 보안, 소셜 로그인 통합, SSO, 멀티 테넌시 환경에서의 인증 구현 등 다양한 시나리오를 지원합니다. 또한 안전한 비밀번호 저장, 토큰 만료 설정, CSRF 보호, 속도 제한 등 실무에서 꼭 지켜야 할 보안 모범 사례와 일반적인 함정을 상세히 다루어, 실제 프로젝트에서 발생할 수 있는 보안 취약점을 사전에 방지할 수 있도록 돕습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mianhtsys/landingMod3/tree/HEAD/MODULO_3_DESARROLLO_AL_LADO_DEL_CLIENTE_Y_SERVIDOR_WEB/architecture-skills-framework/.agents/skills/auth-implementation-patterns

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

인증 및 권한 부여 구현 패턴

업계 표준 패턴과 현대적 모범 사례를 사용하여 안전하고 확장 가능한 인증 및 권한 부여 시스템을 구축합니다.

이 스킬을 사용해야 할 때

  • 사용자 인증 시스템 구현
  • REST 또는 GraphQL API 보안
  • OAuth2/소셜 로그인 추가
  • 역할 기반 접근 제어(RBAC) 구현
  • 세션 관리 설계
  • 인증 시스템 마이그레이션
  • 인증 문제 디버깅
  • SSO 또는 멀티 테넌시 구현

핵심 개념

1. 인증(Authentication) vs 권한 부여(Authorization)

인증(AuthN): 당신은 누구인가요?

  • 신원 확인(사용자명/비밀번호, OAuth, 생체 인식)
  • 자격 증명 발급(세션, 토큰)
  • 로그인/로그아웃 관리

권한 부여(AuthZ): 무엇을 할 수 있나요?

  • 권한 확인
  • 역할 기반 접근 제어(RBAC)
  • 리소스 소유권 검증
  • 정책 시행

2. 인증 전략

세션 기반:

  • 서버가 세션 상태 저장
  • 세션 ID를 쿠키에 저장
  • 전통적이고 간단하며 상태 유지

토큰 기반(JWT):

  • 상태 비저장, 자체 포함
  • 수평적 확장 가능
  • 클레임 저장 가능

OAuth2/OpenID Connect:

  • 인증 위임
  • 소셜 로그인(Google, GitHub)
  • 엔터프라이즈 SSO

상세 패턴 및 실제 예제

상세 패턴 문서는 references/details.md에 있습니다. 위 탐색 계층만으로 충분하지 않을 때 해당 파일을 읽으세요.

모범 사례

  1. 절대 일반 비밀번호를 저장하지 마세요: 항상 bcrypt/argon2로 해싱
  2. HTTPS 사용: 전송 중 데이터 암호화
  3. 짧은 수명의 액세스 토큰: 최대 15-30분
  4. 안전한 쿠키: httpOnly, secure, sameSite 플래그
  5. 모든 입력 검증: 이메일 형식, 비밀번호 강도
  6. 인증 엔드포인트 속도 제한: 무차별 대입 공격 방지
  7. CSRF 보호 구현: 세션 기반 인증의 경우
  8. 비밀 정기적으로 교체: JWT 비밀, 세션 비밀
  9. 보안 이벤트 기록: 로그인 시도, 실패한 인증
  10. 가능하면 MFA 사용: 추가 보안 계층

일반적인 함정

  • 약한 비밀번호: 강력한 비밀번호 정책 시행
  • localStorage에 JWT 저장: XSS에 취약, httpOnly 쿠키 사용
  • 토큰 만료 없음: 토큰은 만료되어야 함
  • 클라이언트 측 인증 확인만: 항상 서버 측에서 검증
  • 안전하지 않은 비밀번호 재설정: 만료 시간이 있는 보안 토큰 사용
  • 속도 제한 없음: 무차별 대입 공격에 취약
  • 클라이언트 데이터 신뢰: 항상 서버에서 검증

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mianhtsys/landingMod3

Implement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.

mianhtsys/landingMod3

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

mianhtsys/landingMod3

Diseña y compara alternativas arquitectónicas trazables a RF/RNF sin implementar código.

mianhtsys/landingMod3

Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.

mianhtsys/landingMod3

Revisión adversarial de la arquitectura contra RF/RNF, detectando contradicciones, cobertura faltante y complejidad innecesaria.

mianhtsys/landingMod3

>- Generate grounded-and-verified, engine-agnostic database documentation that reaches 100% parity with the real schema. Introspects the LIVE database as ground truth and cross-validates it against ORM models, migrations, generated types, seeds, and application queries, then proves completeness by diffing the docs back against the database. Produces ER diagrams (mermaid), per-table data dictionaries, and a machine-readable schema.json. Works with PostgreSQL, MySQL, SQL Server, and SQLite across any ORM (Prisma, TypeORM, Drizzle, Sequelize, Knex, Django, Rails) or raw SQL. Use when asked to document a database, produce an ERD or data dictionary, write db/schema docs, audit schema drift, or refresh existing DB docs.

mianhtsys/landingMod3

Compara estrategias de persistencia y motores de datos según consistencia, concurrencia, volumen, recuperación y operación.

mianhtsys/landingMod3

Design robust, scalable database schemas for SQL and NoSQL databases. Provides normalization guidelines, indexing strategies, migration patterns, constraint design, and performance optimization. Ensures data integrity, query performance, and maintainable data models.

mianhtsys/landingMod3

Consolida análisis especializados en una recomendación arquitectónica, matriz de decisión, ADR y plan de validación.

mianhtsys/landingMod3

Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.

mianhtsys/landingMod3

Build and maintain web frontends — component architecture, state management, API integration, responsive layout, client-side performance, and frontend testing patterns. Framework agnostic, focused on web frontend implementation. Do not use for backend service implementation, data engineering, or platform infrastructure work.

mianhtsys/landingMod3

Evalúa despliegue, contenedores, escalado, alta disponibilidad, observabilidad, backup, recuperación y CI/CD de forma proporcional.

mianhtsys/landingMod3

Execute read-only SQL queries against multiple Microsoft SQL Server databases. Use when: (1) querying MSSQL/SQL Server databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.

mianhtsys/landingMod3

Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.

mianhtsys/landingMod3

PHP 8.0+ development — XAMPP, RESTful APIs, PDO/MySQL/MariaDB, and authentication. Use when building PHP backends, creating API endpoints, configuring XAMPP, or integrating PHP with databases.

mianhtsys/landingMod3

Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features

mianhtsys/landingMod3

Analiza requisitos funcionales y no funcionales, reglas, restricciones, capacidad y ambigüedades antes de seleccionar tecnologías.

mianhtsys/landingMod3

Implement modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first breakpoint strategies. Use when building adaptive interfaces, implementing fluid layouts, or creating component-level responsive behavior.

mianhtsys/landingMod3

>- Use when designing or implementing software securely: define security requirements, threat-model a feature, choose secure defaults, design authentication and authorization, handle untrusted data and secrets, evaluate dependencies, design multi-tenant trust boundaries, or review security-sensitive changes. Use for prevention during requirements, design, implementation, and review; not for post-build security assessments or scanning an existing codebase.

mianhtsys/landingMod3

Revisa seguridad arquitectónica, identidad, autorización, secretos, APIs, auditoría, fraude y resiliencia antes de implementar.

관련 스킬