[plugins] Advise the cli-download role on a 403 from registry-packages-proxy - #452
Closed
Glitchy-Sheep wants to merge 1 commit into
Closed
[plugins] Advise the cli-download role on a 403 from registry-packages-proxy#452Glitchy-Sheep wants to merge 1 commit into
Glitchy-Sheep wants to merge 1 commit into
Conversation
…s-proxy Plugins are downloaded over /v1/images/, and kube-rbac-proxy authorizes that whole prefix through the deployments/cli-binary subresource, granted by the ClusterRole d8:registry-packages-proxy:cli-download. The 403 diagnostic named packages-download instead. That role covers /v1/packages/, which the CLI never calls, so a user who followed the advice bound the role and still got 403. The same suggestion told the user to wait about 5 minutes and retry with a fresh token. kube-rbac-proxy caches a denial for about 30 seconds, and the existing token keeps working, so both halves of that hint were wrong. The d8 dist copy of the diagnostic carried the same wrong hint and is fixed too. Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Contributor
Author
|
Moved into #451 - the fix rides along with the mirror push change instead of a separate PR. |
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.
Summary
The 403 diagnostic for
d8 dist pluginstold users to bind the wrong ClusterRole. They bound it and still got 403.Problem
/v1/images/deployments/cli-binarysubresourced8:registry-packages-proxy:cli-downloadd8:registry-packages-proxy:packages-download, which covers/v1/packages/and is never called by the CLId8 distcopy of the diagnostic named the right role but carried the same wrong hint about the cacheFix
cli-downloadfor pluginsBefore / After
Before: a 403 on
d8 dist plugins install <name>sent the user topackages-download, which does not open the route.After: the same 403 sends the user to
cli-download, the role that actually grants/v1/images/.Tests
TestDiagnoseininternal/plugins/cmd/errdetectnow pinscli-downloadin the 403 adviceNotes
modules/039-registry-packages-proxy/templates/deployment.yamlin deckhouse maps/v1/images/to subresourcecli-binaryand/v1/packages/topackagesinternal/plugins/README.md,internal/selfupdate/README.md); only the code lagged behind