Skip to content

Instantly share code, notes, and snippets.

@saliceti
Last active May 25, 2016 11:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saliceti/38109ff695347eaec30110317b4e881a to your computer and use it in GitHub Desktop.
Save saliceti/38109ff695347eaec30110317b4e881a to your computer and use it in GitHub Desktop.
#!/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