Last active
May 12, 2018 02:44
-
-
Save vishalnayak/d296b26f299f92fdfd38bfc10cc3eaba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -aex | |
italiansGroupID=$(vault write -format=json identity/group name=ldap_Italians type=external | jq -r '.data.id') | |
scientistsGroupID=$(vault write -format=json identity/group name=ldap_Scientists type=external | jq -r '.data.id') | |
vault auth-enable ldap | |
accessor=$(curl -H "X-vault-token:root" http://localhost:8200/v1/sys/auth | jq -r '.data."ldap/".accessor') | |
italiansGroupAliasID=$(vault write -format=json identity/group-alias canonical_id=$italiansGroupID mount_accessor=$accessor name=Italians | jq -r '.data.id') | |
scientistsGroupAliasID=$(vault write -format=json identity/group-alias canonical_id=$scientistsGroupID mount_accessor=$accessor name=Scientists | jq -r '.data.id') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment