-
Notifications
You must be signed in to change notification settings - Fork 302
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
Support FIPS endpoint #692
Conversation
cc94dc3
to
7f84ee5
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 2 DRY comments
- per offline discussion & testing, push/pull via FIPs needs fully qualified image name to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SoManyHs Tried testing it- how come this happens?
With Fips:
amazon-ecs-cli ((HEAD detached at H3Fork/hhh-fips)) $ ecs-cli push cats/fluentd --use-fips --debug
DEBU[0000] Using FIPS endpoint: https://ecr-fips.us-west-2.amazonaws.com
INFO[0000] Getting AWS account ID...
FATA[0000] Error executing 'push': SerializationError: failed to decode query XML error response
status code: 403, request id: 54321916-1845-11e9-89d3-3f12900d556d
caused by: expected element type <ErrorResponse> but have <InvalidSignatureException>
Without Fips:
amazon-ecs-cli ((HEAD detached at H3Fork/hhh-fips)) $ ecs-cli push cats/fluentd --debug
INFO[0000] Getting AWS account ID...
DEBU[0000] Getting authorization token...
DEBU[0000] Checking file cache registry=144718711470
DEBU[0000] Using cached token registry=144718711470
INFO[0000] Tagging image image=cats/fluentd repository=144718711470.dkr.ecr.us-west-2.amazonaws.com/cats/fluentd tag=
INFO[0000] Image tagged
DEBU[0000] Check if repository exists repository=cats/fluentd
INFO[0000] Pushing image repository=144718711470.dkr.ecr.us-west-2.amazonaws.com/cats/fluentd tag=
INFO[0001] Image pushed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SoManyHs I think FIPs support should be advertised in our README
uri := "012345678912.dkr.ecr.us-east-1.amazonaws.com" | ||
expectedImage := uri + "/" + repository | ||
observedRegistryURI, observedRepo, observedTag, err := splitImageName(expectedImage, "[:|@]", "format") | ||
tests := []struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 table driven tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, but
README.md
Outdated
@@ -984,6 +984,24 @@ INFO[0018] Started container... container=bf35a813-dd76-4fe0-b5a2-c1334c2331f4/l | |||
|
|||
For more information about using private registries with ECS, see [Private Registry Authentication for Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth.html). | |||
|
|||
### Using FIPS Endpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be added to the table of contents?
Related to https://github.com/awslabs/amazon-ecr-credential-helper/pull/127/files
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.