Gsuite login to AWS Organisation

How to setup gsuite Saml login for multiple aws accounts

Gsuite login to AWS Organisation

Every company eventually sets up multiple AWS accounts. Managing IAM users and passwords in each of them becomes painful for both administrators and employees over time. We want to leverage setup Gsuite Authentication (SAML) to an AWS Organisation with multiple accounts.

Steps to follow (Assuming root/admin access on both Gsuite and AWS):

Login to AWS root account:

Enable SSO from here: https://console.aws.amazon.com/singlesignon/home?region=us-east-1#/dashboard

Go to settings and change Identity source to External Identity Provider.
Take the values of Service Metadata. We'll need them in next step.

Screenshot-2020-08-03-at-12.18.36-PM
Copy the values from "Show individual Metadata values".

Login to G-Suite:
  • Use the above values and create a SAML app here: Set Up custom app.
    https://admin.google.com/<our_domain>/AdminHome?hl=en_GB#AppsList:serviceType=SAML_APPS
  • Download IDP metadata.
  • Give it some name such as AWS-Login, that we can recognise with.
  • Add the details from above here:

Add ACS url as ACS url; Issuer url as Entity ID; Sign-in URL as StartURL; Leave others to be default values.

Screenshot-2020-08-03-at-12.24.24-PM

  • Leave all attribute mappings as is. Click on finish.

  • Enable app for all users. We'll manage their permissions via AWS.

Back to AWS:
  • Upload metadata in above page and click on next.. we should see a page like this.. do read and review all those things. Don't ignore them like terms and conditions ;)

Screenshot-2020-08-03-at-12.29.34-PM

  • Save the settings.

Do not close this tab.

  • Return to settings page. Add users, groups, accounts, etc.
    Google doesn't support SCIM provisoning of users. Hence, we've to create users manually.

Note: Both Username and Email address fields should've email ID in its value, as we setup NameID to Email when we setup SAML app in gsuite earlier.

Screenshot-2020-08-03-at-1.00.53-PM

  • Once we created user, let's create permission sets. For the sake of this blog post, I'll setup Administrator access and Billing permission set.

Screenshot-2020-08-03-at-1.04.16-PM

  • Now, Go to accounts tab again.. select an account. Click on Assign Users, select desired permission sets for the user.
    Screenshot-2020-08-03-at-1.06.29-PM

Screenshot-2020-08-03-at-1.07.26-PM

  • Go to Dashboard tab: Change the user portal to company friendly name.
    Screenshot-2020-08-03-at-1.09.06-PM

Hit the url in an incognito and login to see multiple accounts displayed. Select the desired account and enter the dashboard.

For cli access with SSO:
  • Run aws configure sso, enter above URL and region as us-east-1. It should open a browser and verify itself. In case of server with no browser, it'll display a URL and a code to verify.
Further reading/references:

Hope this is helpful. Questions/Comments/Feedback welcome on twitter https://twitter.com/acsrujan or mail me at [email protected].