auth-implementation-patterns
하는 일
이 도구는 사용자가 누구인지 안전하게 확인하는 방법(인증)과 시스템에서 무엇을 할 수 있는지 정하는 방법(인가)을 이해하고 구현하도록 돕습니다. 비밀번호, 소셜 로그인, 그룹 기반 접근 제어 같은 방법을 다룹니다.
사용하는 경우
- ✓웹사이트나 앱의 로그인 시스템을 만들 때.
- ✓데이터나 기능에 대한 접근을 보호할 때.
- ✓사용자가 무언가에 접근할 수 없는 이유를 이해하려는 경우.
스킬 링크
https://github.com/wshobson/agents/blob/main/plugins/developer-essentials/skills/auth-implementation-patterns/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“관리자만 특정 보고서를 볼 수 있게 하려면 어떻게 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
인증(당신이 누구인지)과 인가(인증 후 무엇을 할 수 있는지)라는 개념을 설명합니다. 접근을 관리하기 위해 토큰(JWT)이나 세션을 쓰는 패턴을 가르치고 보안 팁을 제공합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Authentication & Authorization Implementation Patterns
Build secure, scalable authentication and authorization systems using industry-standard patterns and modern best practices.
When to Use This Skill
- Implementing user authentication systems
- Securing REST or GraphQL APIs
- Adding OAuth2/social login
- Implementing role-based access control (RBAC)
- Designing session management
- Migrating authentication systems
- Debugging auth issues
- Implementing SSO or multi-tenancy
Core Concepts
1. Authentication vs Authorization
Authentication (AuthN): Who are you?
- Verifying identity (username/password, OAuth, biometrics)
- Issuing credentials (sessions, tokens)
- Managing login/logout
Authorization (AuthZ): What can you do?
- Permission checking
- Role-based access control (RBAC)
- Resource ownership validation
- Policy enforcement
2. Authentication Strategies
Session-Based:
- Server stores session state
- Session ID in cookie
- Traditional, simple, stateful
Token-Based (JWT):
- Stateless, self-contained
- Scales horizontally
- Can store claims
OAuth2/OpenID Connect:
- Delegate authentication
- Social login (Google, GitHub)
- Enterprise SSO
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
- Never Store Plain Passwords: Always hash with bcrypt/argon2
- Use HTTPS: Encrypt data in transit
- Short-Lived Access Tokens: 15-30 minutes max
- Secure Cookies: httpOnly, secure, sameSite flags
- Validate All Input: Email format, password strength
- Rate Limit Auth Endpoints: Prevent brute force attacks
- Implement CSRF Protection: For session-based auth
- Rotate Secrets Regularly: JWT secrets, session secrets
- Log Security Events: Login attempts, failed auth
- Use MFA When Possible: Extra security layer
Common Pitfalls
- Weak Passwords: Enforce strong password policies
- JWT in localStorage: Vulnerable to XSS, use httpOnly cookies
- No Token Expiration: Tokens should expire
- Client-Side Auth Checks Only: Always validate server-side
- Insecure Password Reset: Use secure tokens with expiration
- No Rate Limiting: Vulnerable to brute force
- Trusting Client Data: Always validate on server
자주 묻는 질문
인증과 인가는 무엇이 다른가요?
인증은 당신이 누구인지 증명하는 것입니다(예: 사용자 이름과 비밀번호). 인가는 인증을 마친 뒤 무엇을 할 수 있는지(예: 무엇을 보거나 수정할 수 있는지)입니다.
JWT란 무엇인가요?
JWT(JSON Web Token)는 당사자 사이에서 정보를 안전하게 주고받는 방법입니다. 로그인 후 사용자가 받는 통행증과 같아서, 시스템이 매번 데이터베이스를 확인하지 않아도 그가 누구인지 알 수 있습니다.
비밀번호를 평문으로 저장하면 왜 안 되나요?
평문 저장은 매우 위험합니다. 누군가 시스템에 침입하면 모든 비밀번호를 얻게 됩니다. 비밀번호는 읽을 수 없도록 '해시'(뒤섞기)해야 합니다.
상세 정보
작성자의 원본 설명
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.
repo: wshobson/agents
인기도
- GitHub 스타
- 41k
- 순위
- #6674
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
screen-reader-testing
41k에이전트가 스크린 리더로 웹사이트를 테스트해 접근성을 확인하도록 돕습니다.
wcag-audit-patterns
41k에이전트가 WCAG 지침에 따라 웹사이트의 접근성을 감사하고 문제를 고치도록 돕습니다.
multi-reviewer-patterns
41k에이전트가 병렬 코드 리뷰를 조율하고, 중복된 발견 사항을 정리하며, 보고서를 통합하도록 돕습니다.
parallel-debugging
41k에이전트가 병렬 조사와 근본 원인 분석으로 복잡한 문제를 디버그하도록 돕습니다.