게이트키퍼
클라이언트와 애플리케이션/서비스 사이 요청을 중개하는 전용 컴포넌트로 보호한다.
구조와 동작 원리
구성 요소와 배치 원칙 (조사 기반 개념 설명 · 연결 순서나 토폴로지는 특정하지 않음)
게이트키퍼 전용 인스턴스가 클라이언트와 신뢰 호스트를 분리하는 파사드 계층을 이룬다.
게이트키퍼를 클라이언트와 신뢰 호스트 사이 경계에 두어 요청을 중개·검증하게 한다.
인터넷/비신뢰 네트워크에 API 엔드포인트가 노출되어 인증·검증·공격 표면 문제가 생긴다.
기대 효과
요청 검증·정화로 추가 보안 계층을 제공하고 공격 표면을 줄인다.
트레이드오프
fail-open이면 제약이 조용히 미적용될 수 있어 정책 우회 위험이 있다.
K8s Gatekeeper는 기본 fail-open이라 웹훅 장애 시 제약이 적용되지 않을 수 있어 중요 정책은 주의한다.
운영 및 적용 가이드
종합 설명 · 원문 인용으로 검증된 항목과 구분됩니다. 실제 적용 전 확인이 필요합니다.
언제 사용하는가
외부 API 앞단에서 인증·인가, 입력 검증, 속도 제한을 중앙화해 신뢰 호스트를 직접 노출하지 않고 보호하는 데 적합하다.
시나리오
중견 SaaS 기업이 50개 마이크로서비스를 외부 고객에게 제공하며, 각 서비스의 인증·검증 중복과 API 공격 표면을 줄여야 한다. 클라이언트는 게이트키퍼 계층을 거쳐야 하고, 게이트키퍼는 토큰 검증·요청 정화·rate limit 후 허용된 서비스로만 라우팅한다. 정책과 설정은 Git으로 관리하고, 감사 로그를 별도 저장해 규제 대응과 장애 분석에 사용한다.
배치 원칙
- 클라이언트와 신뢰 호스트 사이 경계/DMZ에 게이트키퍼 계층 배치
- 게이트키퍼는 최소 권한으로 백엔드만 호출하고 백엔드는 게이트키퍼 경유 트래픽만 수용
- 정책·구성은 Git 저장소에 두고 배포 파이프라인으로 일관 적용
- 로그·감사 데이터는 게이트키퍼와 분리 저장
- K8s에서는 admission webhook·ConstraintTemplate·Constraint를 클러스터 애드온/CRD로 배치
온프레미스
DMZ·역방향 프록시/API 게이트웨이 구간에 HA 쌍으로 배포하고 LB·WAF·인증서·패치·백업을 운영 표준화; 정책 변경은 스테이징 검증 후 반영.
클라우드
관리형 LB/API Gateway/WAF와 결합하고 오토스케일·다중 AZ·중앙 로그·IaC/GitOps로 배포; 클라우드 ID·시크릿 관리와 감사 로그를 연동.
Kubernetes
OPA Gatekeeper를 admission controller로 설치하고 ConstraintTemplate/Constraint를 GitOps로 배포; 감사(audit)와 dry-run/enforcement 단계 분리, webhook replica·PDB·failurePolicy를 리스크에 맞게 설정.
장애 대응
대표 장애는 게이트키퍼/웹훅 타임아웃·오류, 잘못된 정책으로 정상 배포 차단, fail-open으로 정책 미적용. 절차: 영향 범위와 failurePolicy 확인 → webhook 로그·API 서버 이벤트·감사 결과 확인 → 정책 롤백/예외 적용 → replica·PDB·타임아웃 점검 → 재발 방지 위해 정책 테스트와 CI 사전 검증 강화.
14개 관점별 근거
조사 당시 근거 보유 여부입니다. 출처의 정확성과 최신성을 별도로 판단하세요.
정의·개요근거 있음
클라이언트와 애플리케이션/서비스 사이 요청을 중개하는 전용 컴포넌트로 보호한다.
Protect applications and services by using a dedicated component to broker requests between clients and the application or service.해결하는 문제근거 있음
인터넷/비신뢰 네트워크에 API 엔드포인트가 노출되어 인증·검증·공격 표면 문제가 생긴다.
Many cloud services expose endpoints that allow client applications to call their APIs across the internet or another untrusted network.주요 구성 컴포넌트·리소스근거 있음
게이트키퍼 전용 인스턴스가 클라이언트와 신뢰 호스트를 분리하는 파사드 계층을 이룬다.
This dedicated instance (the gatekeeper) is a type of Façade layer that decouples clients from your trusted hosts.데이터·에셋 배치 원칙근거 있음
게이트키퍼를 클라이언트와 신뢰 호스트 사이 경계에 두어 요청을 중개·검증하게 한다.
This dedicated instance (the gatekeeper) is a type of Façade layer that decouples clients from your trusted hosts.대표 유스케이스근거 있음
인증·인가, 속도 제한, 요청 메타데이터 검사 등 요청 정화를 중앙 수행한다.
The gatekeeper may perform tasks like authentication or authorization, or other sanitization steps such as rate limiting시나리오 예시근거 있음
마이크로서비스 같은 분산 애플리케이션에서 검증 단계를 중앙화하는 시나리오에 유용하다.
It may be useful in scenarios where you have a distributed application (e.g. a set of microservices)부적합 상황·주의근거 있음
K8s Gatekeeper는 기본 fail-open이라 웹훅 장애 시 제약이 적용되지 않을 수 있어 중요 정책은 주의한다.
Currently Gatekeeper is defaulting to using `failurePolicy: Ignore` for admission request webhook errors.온프레미스 관점(개발·배포·운영)근거 있음
온프레미스 K8s 클러스터도 Arc 지원 등을 통해 Gatekeeper 정책 적용 대상이 될 수 있다.
For Arc Enabled Kubernetes, which includes on-premises clusters and clusters hosted in Google Cloud or Amazon Web Services클라우드 관점(개발·배포·운영)근거 있음
AKS에서는 Gatekeeper가 애드온으로 배포되어 정책 적용·운영을 관리형으로 지원한다.
On Azure Kubernetes Service (AKS), it is deployed as an add-on.Kubernetes 관점(개발·배포·운영)근거 있음
K8s에서는 OPA를 admission controller로 실행하고 CRD로 정책을 관리하는 네이티브 통합을 제공한다.
Gatekeeper is its Kubernetes-native integration - it runs OPA as an admission controller장애 대응 관점근거 있음
웹훅 서버 다중 replica와 PodDisruptionBudget으로 가용성을 확보한다.
Multiple replicas of the webhook server, with PodDisruptionBudget.장점근거 있음
요청 검증·정화로 추가 보안 계층을 제공하고 공격 표면을 줄인다.
The broker validates and sanitizes the requests, and can provide an extra layer of security and limit the system's attack surface.단점·트레이드오프근거 있음
fail-open이면 제약이 조용히 미적용될 수 있어 정책 우회 위험이 있다.
Fail-open means a constraint that stops enforcing without telling you.대표 기술·도구근거 있음
OPA의 Rego 정책 언어를 사용하는 Kubernetes 네이티브 정책 도구다.
using OPA's Rego policy language.추가 참고 문헌 (23)
- Gatekeeper Pattern - Azure Architecture Center | Microsoft Learn ↗
- Azure Architecture: The Gatekeeper and Valet Key Patterns ↗
- OPA and Gatekeeper - Policy Enforcement for Kubernetes - k8s.guide ↗
- Policy as Code & Governance | KubeDojo ↗
- Architecting, Designing and Building a Secure Information Technology Infrastructure, a case study ↗
- Kubernetes Clusters-New Theme ↗
- 13 Architecting a secure system – The Structure of Secure Systems ↗
- Design Patterns for Building Secure Systems ↗
- Azure Kubernetes Service (AKS) Baseline Architecture for Azure Local - Azure Architecture Center | Microsoft Learn ↗
- Governance Options for a Kubernetes Cluster - Azure Architecture Center | Microsoft Learn ↗
- One Kubernetes Policy and CI/CD Pipeline for AWS, GCP, Azure ↗
- החלת כללי מדיניות מותאמים אישית לאבטחה ברמת ה-Pod באמצעות Gatekeeper | GKE security ↗
- catalog.yaml at master · open-policy-agent/gatekeeper-library ↗
- Policy-as-Code Across an EKS Fleet: Kyverno, Gatekeeper, and the Audit-to-Enforce Path ↗
- Leveraging Defender for Containers to simplify policy management in your Kubernetes Clusters | Microsoft Community Hub ↗
- Defender for Containers architecture ↗
- Failing Closed | Gatekeeper ↗
- Gatekeeper Fail-Open vs Fail-Closed Without Bypass or Lockout ↗
- Runtime Security and Policy: From Admission to syscall - System Design Notes ↗
- Dealing with a Google Kubernetes Engine Cluster Outage ↗
- Kubernetes guardrails with OPA Gatekeeper — CloudSecOps ↗
- OPA Gatekeeper: Enforcing Kubernetes Admission Control Policies That Actually Stop Misconfigurations | DevOpsil ↗
- Admission Control: Webhooks, CEL Policies, and the #1 Source of Cluster Outages - System Design Notes ↗