-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Public project]Re-push a deleted Chart via Helm V3 fails by 401 #11271
Comments
This is related to #11266 Current response in |
ywk253100
added a commit
to ywk253100/harbor
that referenced
this issue
Mar 26, 2020
…ibution.manifest.v1+json Fixes goharbor#11271, support replicate images with media type application/vnd.docker.distribution.manifest.v1+json Signed-off-by: Wenkai Yin <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 2, 2020
* Redirect CLI "ping" to token endpooint Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 2, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 2, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 2, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 2, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 3, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 3, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
reasonerjt
added a commit
to reasonerjt/harbor
that referenced
this issue
Apr 3, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a HEAD request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]>
Fixed in #11406 Verified in build |
cafeliker
pushed a commit
to cafeliker/harbor
that referenced
this issue
Jul 14, 2020
Docker CLI fails if it's not logged in upon seeing "basic" realm challenging while pinging the "/v2" endpoint. (goharbor#11266) Some CLI will send HEAD to artifact endpoint before pushing (goharbor#11188)(goharbor#11271) To fix such problems, this commit re-introduce the token auth flow to the CLIs. For a HEAD request to "/v2/xxx" with no "Authoirzation" header, the v2_auth middleware populates the "Www-Authenticate" header to redirect it to token endpoint with proper requested scope. It also adds security context to based on the content of the JWT which has the claims of the registry. So a request from CLI carrying a token signed by the "/service/token" will have proper permissions. Signed-off-by: Daniel Jiang <[email protected]> Signed-off-by: Ye Liu <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After that, I get a 401.
The root cause is probably that Harbor returns 200 to helm for the manifest head request, and helm client doesn't take auth header in the following PUT request.
Same thing happens on
docker app push
The text was updated successfully, but these errors were encountered: