According to the RabbitMQ documentation, any certificate issued by a CA that is in RabbitMQ's certification bundle will be trusted. Therefore, how can this type of authentication be secure if a CA — e.g., certbot — issues many certificates?
For testing purposes, I generated a self-signed CA to sign certificates. The certificate of this self-signed CA was added to the RabbitMQ certification bundle. After that, I signed a client's certificate so that I could perform authentication. Next, I created a user in RabbitMQ whose username matches the CN of the client certificate signed by the self-signed CA. As expected, the authentication was successfully performed. After that, I generated a certificate that was not signed by the same CA, and, as expected, the authentication failed. In this test environment, the entire broker was configured correctly. Certificate-based authentication was the only authentication method enabled during the tests.
However, how can this be secure if, according to the RabbitMQ documentation, the first CA present in the client's certificate is validated?
I hope to understand how this authentication can be secure since I will use it in a RabbitMQ instance in production.