[Questions] Rabbitmq and keycloak UI user specific queue\host premission #14200
Unanswered
batchen-gsr
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Community Support Policy
RabbitMQ version used
4.1.0
Erlang version used
27.3.x
Operating system (distribution) used
docker rabbitmq:4.1.0-management
How is RabbitMQ deployed?
Community Docker image
rabbitmq-diagnostics status output
See https://www.rabbitmq.com/docs/cli to learn how to use rabbitmq-diagnostics
rabbitmq-1 | 2025-07-07 13:01:50.470707+00:00 [debug] <0.14784.0> Using root oauth_provider "{id: "", issuer: "https://nginx/realms/test\", discovery_endpoint: "https://nginx/realms/test/.well-known/openid-configuration\", token_endpoint: <<"https://nginx/realms/test/protocol/openid-connect/token\">>, authorization_endpoint: <<"https://nginx/realms/test/protocol/openid-connect/auth\">>, end_session_endpoint: <<"https://nginx/realms/test/protocol/openid-connect/logout\">>, jwks_uri: <<"https://nginx/realms/test/protocol/openid-connect/certs\">>, ssl_options: "{verify: verify_none, fail_if_no_peer_cert: undefined, crl_check: undefined, depth: undefined, cacertfile: undefined, cacerts(count): 0 }" }"
rabbitmq-1 | 2025-07-07 13:01:50.534890+00:00 [debug] <0.14880.0> Using root oauth_provider "{id: "", issuer: "https://nginx/realms/test\", discovery_endpoint: "https://nginx/realms/test/.well-known/openid-configuration\", token_endpoint: <<"https://nginx/realms/test/protocol/openid-connect/token\">>, authorization_endpoint: <<"https://nginx/realms/test/protocol/openid-connect/auth\">>, end_session_endpoint: <<"https://nginx/realms/test/protocol/openid-connect/logout\">>, jwks_uri: <<"https://nginx/realms/test/protocol/openid-connect/certs\">>, ssl_options: "{verify: verify_none, fail_if_no_peer_cert: undefined, crl_check: undefined, depth: undefined, cacertfile: undefined, cacerts(count): 0 }" }"
rabbitmq-1 | 2025-07-07 13:01:50.556905+00:00 [debug] <0.14905.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.557009+00:00 [debug] <0.14905.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.557029+00:00 [debug] <0.14905.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.557272+00:00 [debug] <0.14905.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.557308+00:00 [debug] <0.14905.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.574449+00:00 [debug] <0.14925.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.574538+00:00 [debug] <0.14925.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.574558+00:00 [debug] <0.14925.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.574820+00:00 [debug] <0.14925.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.574851+00:00 [debug] <0.14925.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.580080+00:00 [debug] <0.14932.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.580157+00:00 [debug] <0.14932.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.580193+00:00 [debug] <0.14932.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.580380+00:00 [debug] <0.14932.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.580406+00:00 [debug] <0.14932.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.586500+00:00 [debug] <0.14937.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.586614+00:00 [debug] <0.14937.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.586667+00:00 [debug] <0.14937.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.586937+00:00 [debug] <0.14937.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.587010+00:00 [debug] <0.14937.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.594088+00:00 [debug] <0.14945.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.594162+00:00 [debug] <0.14945.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.594180+00:00 [debug] <0.14945.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.594361+00:00 [debug] <0.14945.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.594385+00:00 [debug] <0.14945.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.601162+00:00 [debug] <0.14950.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.601243+00:00 [debug] <0.14950.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.601306+00:00 [debug] <0.14950.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.601556+00:00 [debug] <0.14950.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.601587+00:00 [debug] <0.14950.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.616028+00:00 [debug] <0.14965.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.616119+00:00 [debug] <0.14965.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.616158+00:00 [debug] <0.14965.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.616360+00:00 [debug] <0.14965.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.616412+00:00 [debug] <0.14965.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.624498+00:00 [debug] <0.14973.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.624604+00:00 [debug] <0.14973.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.624643+00:00 [debug] <0.14973.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.624870+00:00 [debug] <0.14973.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.624900+00:00 [debug] <0.14973.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.629759+00:00 [debug] <0.14980.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.629836+00:00 [debug] <0.14980.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.629874+00:00 [debug] <0.14980.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.630052+00:00 [debug] <0.14980.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.630078+00:00 [debug] <0.14980.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.646913+00:00 [debug] <0.14995.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.647011+00:00 [debug] <0.14995.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.647068+00:00 [debug] <0.14995.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.647290+00:00 [debug] <0.14995.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.647322+00:00 [debug] <0.14995.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.647505+00:00 [debug] <0.14995.0> Feature flags: collecting inventory on nodes: [rabbit@rabbitmq]
rabbitmq-1 | 2025-07-07 13:01:50.652651+00:00 [debug] <0.15003.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:50.652736+00:00 [debug] <0.15003.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:50.652781+00:00 [debug] <0.15003.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:50.652960+00:00 [debug] <0.15003.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:50.652986+00:00 [debug] <0.15003.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:50.653199+00:00 [debug] <0.15003.0> Files and directories found in node's data directory: DECISION_TAB.LOG, LATEST.LOG, cluster_nodes.config, coordination, mqtt_retained_00006666cd76f96956469e7be39d750cc7d9.dets, mqtt_retained_0000900150983cd24fb0d6963f7d28e17f72.dets, msg_stores, node-type.txt, nodes_running_at_shutdown, quorum, rabbit_durable_exchange.DCD, rabbit_durable_queue.DCD, rabbit_durable_route.DCD, rabbit_runtime_parameters.DCD, rabbit_runtime_parameters.DCL, rabbit_serial, rabbit_topic_permission.DCD, rabbit_user.DCD, rabbit_user_permission.DCD, rabbit_vhost.DCD, schema.DAT, of them to be ignored: cluster_nodes.config, coordination, msg_stores, nodes_running_at_shutdown, quorum, rabbit@rabbitmq, rabbit@rabbitmq-feature_flags, rabbitmq_metadata, stream
rabbitmq-1 | 2025-07-07 13:01:50.653298+00:00 [debug] <0.15003.0> Files and directories found in node's data directory sans ignored ones: DECISION_TAB.LOG, LATEST.LOG, mqtt_retained_00006666cd76f96956469e7be39d750cc7d9.dets, mqtt_retained_0000900150983cd24fb0d6963f7d28e17f72.dets, node-type.txt, rabbit_durable_exchange.DCD, rabbit_durable_queue.DCD, rabbit_durable_route.DCD, rabbit_runtime_parameters.DCD, rabbit_runtime_parameters.DCL, rabbit_serial, rabbit_topic_permission.DCD, rabbit_user.DCD, rabbit_user_permission.DCD, rabbit_vhost.DCD, schema.DAT
rabbitmq-1 | 2025-07-07 13:01:55.752974+00:00 [debug] <0.15028.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:55.753077+00:00 [debug] <0.15028.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:55.753128+00:00 [debug] <0.15028.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:55.753348+00:00 [debug] <0.15028.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:55.753387+00:00 [debug] <0.15028.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:55.764613+00:00 [debug] <0.15036.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:55.764689+00:00 [debug] <0.15036.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:55.764713+00:00 [debug] <0.15036.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:55.764880+00:00 [debug] <0.15036.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:55.764904+00:00 [debug] <0.15036.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2
rabbitmq-1 | 2025-07-07 13:01:55.772161+00:00 [debug] <0.15043.0> Decoding token for resource_server: <<"rabbitmq">> using oauth_provider_id: ""
rabbitmq-1 | 2025-07-07 13:01:55.772251+00:00 [debug] <0.15043.0> Signing key <<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">> found
rabbitmq-1 | 2025-07-07 13:01:55.772315+00:00 [debug] <0.15043.0> Verifying signature using signing_key_id : '<<"Gnl2ZlbRh3rAr6Wymc988_5cY7T5GuePd5dpJlXDJUk">>' and algorithms: undefined
rabbitmq-1 | 2025-07-07 13:01:55.772525+00:00 [debug] <0.15043.0> Computing username from client's JWT token: [<<"rabbit_admin">>] -> rabbit_admin
rabbitmq-1 | 2025-07-07 13:01:55.772558+00:00 [debug] <0.15043.0> User 'rabbit_admin' authenticated successfully by backend rabbit_auth_backend_oauth2```
Logs from node 2 (if applicable, with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
Logs from node 3 (if applicable, with sensitive values edited out)
See https://www.rabbitmq.com/docs/logging to learn how to collect logs
rabbitmq.conf
See https://www.rabbitmq.com/docs/configure#config-location to learn how to find rabbitmq.conf file location
Steps to deploy RabbitMQ cluster
docker-compose up rabbitmq nginx keycloak
Steps to reproduce the behavior in question
logging in the rabbitmq UI using user rabbit_admin which gets its roles of creds from client rabbitmq-client-code as set in the rabbitmq.conf
advanced.config
See https://www.rabbitmq.com/docs/configure#config-location to learn how to find advanced.config file location
Application code
# PASTE CODE HERE, BETWEEN BACKTICKS
Kubernetes deployment file
What problem are you trying to solve?
I want to know if theres a way to accsess the rabbitmq UI and have the user see specific vhost or specific queue only? because now i log in and i see all vhosts and queues.
im using keycloak as the user management so i have the user rabbit_admin with management premissions and i have in the rabbit conf the
management.oauth_client_id = rabbitmq-client-code
which means the user rabbit_admin gets its roles from. how to do it ? what should i tell keycloak to set?this is the current token data:
Is there a way to set maybe "scope": "profile email rabbitmq.read:abc/queue-1", or somthing like that?
Is it even possible to give the UI premmisions to show only vhost abc?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions