-
Notifications
You must be signed in to change notification settings - Fork 644
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
Use top-level authentication for extended auth #1286
Conversation
When relying on [Extended Authentication](https://dmp.fabric8.io/#extended-authentication) for ECR, we unfortunately have to configure the `push` and `pull` sections, even though they are the same. The problem seems to be that the AWS session token has to be put into the `<auth>` element, whereas the general section only knows an `<authToken>` element. This change would allow Extended Authentication to work with the general configuration. When using system properties on the other hand, the correct property is `docker.auth` instead. So maybe the proper way forward would be to deprecate the `authToken` property and introduce `auth` - or vice versa.
Codecov Report
@@ Coverage Diff @@
## master #1286 +/- ##
============================================
- Coverage 55.44% 55.44% -0.01%
Complexity 1764 1764
============================================
Files 156 156
Lines 8487 8488 +1
Branches 1304 1304
============================================
Hits 4706 4706
- Misses 3327 3328 +1
Partials 454 454
|
Sorry, I do not fully understand the issue. Do you say that pull and push uses a different configuration format than what ? Could you please elaborate a bit when |
@rhuss We have to configure dmp like this:
instead of this
Same goes for configuration via System properties. Now this is awkward at least for the AWS-related stuff; but my understanding is that the |
"Extended Authentication" (not sure where the term comes from) means to fetch an authorization token to access AWS ECR, AWS's docker repositories. |
This allows extended ecr authentication to share the same token for pull and push requests. See also fabric8io#1286.
Ok, I see. I think we can fix this more generally by deprecating the top-level "authToken" in favor of an "auth" there, too. I created a PR #1296 would be awesome if you could verify whether it fits your bill. |
#1296 looks good to me, just added some minor comments. |
This allows extended ecr authentication to share the same token for pull and push requests. See also fabric8io#1286.
Perfect, so lets get #1296 merged and I'm closing this one. Thanks! |
Thank you! |
* fix(auth): Deprecate "authToken" in favor of "auth" This allows extended ecr authentication to share the same token for pull and push requests. See also #1286. * chore(auth): Applied review comments
When relying on Extended Authentication for ECR, we unfortunately have to configure the
push
andpull
sections, even though they are the same. The problem seems to be that the AWS session token has to be put into the<auth>
element, whereas the general section only knows an<authToken>
element. This change would allow Extended Authentication to work with the general configuration.Maybe the proper way forward would be to deprecate the
authToken
property and introduceauth
- or vice versa.