Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid deleting users on AWS SSO that were recreated on Google #59

Closed
Luis-3M opened this issue Sep 3, 2021 · 2 comments
Closed

Avoid deleting users on AWS SSO that were recreated on Google #59

Luis-3M opened this issue Sep 3, 2021 · 2 comments

Comments

@Luis-3M
Copy link

Luis-3M commented Sep 3, 2021

Problem
Noticed that if we delete a user on the Google side and then recreate it with the exact same details the following occurs:

  1. ssosync will consider that user as inactive based on the API response, hence deleting it from AWS SSO
    https://github.com/awslabs/ssosync/blob/master/internal/sync.go#L70-L103
    https://github.com/awslabs/ssosync/blob/master/internal/google/client.go#L64-L73

  2. ssosync will then list all the active users and it will see that it needs to add again the user that has just been deleted in the previous step.
    https://github.com/awslabs/ssosync/blob/master/internal/sync.go#L105-L152

  3. At this stage user will have no permission sets assigned on AWS SSO, and this will happen every time we run ssosync.

Possible Solution
I believe that it would be beneficial to change the SyncUsers function so it checks that all of the API returned deleted users are in fact inactive, and for the ones that are now active it just ignores them by building a new list of deleted users which we can iterate over just like its being done atm.

@ChrisPates
Copy link
Contributor

This items has been merged into a more complete feature request Ensure all groups/user creates in IAM Identity Store are via SCIM api and populate externalId field #166, please review and provide feedback on that item. In that feature we are looking to improve matching and including fallback mechanisms to avoid delete/create where and update would be less disruptive.

@Luis-3M
Copy link
Author

Luis-3M commented Mar 25, 2024

Make sense @ChrisPates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants