awslabs / ssosync

Populate AWS SSO directly with your G Suite users and groups using either a CLI or AWS Lambda
Apache License 2.0
517 stars 178 forks source link

minimum field size of 1, ListGroupsInput.IdentityStoreId #127

Closed deimosfr closed 1 year ago

deimosfr commented 1 year ago

Describe the bug When I'm performing a sync with an older version of ssosync (6220679fd3cce62ebd9774144a292008896d297c), I don't have any issue. With the last version (2.0.2), I have an error message:

ERRO[0010] error getting aws groups                     
FATA[0010] InvalidParameter: 1 validation error(s) found.
- minimum field size of 1, ListGroupsInput.IdentityStoreId.

The difference between the last version and the version I used before is the region (-r option) to specify. So I've set the same one as the endpoint because this is where it's based, but sync doesn't work.

I have between 2 and 15 people in each group. It's not clear what the validation issue is.

Expected behavior I expected no issue as my configuration is working fine on an older version:

...
INFO[0010] get existing aws groups                      
INFO[0010] get existing aws users                       
INFO[0018] syncing changes
INFO[0025] sync completed

Thanks in advance

shinenelson commented 1 year ago

Did you happen to jump from a v1 to v2? Since this is a major version bump, it should be expected that there will be major changes / breakages.

With v2, there are a few flags that have been made mandatory without which the application will not work.

  -i, --identity-store-id string    Identifier of Identity Store in AWS SSO
  -r, --region string               AWS Region where AWS SSO is enabled

region should be straight forward to understand.

identity-store-id ( which was the source of your error ) is the ID of your Identity Store in AWS IAM Identity Center (Successor to AWS Single Sign-On). You can obtain this ID under the Identity Source tab in the AWS Identity Center Settings. It looks like d-1a2b3c4d5e.

deimosfr commented 1 year ago

Perfect it works! Thanks a lot for the clear explanation @shinenelson :)