-
Describe the bugHello, using oauth2 plugin with AzureAD, (version 3.12.4) Adding,
Result in an error on boot : 2023-11-16 18:25:10.107764+00:00 [error] <0.132.0> You've tried to set auth_oauth2.preferred_username_claims, but there is no setting with that name. BOOT FAILEDError during startup: {error,failed_to_prepare_configuration} enable_plugin file: [rabbitmq_management,rabbitmq_peer_discovery_k8s, rabbitmq_auth_backend_oauth2,rabbitmq_prometheus,rabbitmq_shovel,rabbitmq_shovel_management,rabbit_auth_backend_internal]. rabbitmq.conf file: auth_oauth2.additional_scopes_key = roles Reproduction steps
Expected behaviorAs per documentation : https://www.rabbitmq.com/oauth2.html#variables-configurable. This config should work and I should be able to have a valide display name taken from the token. Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Please ensure that you have enabled the OAuth2 plugin - https://www.rabbitmq.com/oauth2.html#how-it-works Have you confirmed that RabbitMQ is actually using the |
Beta Was this translation helpful? Give feedback.
-
My apologies here, it seem that I was confused by the description of the key:
But in the rabbitmq.conf file this is done my doing: auth_oauth2.preferred_username_claims.1 = name The missing .1 fixed it. The error was misleading, something about expecting an array and not a string would help. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
My apologies here, it seem that I was confused by the description of the key:
List of JWT claims to look for username associated to the token separated by commas.
But in the rabbitmq.conf file this is done my doing:
auth_oauth2.preferred_username_claims.1 = name
The missing .1 fixed it.
The error was misleading, something about expecting an array and not a string would help.
Thanks for your help!