AWS SSO: no reports for user and group based access?

Where do I get a high level view of every AWS account a particular user or group is assigned to in AWS SSO? I can’t see this information anywhere within the Console (side rant: and there’s no API yet).

I can go into each individual AWS Account in SSO and see which groups and users are assigned to that specific account. But doing that for 20+ accounts, one by one, to provide a report for compliance and audit seems obscene.

Commenting as a reminder to come back - I’ve had the same question/issue and haven’t found a solution

There isn’t a solution. :slight_smile:

Edit: sorry, this turned into a rant.

Unfortunately we’re a little tied, we’re currently using Okta for our Identity Provider initiated SAML flow. We have a unique SAML app for each AWS Account and each role available. E.g.

We have three basic roles, Admin, ViewOnly and ReadOnly. So Account A, Account B and Account C have the following SAML Identity Providers in AWS IAM with a matching SAML app in Okta.

Account A
IDP-ViewOnly
IDP-ReadOnly
IDP-SuperAdmin

Account B
IDP-ViewOnly
IDP-ReadOnly
IDP-SuperAdmin

Account C
IDP-ViewOnly
IDP-ReadOnly
IDP-SuperAdmin

Each SAML app is assigned to a group, which are mapped to users. I really wanted to avoid the “Which Role do you want to Assume?” web UI in AWS when you log into AWS Console when you have multiple roles mapped to a Identity Provider in AWS IAM.

Since this web UI doesn’t remove the roles that you aren’t assigned in Okta. It just shows you every role associated to that IdP and expects you to know which roles you are assigned as per your SAML assertion attribute. E.g. you will see all the 12+ roles associated to the IdP you came in on in that AWS Account. Even if you only have access to one of them. Not sure I want Barbara from Finance seeing all the roles available in that SAML app for our Org Master account.

Plus, managing role and Identity Provider mappings in AWS sucks. And having all the ownership of authorisation and authentication inside of Okta worked better for me for reporting and compliance purposes. I was then using aws-vault and aws-okta (both on GitHub) to provide CLI access to AWS through Okta to the team.

Unfortunately, we’re about to start popping out new AWS accounts like ball hair on a 12 year old boy going through puberty. Managing 1x IdP, 1x SAML app per role, per account. Isn’t going to scale. I could finish my Terraform script to both create Okta SAML app, groups and users. But I’d also have to involve a way of managing and building Identity Providers in IAM, Roles and Trust Relationships in the same Terraform state file for hundreds of accounts. I don’t know how Okta would perform with 1,500+ SAML apps to various AWS accounts and roles, there’s some pretty heavy restrictions on Okta’s API’s limits too. And it’d be 2-3 API calls per account and per role any time the state file updated. I think there’s a hard limit of 300 API calls per minute per Okta tenant. I was smashing that with 20 accounts and 3 roles per account previously. I’d break it again going forward, for sure.

So… we’re going to use AWS SSO and put pressure on AWS to build the features we need and want. I’m honestly surprised it’s so half baked.

It’s amazing for a user. Being able to get a console login and access-keys in the same web UI is a huge win. But for me and the security team, managing access and providing compliance reports just got a damn lot worse. Not to mention basic user and access management just went backwards from what we previously used in Okta.

There is no API yet, and building reports is quite complicated as a result. I really hope they will release some API in the near future.

We eventually solved it for us internally. The SSO management console is a SPA which communicates with a REST API in the background. Using Chrome, we recorded those queries and inferred the meaning, parameters and outputs of the individual endpoints. We then implemented those REST API calls inside a small Python script to automatically call the same queries to collect all data for our reporting purpose.

Sadly, I can’t share the source code, it is embedded deep inside our reporting solution. We didn’t have the time to implement the full API specification and instead hardcoded a bunch of the parameters given to the REST endpoints to our specific environment. There were also some rumors going around at that time that an official API is coming at some point, so we didn’t see the value in implementing a feature-complete solution. Sorry about that, but maybe that gives you some idea of what is currently possible and how to achieve your goals, although its kind of ugly.

Also, keep in mind that you should not assume that the REST API is stable. They reworked some endpoints last December during the redesign of the SSO console, which broke our solution. So additional maintenance will have to go into your solution if you decide to go this way.

I don’t use Okta, no idea if this is good news for you or not, but just in case you missed it: https://aws.amazon.com/blogs/aws/single-sign-on-between-okta-universal-directory-and-aws/

And yeah, really have my fingers crossed for some SSO APIs this year (we’re using Azure AD), and a better way to manage Permission Sets.

Necro.

I faced this issue today as well. There still isn’t an elegant solution to this, but Amazon have at least published a PS script which will spit out a CSV which contains a list of all users who have access to your AWS accounts.

https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/export-a-report-of-aws-iam-identity-center-identities-and-their-assignments-by-using-powershell.html