I'm trying to script various remote LDAP groups into my Management Authorization for an appliance. I use curl since I'm more familiar with it, and all other scripts work perfectly, but I'm hitting a wall for Management Authorizations.
The following script -
applianceURLs=("120.100.10.45:444")
userPass='admin@local:password'
sleep 2
echo
echo "***** Configuration for - "$applianceURLs" - COMPLETED *****"
echo
sleep 2
POST DATA:{
"users": [
{
"name:webseal-user",
"type:local"
}
],
"groups": [
{
"name": "webseal-group",
"type": "local"
}
],
"features": [
{
"name": "reverse_proxy",
"access": "w"
}
],
"name": "WebSEAL Administrator"
}
exit 0
I got the POST language from the Rest API documentation but it keeps shooting these errors;
$ ./CreateManagementAuthorization.sh
{"enforcing":true}
***** Configuration for - 120.100.10.45:444 - COMPLETED *****
{"result":0,"message":"Successfully deployed all pending changes.","status":0}
./CreateManagementAuthorization.sh: line 25: users:: command not found
./CreateManagementAuthorization.sh: line 27: name:webseal-user,: command not found
./CreateManagementAuthorization.sh: line 28: type:local: command not found
./CreateManagementAuthorization.sh: line 30: ],: command not found
./CreateManagementAuthorization.sh: line 31: groups:: command not found
./CreateManagementAuthorization.sh: line 33: name:: command not found
./CreateManagementAuthorization.sh: line 34: type:: command not found
./CreateManagementAuthorization.sh: line 36: ],: command not found
./CreateManagementAuthorization.sh: line 37: features:: command not found
./CreateManagementAuthorization.sh: line 39: name:: command not found
./CreateManagementAuthorization.sh: line 40: access:: command not found
./CreateManagementAuthorization.sh: line 42: ],: command not found
./CreateManagementAuthorization.sh: line 43: name:: command not found
./CreateManagementAuthorization.sh: line 44: syntax error near unexpected token `}'
./CreateManagementAuthorization.sh: line 44: ` }'
Any ideas, suggestions, or fixes?