awslabs / ssosync

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

'SCIMEndpointUrl' must match pattern - CloudFormation / Lambda. #222

Closed talhelfgott666 closed 3 weeks ago

talhelfgott666 commented 3 weeks ago

Hey team, It looks like AWS may have updated their URL scheme for SCIM endpoints, which is causing validation issues. Parameter 'SCIMEndpointUrl' must match pattern (?!.*\s)|(https://scim.(us(-gov)?|ap|ca|cn|eu|sa)-(central|(north|south)?(east|west)?)-([0-9]{1}).amazonaws.com/(.*)-([a-z0-9]{4})-([a-z0-9]{4})-([a-z0-9]{12})/scim/v2/) (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: 4939b3d5-24c2-4970-ace8-fc60764adc3d; Proxy: null)

Here’s the URL provided by AWS: https://scim.eu-central-1.amazonaws.com/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/scim/v2

However, this is the URL pattern currently expected in validation: https://scim.eu-central-1.amazonaws.com/XXXX-XXXX-XXXXXXXXXXXX/scim/v2

or in a generalized format: https://scim.{region}.amazonaws.com/{4-char}-{4-char}-{12-char}/scim/v2

Could you help look into adjusting the validation to support the updated format, if this is indeed a change from AWS?

Thanks!

ChrisPates commented 3 weeks ago

Short term add a trailing '/' and your good.

In the meantime, I'll tweak the regex to make that character optional.