-
Notifications
You must be signed in to change notification settings - Fork 618
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
S3 config changes to use S3 FIPS endpoints on FIPS hosts #4202
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
harishxr
changed the title
[WIP] S3 config changes to use S3 FIPS endpoints on FIPS hosts
S3 config changes to use S3 FIPS endpoints on FIPS hosts
Jun 10, 2024
mye956
reviewed
Jun 11, 2024
mye956
previously approved these changes
Jun 11, 2024
sparrc
reviewed
Jun 12, 2024
sparrc
reviewed
Jun 12, 2024
sparrc
reviewed
Jun 12, 2024
sparrc
approved these changes
Jun 12, 2024
mye956
approved these changes
Jun 12, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request enables ECS Agent on linux to make S3 calls using S3 FIPS Endpoints when FIPS mode is enabled on the host machine.
Implementation details
NewS3ManagerClient
andNewS3Client
functions to usecfg.UseFIPSEndpoint
to call FIPS S3 endpoints when FIPS mode is detected on the host.getRegionFromBucket
function to uses3manager.GetBucketRegionWithClient
with options to ensure virtual-hosted-style URLs are used when FIPS mode is enabled on the host.Testing
test1.env
file in the S3 bucket with the following contentdocker exec -it <container_id> sh
and executed the following commands to access the values defined in the env filesNew tests cover the changes:
Yes
Description for the changelog
S3 config changes to use S3 FIPS endpoints on FIPS hosts
Does this PR include breaking model changes? If so, Have you added transformation functions?
No
References
s3manager.GetBucketRegionWithClient
will cover the special region caseEU
andus-east-1
per https://github.com/aws/aws-sdk-go/blob/main/service/s3/bucket_location.go#L27Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.