Skip to content

Commit

Permalink
Initial commit for shell script to add SAML integration to AWS account
Browse files Browse the repository at this point in the history
  • Loading branch information
chubing committed Oct 4, 2018
1 parent b1b5c8a commit b4a064d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
11 changes: 11 additions & 0 deletions create_saml_aws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
echo \# run the following commands replacing name with the IDP name (if needed)
echo
echo aws iam create-saml-provider --saml-metadata-document file://login.at.internet2.edu-metadata.xml --name login.at.internet2.edu
echo
echo \# edit shibpolicy.json and replace the ARN with the ARN of the new account
echo
echo aws iam create-role --role-name administrator --assume-role-policy-document file://shibpolicy.json
echo aws iam attach-role-policy --role-name administrator --policy-arn arn:aws:iam::aws:policy/AdministratorAccess
echo aws iam create-role --role-name readonly --assume-role-policy-document file://shibpolicy.json
echo aws iam attach-role-policy --role-name readonly --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess
Empty file added idp.xml
Empty file.
17 changes: 17 additions & 0 deletions shibpolicy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRoleWithSAML",
"Principal": {
"Federated": "arn:aws:iam::123456789012:saml-provider/login.at.internet2.edu"
},
"Condition": {
"StringEquals": {
"SAML:aud": "https://signin.aws.amazon.com/saml"
}
}
}
]
}

0 comments on commit b4a064d

Please sign in to comment.