simple-setup.sh 502 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. cargo build
  3. UIDC=./target/debug/uidc
  4. $UIDC init
  5. $UIDC config load /dev/stdin <<EOF
  6. base_url = "http://localhost:2114"
  7. EOF
  8. $UIDC key generate
  9. $UIDC client create testclient
  10. $UIDC user create kestrel
  11. echo "please enter password for user 'kestrel'"
  12. $UIDC user auth -p kestrel
  13. $UIDC group create testgroup
  14. $UIDC role create testrole
  15. $UIDC group attach-role testgroup testrole
  16. $UIDC group attach-user testgroup kestrel
  17. $UIDC scope create testscope
  18. $UIDC scope attach-role testscope testrole