赞
踩
RabbitMQ 3.10.+ 版本
docker network create rabbitmq
docker run -d --hostname rabbitmq1-3.11.2 --name rabbitmq1-3.10.19 --network rabbitmq -p 5671:5672 -p 15671:15672 -e RABBITMQ_ERLANG_COOKIE="javaboy_rabbitmq_cookie" -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=123456 rabbitmq:3.11.2-management-alpine
rabbitmq-plugins enable rabbitmq_auth_backend_oauth2
[ {rabbit, [ {auth_backends, [rabbit_auth_backend_oauth2]} ]}, {rabbitmq_management, [ {oauth_enabled, true}, {oauth_client_id, "rabbitmq-client"}, {oauth_client_secret, "59553098-22f4-4365-abea-4a3210ed24ec"}, {oauth_provider_url, "http://192.168.100.67:18080/auth/realms/rabbitmq"} ]}, {rabbitmq_amqp1_0, [ {default_user, none} ]}, {rabbitmq_auth_backend_oauth2, [ {resource_server_id, <<"rabbitmq">>}, {preferred_username_claims, [<<"preferred_username">>,<<"username">>,<<"user_name">>]}, {key_config, [ {jwks_url, <<"http://192.168.100.67:18080/auth/realms/rabbitmq/protocol/openid-connect/certs">>} ]} ]} ].
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。