본문으로 건너뛰기
Skillpedia
보안41k · #6674

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/developer-essentials/skills/auth-implementation-patterns/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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

  1. Never Store Plain Passwords: Always hash with bcrypt/argon2
  2. Use HTTPS: Encrypt data in transit
  3. Short-Lived Access Tokens: 15-30 minutes max
  4. Secure Cookies: httpOnly, secure, sameSite flags
  5. Validate All Input: Email format, password strength
  6. Rate Limit Auth Endpoints: Prevent brute force attacks
  7. Implement CSRF Protection: For session-based auth
  8. Rotate Secrets Regularly: JWT secrets, session secrets
  9. Log Security Events: Login attempts, failed auth
  10. 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬