Files
clean-architecture-backend-…/docs/runbooks/authz-cross-tenant-violation.md
T

3.0 KiB

title, category, error_codes, severity, owner, last_updated, status
title category error_codes severity owner last_updated status
Runbook — cross-tenant 접근 시도 감지 AUTHZ
AUTHZ_INSUFFICIENT_PERMISSION
AUTHZ_TENANT_MISMATCH
P2 oncall 2026-05-22 stub

Runbook: cross-tenant 접근 시도 감지

1. Trigger

이 runbook은 다음 alert에서 발동됩니다.

  • alert name: authz_cross_tenant_violation 또는 authz_403_spike
  • alert payload 필수 field: operation, error.code, error.category, principal_id_pseudonymized, tenant_id, runbook_link
  • 임계:
    • P2: 403 with error.code=AUTHZ_TENANT_MISMATCH > 10건/5분
    • P1 격상: 동일 principal에서 3개 이상 tenant 시도 OR 5분 내 100건 초과

2. First Response (5분 이내)

Step 1 — 확인

  1. log query로 위반 principal 식별 (pseudonymized): error.code=AUTHZ_TENANT_MISMATCH
  2. principal의 정상 tenant scope 확인 (IdP claim 또는 entitlement table)
  3. CROSS_TENANT_ADMIN capability 보유 여부 확인 — 보유자라면 false positive 가능성

Step 2 — 임시 격리

  • 명백한 위반 패턴이면 principal session 강제 만료 (token revocation list 추가)
  • security incident channel 통보 (#sec-incident)
  • 위반 request의 source IP / user-agent 기록

3. Diagnosis

  • log query: {service="api"} | error.category="AUTHZ" | principal_id_pseudonymized="<hash>"
  • metric panel: authz_denied_total{reason="tenant_mismatch"}, authz_principal_tenant_distribution
  • trace: 위반 request의 traceId로 호출 chain 확인. token claim의 tenant_id와 요청 path의 tenant_id 비교
  • 가능한 원인:
    • account takeover (계정 탈취) → 즉시 session revoke + 비밀번호 reset 요구
    • client bug (잘못된 tenant id 전송) → product team에 통보
    • 정상 admin operation 누락된 capability → entitlement 보정

4. Mitigation

  • 단기: principal session revoke, source IP rate-limit 강화
  • 위반이 client bug면 client patch release 협조
  • 장기: tenant boundary 검증 layer를 controller가 아닌 repository 진입점에서 강제 (feature-repository-access-permission-contract)

5. Escalation

  • 다음 on-call로 page: 보안 incident channel 즉시 page. 5분 내 security on-call 응답 없으면 CISO escalation
  • legal/compliance 통보 필요 여부 판단 (개인정보 noted시)

6. Recovery / Verification

  • 회복 확인 metric: AUTHZ_TENANT_MISMATCH 건수 정상 baseline 복귀
  • post-incident:
    • account takeover면 forensics 수행 + audit log 보존
    • cross-tenant 검증 unit test 추가
    • 위반 패턴 detection rule 영구화

Stub 상태 안내: 이 runbook은 skeleton 단계의 stub. 도메인 도입 시 실제 tenant 모델·capability 정의·security team 연락 체계로 보강 필요.