diff options
author | dcorbacho <dparracorbacho@piotal.io> | 2020-11-18 14:27:41 +0000 |
---|---|---|
committer | dcorbacho <dparracorbacho@piotal.io> | 2020-11-18 14:27:41 +0000 |
commit | f23a51261d9502ec39df0f8db47ba6b22aa7659f (patch) | |
tree | 53dcdf46e7dc2c14e81ee960bce8793879b488d3 /deps/rabbitmq_management/scripts/seed.sh | |
parent | afa2c2bf6c7e0e9b63f4fb53dc931c70388e1c82 (diff) | |
parent | 9f6d64ec4a4b1eeac24d7846c5c64fd96798d892 (diff) | |
download | rabbitmq-server-git-stream-timestamp-offset.tar.gz |
Merge remote-tracking branch 'origin/master' into stream-timestamp-offsetstream-timestamp-offset
Diffstat (limited to 'deps/rabbitmq_management/scripts/seed.sh')
-rwxr-xr-x | deps/rabbitmq_management/scripts/seed.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/deps/rabbitmq_management/scripts/seed.sh b/deps/rabbitmq_management/scripts/seed.sh new file mode 100755 index 0000000000..0b62d3d983 --- /dev/null +++ b/deps/rabbitmq_management/scripts/seed.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env sh + +# use admin context to add user and client +uaac token client get admin -s adminsecret + +uaac user add rabbit_user -p rabbit_password --email rabbit_user@example.com + +# these groups will end up in the scope of the users +uaac group add "rabbitmq.read:*/*" +uaac group add "rabbitmq.write:*/*" +uaac group add "rabbitmq.configure:*/*" +uaac group add "rabbitmq.tag:management" +uaac group add "rabbitmq.tag:administrator" + +uaac member add "rabbitmq.read:*/*" rabbit_user +uaac member add "rabbitmq.write:*/*" rabbit_user +uaac member add "rabbitmq.configure:*/*" rabbit_user +uaac member add "rabbitmq.tag:management" rabbit_user +uaac member add "rabbitmq.tag:administrator" rabbit_user + +# add the client for the management plugin. It has the implicit grant type. +# add e.g. --access_token_validity 60 --refresh_token_validity 3600 to experiment with token validity +uaac client add rabbit_user_client \ + --name rabbit_user_client \ + --secret '' \ + --scope 'rabbitmq.* openid' \ + --authorized_grant_types implicit \ + --autoapprove true \ + --redirect_uri 'http://localhost:15672/**' |