mTLS 클라이언트 인가 검사에서 검증된 리프 인증서 subject 확인
--grpc-auth-mode=mtls를 사용하는 프로세스이전에는 허용된 subject가 포함된 자체 서명 인증서를 체인에 추가하면, --grpc-ca로 검증되지 않은 인증서인데도 클라이언트가 허용될 수 있었습니다. 업그레이드 후에는 항목이 설정되지 않았거나 비어 있으면 mTLS 프로세스가 시작되지 않습니다. 리프가 아닌 인증서만으로 일치하는 클라이언트는 RPC에서 client certificate not authorized (Unauthenticated) 오류를 받을 수 있으며, 서버는 이 오류를 로그에 남기지 않습니다.
원문 보기
### gRPC mTLS authorization checks only the verified client certificate With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`. #### Impact - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry. - An entry that matches only a non-leaf certificate, such as an intermediate CA's subject, no longer admits the client. RPCs between components, such as VTGate, VTOrc or vtctld calling an upgraded VTTablet, can fail with `client certificate not authorized` (gRPC code `Unauthenticated`), which the server doesn't log. - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them. See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.github.com/vitessio/vitess/releases/tag/v24.0.6