Combine SSL Auth Mechanism with OAuth2 backend for permissions #14169
-
Community Support Policy
RabbitMQ version used4.1.1 How is RabbitMQ deployed?Community Docker image Steps to reproduce the behavior in questionWe would like to have AMQP clients authenticate towards RabbitMQ using client certificates, but maintain the registered users and permissions with an OIDC provider. The SSL auth mechanism will look up the authenticated user in the configured auth backend, but since the OAuth2 backend requires a token, these do not seem to combine well. No requests are made to the oauth2 backend when a client is authenticated using a client certificate through the SSL auth mechanism. Since we use the same client certificates for authenticating towards other systems, we would like to keep the user management centralized in the OIDC provider, and avoid registering the users in RabbitMQ as well. For this to work, RabbitMQ must request the client permissions from the OIDC provider, based on the username derived from the client certificate. Is there any easy configurable way to combine the SSL auth mechanism with the OAuth2 backend, to achieve this ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
By using x.509 certificate and the I don't understand the benefit of combining these two approaches but they were never meant to be combined in any way. Just use OAuth 2, the identity will come from the token and not from the certificate. |
Beta Was this translation helpful? Give feedback.
You might be able to do something by using a custom HTTP auth backend for the
authz
(authorization) part of the workflow, and doing the OAuth2 bits in the custom backend. I'm pretty sure you can't use the OAuth2 plugin for justauthz
.If it's important enough, hire someone to implement it for you.