Skip to content

Commit

Permalink
Update create_saml_aws.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
chubing authored Oct 4, 2018
1 parent c78969e commit 883a099
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion create_saml_aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

[ $# -eq 0 ] && { echo "Usage: $0 name_of_idp "; exit 1; }


# call to create the saml provider in the AWS accounts
aws iam create-saml-provider --saml-metadata-document file://idp.xml --name $1
if [ $? -ne -1 ]
then
echo "creation failed, read the readme and make sure you have an IAM role to perform this action"
exit 1
fi

# create iam roles that saml users can assume:
aws iam create-role --role-name administrator --assume-role-policy-document file://shibpolicy.json
aws iam attach-role-policy --role-name administrator --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
aws iam create-role --role-name readonly --assume-role-policy-document file://shibpolicy.json
Expand Down

0 comments on commit 883a099

Please sign in to comment.