Kubernetes NetworkPolicy 정적 분석 기반 Zero Trust Micro-Segmentation 최소권한 검증 및 사례분석
Least-Privilege Verification and Case Analysis of Zero Trust Micro-Segmentation Based on Static Analysis of Kubernetes NetworkPolicy
Micro-segmentation is a Zero Trust technique for restricting unnecessary workload communication and lateral movement. However, Kubernetes NetworkPolicy resources alone do not demonstrate least-privilege enforcement because combined policies and broad conditions may permit unintended communication. This study proposes a static analysis method that derives policy-allowed relationships from NetworkPolicy YAML files and compares them with reference relationships from public configurations. Reference relationships link Deployment environment variables with Service selectors, ports, and target ports. Policy-allowed relationships reflect selectors, ingress and egress rules, protocols, ports, and multiple-policy effects. In Online Boutique, 103 relationships were allowed; 16 matched the reference relationships, while 87 were classified as potential over-permissions. Additionally, 47 policy-change scenarios produced 1,249 cumulative relationship changes. In Calico Stars, both reference relationships were allowed, with no potential over-permission or blocked required communication. A scalability experiment processed 1,000 synthetic policies in 1.12 seconds using 6.04 MB of peak Python-allocated memory. The proposed method supports pre-deployment least-privilege and policy-change reviews without a running Kubernetes cluster, although the results are limited to the selected cases and scope.
한국어
클라우드 네이티브 환경에서 Micro-Segmentation은 워크로드 간 불필요한 통신과 횡적 이동을 제한하는 Zero Trust 기술이다. Kubernetes는 NetworkPolicy로 Pod 간 통신을 제어하지만, 여러 정책의 결합과 선택자·포트 조건으로 인해 최소권한 적용 여부를 판단하기 어렵다. 본 연구에서는 NetworkPolicy YAML을 정적으로 분석하여 정책 허용 통신관계를 생성하고, 설정에서 도출한 기준 통신관계와 비교하는 최소권한 검증기법을 제안한다. 기준 통신관계는 Deployment 환경변수를 Service의 selector, port 및 targetPort와 연결하여 구성한다. 정책 허용 통신관계는 선택자, Ingress·Egress 규칙, 프로토콜, 포트 및 다중정책의 합산효과를 반영하여 산출한다. Online Boutique에서는 정책 허용관계 103개 중 16개가 기준 통신관계와 일치하였으며, 87개는 과도허용 후보로 분류되었다. 47개의 정책 변경 시나리오에서는 누적 1,249건의 관계 변화가 발생하였다. Calico Stars에서는 기준 통신관계 2개가 모두 허용되었으며 과도허용 후보와 정상통신 차단은 확인되지 않았다. 확장성 평가에서는 1,000개의 합성 정책을 약 1.12초와 최대 Python 할당 메모리 6.04MB로 처리하였다. 제안기법은 클러스터 없이 배포 전 최소 권한 상태와 정책 변경 영향을 검토하는 데 활용할 수 있다. 다만 결과는 두 공개 사례의 분석범위에 한정된다.
목차
요약 ABSTRACT 1. 서론 2. 이론적 배경 및 관련 연구 2.1 Zero Trust와 Micro-Segmentation 2.2 Kubernetes NetworkPolicy 2.3 최소권한 검증과 정적 정책분석 2.4 관련 연구 및 차별성 3. 제안 최소권한 검증기법 3.1 제안기법 개요 3.2 정책정보 추출 및 정규화 3.3 정책 허용 통신관계 생성 3.4 최소권한 위반 판정 및 결과 출력 4. 분석자료 및 연구방법 4.1 분석자료 구성 4.2 기준 통신관계 구성 4.3 분석대상 통신관계 및 정책 변경 시나리오 4.4 정책 해석 확인 및 사례분석 절차 4.5 정책 수 증가에 따른 확장성 평가 5. 사례분석 결과 및 논의 5.1 분석자료 구성결과 5.2 정책 해석 확인결과 5.3 원본 정책의 최소권한 분석결과 5.4 정책 변경 영향분석 결과 5.5 정책 수 증가에 따른 성능평가 결과 5.6 종합논의 6. 결론 참고문헌