fix(infra): rabbitmq-tls-unify-insecure-skip-verify#3595
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes local CA certificate reading and mounting configurations across several services (including admin-api, client-api, iris, and plag) and configures RabbitMQ TLS connections to skip verification when SSL is enabled. The reviewer correctly points out that hardcoding insecure TLS configurations (such as rejectUnauthorized: false and InsecureSkipVerify: true) exposes the services to Man-in-the-Middle (MitM) attacks. They suggest introducing a RABBITMQ_SSL_SKIP_VERIFY environment variable to dynamically control TLS verification instead of disabling it unconditionally.
|
몇 가지 후속으로 정리하면 좋을 부분이 있어 보입니다.
|
Description
RabbitMQ TLS 연결 방식을 모든 서비스에서 통일합니다.
기존 PR #3445에서
iris/consumer는 CA cert 파일을 직접 읽는 방식, 나머지(iris/producer,plag/consumer,plag/producer, backend)는InsecureSkipVerify를 사용하는 방식으로 구현이 혼재되어 있었습니다. CA cert 파일을 읽는 방식은 cert-manager 인증서 발급 → reflector 복제 완료 전에 Pod가 뜨면 파일을 찾지 못해 crash가 발생하는 race condition이 있었고, 이로 인해 release 브랜치 머지 시 서비스 장애가 발생했습니다.클러스터 내부 통신에서는 CA cert 검증의 실질적인 보안 이득이 크지 않으므로, 전 서비스를
InsecureSkipVerify방식으로 통일합니다. TLS 암호화는 그대로 유지되며,rabbitmq-ca-certSecret 및 reflector 의존성이 제거됩니다.변경 사항
iris/consumer: CA cert 파일 읽기 →InsecureSkipVerifyiris/producer,plag/consumer,plag/producer: 무조건 적용 →RABBITMQ_SSL=true조건부 적용amqp.module.ts:readFileSync(ca.crt)→rejectUnauthorized: falserabbitmq-ca-certvolume mount 제거rabbitmq-ca-cert.yaml및 kustomization 참조 제거Additional context
closes #3445 관련 장애 원인 수정
Before submitting the PR, please make sure you do the following
fixes #123).