fork distribution client v3 auth-challenge as an internal package#2247
Closed
thaJeztah wants to merge 17 commits intogoogle:mainfrom
Closed
fork distribution client v3 auth-challenge as an internal package#2247thaJeztah wants to merge 17 commits intogoogle:mainfrom
thaJeztah wants to merge 17 commits intogoogle:mainfrom
Conversation
Split challenges into its own package. Avoids possible import cycle with challenges from client. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Manish Tomar <manish.tomar@docker.com>
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Merge remote-tracking branch 'cli_temp/master' into vlan_network Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…docs' into restore_docs3 Restore the documentation that was moved to https://github.com/docker/docker.github.io Conflicts: docs/compatibility.md docs/deploying.md docs/deprecated.md docs/garbage-collection.md docs/glossary.md docs/help.md docs/images/notifications.png docs/index.md docs/insecure.md docs/introduction.md docs/migration.md docs/notifications.md docs/recipes/apache.md docs/recipes/index.md docs/recipes/mirror.md docs/recipes/nginx.md docs/recipes/osx-setup-guide.md docs/recipes/osx/config.yml docs/storage-drivers/azure.md docs/storage-drivers/filesystem.md docs/storage-drivers/gcs.md docs/storage-drivers/index.md docs/storage-drivers/inmemory.md docs/storage-drivers/oss.md docs/storage-drivers/s3.md docs/storage-drivers/swift.md
gofumpt (https://github.com/mvdan/gofumpt) provides a supserset of `gofmt` / `go fmt`, and addresses various formatting issues that linters may be checking for. We can consider enabling the `gofumpt` linter to verify the formatting in CI, although not every developer may have it installed, so for now this runs it once to get formatting in shape. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Our registry client is not currently in a good place to be used as the reference OCI Distribution client implementation. But the registry proxy currently depends on it. Make the registry client internal to the distribution application to remove it from the API surface area (and any implied compatibility promises) of distribution/v3@v3.0.0 without breaking the proxy. Signed-off-by: Cory Snider <csnider@mirantis.com>
We make sure they're not hiding at the bottom or in the middle which makes debugging an utter nightmare! Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This forks the distribution's registry client auth-challenge code v3.0.0; distribution/distribution@9ed95e7 The client code has moved to an internal package in the distribution project, and is used to handle `WWW-Authenticate` headers. It was written a long time ago, and only handles RFC 2617 (superseded by RFC 9110). Possibly there's more current implementations for this, but this would introduce new dependencies, so we can keep the status quo for now, and fork this code as an internal package. Keeping it internal, due to the known limitations mentioned above, and to avoid it being used by others assuming it's a general-purpose implementation. This is the result of the following steps: # install filter-repo (https://github.com/newren/git-filter-repo/blob/main/INSTALL.md) brew install git-filter-repo # create a temporary clone of docker cd ~/Projects git clone https://github.com/distribution/distribution.git distribution_auth cd distribution_auth # switch to v3.0.0 (git-filter doesn't like multiple branches, so reset) git reset --hard v3.0.0 # commit taken from git rev-parse --verify HEAD 9ed95e7365224025ee89365e12cf128e1f1bf965 git filter-repo --analyze # remove all code, except for 'internal/client/auth/challenge' # rename to 'pkg/v1/remote/internal/authchallenge' # include history of old location ('registry/client/auth/challenge') git filter-repo \ --force \ --path 'internal/client/auth/challenge' \ --path 'registry/client/auth/challenge' \ --path-rename internal/client/auth/challenge:pkg/v1/remote/internal/authchallenge # go to the target github.com/docker/docker repository cd ~/go/src/github.com/google/go-containerregistry # create a branch to work with git checkout -b fork_registryclient_authchallenge # add the temporary repository as an upstream and make sure it's up-to-date git remote add distribution_auth ~/Projects/distribution_auth git fetch distribution_auth # merge the upstream code git merge --allow-unrelated-histories --signoff -S distribution_auth/main Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The Manager code is only used as part of tests; move it to _test files to have a clearer separation between "production" code and test-code. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
761ab02 to
b0cc5e1
Compare
Contributor
Author
|
Doh! Looks like preserving the commit history trips up the CLA check; I could forego that, but tried to keep history (but maybe it's not critical)? cc @Subserial @jonjohnsonjr any thoughts? |
Contributor
Author
|
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.
fork distribution client v3 auth-challenge as an internal package
This forks the distribution's registry client auth-challenge code v3.0.0;
distribution/distribution@9ed95e7
The client code has moved to an internal package in the distribution project,
and is used to handle
WWW-Authenticateheaders. It was written a long timeago, and only handles RFC 2617 (superseded by RFC 9110). Possibly there's more
current implementations for this, but this would introduce new dependencies, so
we can keep the status quo for now, and fork this code as an internal package.
Keeping it internal, due to the known limitations mentioned above, and to avoid
it being used by others assuming it's a general-purpose implementation.
This is the result of the following steps:
After adding the internal fork;
The Manager code is only used as part of tests; move it to _test files
to have a clearer separation between "production" code and test-code.