simple-setup.sh 606 B

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