Repository navigation
test(e2e): approval-gated 워크로드 egress 경계 집행 단언 (AC-F2 시나리오 2) - #182
Merged
Merged
Conversation
kind v0.24.0 의 kindnet 이 NetworkPolicy 를 집행하므로(#176·#180), 지금껏 「정책 집행 CNI 선행」으로 유예하던 시나리오 2 를 Go 대체 검증으로 산다. e2e_f2_egress_boundary_test.go — 세션 둘(S1·S2)을 띄워 S1 워크로드 파드 안에서: (a) kube-dns 조회 성공, (b)(c) 자기 헬퍼 MCP·프록시 포트 연결, (d) 다른 네임스페이스 서비스·fetch-origin·공개 IP 차단, (e) 공급자 origin 차단, (f) 승인 게이트웨이 차단, (g) S2 헬퍼 차단, (h) 정책 쌍이 세션 삭제와 함께 사라짐. 차단마다 제한받지 않는 헬퍼 파드에서 같은 목적지로 붙는 대조군을 먼저 통과시킨다. 공개 IP 갈래는 러너에 공개 egress 가 없으면 건너뛴다. docs/test/e2e.md — 유예 표 시나리오 2 행을 형제 행(1·7·8)과 같은 「kube 관측 의존 · 현행 대체 검증 = Go 파일」로 바꾸고, 남은 미검증 분기의 f6 차단 두 행을 걷었다(시나리오 2 가 소유). 집계 불변. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Xb2pE6EtTVPjXUZqzS2Kk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
왜
approval-gated-workload.md#시나리오 2(AC-F2 egress 차단 실측)는 「정책 집행 CNI 선행」으로 유예돼 있었다. 그 전제가 거짓이었다 — kind v0.24.0 의 kindnet 이 NetworkPolicy 를 집행한다(#176 CI 실측, #180 문서 정정). 그래서 차단을 이 SUT 에서 바로 관측할 수 있다.무엇을
control-plane/test/e2e_f2_egress_boundary_test.go(//go:build e2e,// 검증 시나리오: approval-gated-workload.md#시나리오 2)approval-gated 세션 둘(S1·S2)을 띄우고 S1 워크로드 파드 주 컨테이너 안에서 bash
/dev/tcp로 연결만 건다(프로토콜 무관):kubernetes.default.svc.cluster.local조회:8092(MCP)·:8091(프록시)oidc-mock.oidc-mock.svc:5556,fetch-origin.<ns>.svc:8080,1.1.1.1:443anthropic-fake.<ns>.svc:8443pocket-aide.pocket-aide.svc:8080:8091·:8092차단 단언마다 대조군을 먼저 통과시킨다: 같은 목적지를 제한받지 않는 헬퍼 파드(공급자는 credential-proxy, 나머지는 session-mcp 컨테이너)에서 붙어
open이어야 한다. 없으면 거부는 「그 주소가 죽어 있다」 이상을 말하지 않는다. (g) 의 대조군은 S2 워크로드 → S2 헬퍼다. 공개 IP 는 러너에 공개 egress 가 없으면(대조군 실패) 그 하위 테스트만 건너뛴다.docs/test/e2e.md범위 밖
control-plane-ingress,shell-workload-egress)은 e2e 오버레이에서 지워져 있어 여기서 단언하지 않는다 — 운영 실측은 fix(k8s): control plane 인그레스·shell egress NetworkPolicy 추가 #176 기록.검증
로컬:
go vet -tags=e2e ./test/, 정적 게이트 넷(fidelity-allowlist, render-fidelity, comment-policy, scenario-mapping) 통과. 실집행 단언은 CI e2e.Generated by Claude Code