Skip to content

Instantly share code, notes, and snippets.

@saliceti
Last active May 25, 2016
Embed
What would you like to do?
#!/bin/sh
set -eu
NAME=$1
UAA_ENDPOINT=https://...
UAA_ADMIN_CLIENT_PASS=xxxxx
PASSWORD=test
echo "Creating user ${NAME}"
uaac --trace target "${UAA_ENDPOINT}"
uaac --trace token client get admin -s "${UAA_ADMIN_CLIENT_PASS}"
uaac --trace user add "${NAME}" -p "${PASSWORD}" --emails ignored
echo "Add permissions to user ${NAME}"
uaac --trace member add cloud_controller.admin "${NAME}"
uaac --trace member add uaa.admin "${NAME}"
uaac --trace member add scim.read "${NAME}"
uaac --trace member add scim.write "${NAME}"
uaac --trace member add doppler.firehose "${NAME}"
echo "Removing user ${NAME}"
uaac --trace user delete "${NAME}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment