# 30 — mTLS / 보안 **목표**: 메시 내 mTLS 강제와 인가 정책 검증. STRICT 전환 시 평문 거부, SPIFFE 식별자 확인, AuthorizationPolicy로 호출 주체 제한. ## 추가할 manifest (예정) - `peerauth-strict.yaml` — `PeerAuthentication` mtls STRICT (네임스페이스 또는 메시 범위) - `authorizationpolicy-httpbin.yaml` — `AuthorizationPolicy`: sleep SA만 httpbin 호출 허용 - `destinationrule-mtls.yaml` — client 측 `ISTIO_MUTUAL`(필요 시) ## 테스트 ```bash # mTLS 강제 후 메시 내부 호출은 정상 kubectl -n mesh-test exec deploy/sleep -c sleep -- curl -s -o /dev/null -w "%{http_code}\n" http://httpbin:8000/get # sidecar 없는 평문 클라이언트(예: 다른 ns netshoot)에서 호출 → 거부 확인 # SPIFFE 식별자 확인 istioctl proxy-config secret deploy/sleep.mesh-test -o json | \ jq -r '.dynamicActiveSecrets[]?.name' ``` ## 합격 기준 - STRICT 후 평문 호출 거부, 메시 내 mTLS 호출 정상 - `AuthorizationPolicy`로 허용 SA 외 호출 403 - 인증서 SPIFFE URI `spiffe://cluster.local/ns/mesh-test/sa/sleep` 확인 ## 산출물 - `docs/test-reports/YYYY-MM-DD_security.md` - 학습: `~/istio-md` 아카이브 `sec__note-mtls-spiffe-identity` / `sec__note-security-resource-trio`