Open sdickman-manh opened 1 year ago
I did a quick test by changing line 204 and it successfully polled AWS_USE_FIPS_ENDPOINT and used the FIPS endpoint. But I suspect there is a cleaner way to leverage botocore to generate the appropriate URL.
https://github.com/aws/git-remote-codecommit/blob/master/git_remote_codecommit/__init__.py#L204
if "AWS_USE_FIPS_ENDPOINT" in os.environ and os.environ["AWS_USE_FIPS_ENDPOINT"] == "true":
endpoint="git-codecommit-fips"
else:
endpoint="git-codecommit"
hostname = os.environ.get('CODE_COMMIT_ENDPOINT', '{}.{}.{}'.format(endpoint, region, website_domain_mapping(region)))
To simplify the use of FIPS endpoints I recommend that git-remote-codecommit use the same mechanisms as the AWS SDKs:
https://docs.aws.amazon.com/general/latest/gr/rande.html#FIPS-endpoints
We currently use the undocumented environment variable CODE_COMMIT_ENDPOINT to do this. But would prefer that the AWS_USE_FIPS_ENDPOINT apply here also.