Research and Engineering Studio (RES) is an AWS supported open source product that enables IT administrators to provide an easy-to-use web portal for scientists and engineers to run technical computing workloads on AWS.
RES fails to sync AD users after SSO is set up for at least two hours (two AD sync cycles). The cluster-manager CloudWatch logs (under the <environment-name>/cluster-manager log group) include the following error during AD sync:
Error: [INVALID_PARAMS] Invalid params: user.username must match regex: ^(?=.{3,20}$)(?![_.])(?!.*[_.]{2})[a-z0-9._]+(?<![_.])$
The error results from RES only accepting SAMAccount username with the following requirements:
It can only contain lower case ASCII letters, digits, period (.), underscore (_)
A period or underscore is not allowed as the first or last character
It cannot contain two continuous periods or underscores (e.g. .., __, ._,_.)
Affected versions (OSes, schedulers)
2024.04.02 and earlier
Mitigation
Download patch.py and samaccountname_regex.patch by replacing <output-directory> with the directory to download the patch script and patch file in the command below:
a. The patch only applies to RES 2024.04.02.
b. The patch script requires AWS CLI v2, Python 3.9.16 or above, and Boto3.
c. Configure the AWS CLI for the account / region where RES is deployed, and make sure that you have S3 permissions to write to the bucket created by RES.
Restart the Cluster Manager instance for your environment by replacing <environment-name> with the name of your RES environment in the commands below. You may also terminate the instance from the Amazon EC2 Management Console.
Bug description
RES fails to sync AD users after SSO is set up for at least two hours (two AD sync cycles). The cluster-manager CloudWatch logs (under the
<environment-name>/cluster-manager
log group) include the following error during AD sync:The error results from RES only accepting SAMAccount username with the following requirements:
.
), underscore (_
)..
,__
,._
,_.
)Affected versions (OSes, schedulers)
2024.04.02 and earlier
Mitigation
<output-directory>
with the directory to download the patch script and patch file in the command below: a. The patch only applies to RES 2024.04.02. b. The patch script requires AWS CLI v2, Python 3.9.16 or above, and Boto3. c. Configure the AWS CLI for the account / region where RES is deployed, and make sure that you have S3 permissions to write to the bucket created by RES.<environment-name>
with the name of your RES environment in the commands below. You may also terminate the instance from the Amazon EC2 Management Console.