Use temporary oauth2 tokens for Google registries#93
Merged
hhyasdf merged 19 commits intoAliyunContainerService:masterfrom Mar 31, 2022
Merged
Use temporary oauth2 tokens for Google registries#93hhyasdf merged 19 commits intoAliyunContainerService:masterfrom
hhyasdf merged 19 commits intoAliyunContainerService:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #93 +/- ##
=======================================
Coverage 53.96% 53.96%
=======================================
Files 1 1
Lines 63 63
=======================================
Hits 34 34
Misses 24 24
Partials 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
hhyasdf
reviewed
Mar 22, 2022
hhyasdf
reviewed
Mar 22, 2022
hhyasdf
reviewed
Mar 23, 2022
added 2 commits
March 23, 2022 07:52
Collaborator
|
@DennisD2 thanks, we are almost done here! Could you please fix the golangci-lint error? |
Contributor
Author
|
Sorry was some days off. Will check the lint issue now. |
Contributor
Author
|
All green now :-) |
Collaborator
|
Thanks for your contribution! |
This file contains hidden or 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
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.
Pull Request Description
Describe what this PR does / why we need it
For Google registries (*.gcr.io), an OAUTH2 token can be created from a (base64 encoded) service account token.
Define credentials like this:
Does this pull request fix one issue?
Fixes #62
Describe how you did it
Added method for getting the temporary OAUTH2 token from the permanent service account token
Describe how to verify it
Define a google repo (with gcr.io in hostname), with credentials including a permanent service account token as password value, use the string
_oauth2_as username, and use this as image sync target. The sync will work, and use an on-the-fly created OAUTH2 tokenSpecial notes for reviews