Repository navigation
Issue #61: pods/exec RBAC needs "get" in addition to "create" (WebSocket exec clients authorize the GET handshake) - #62
Merged
Conversation
…Socket exec clients - k8s/02-rbac.yaml in CRPCF_DEPLOYMENT_GUIDE.md: pods/exec verbs now ["create", "get"] with an explanatory comment (WebSocket exec handshake is an HTTP GET authorized with the 'get' verb; 'create' stays required for legacy SPDY/POST clients and is verified on the WebSocket path from k8s >= 1.35) - troubleshooting section: both 'kubectl auth can-i create/get pods/exec' checks and the 403-on-101 symptom note - section 8.3 exec bullet: documents the actual transport (WebSocket, v4.channel.k8s.io - not SPDY) and the create+get RBAC requirement; code/test comments and CHANGELOG wording corrected accordingly Co-authored-by: larsbuch <larsbuch@users.noreply.github.com>
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
Docs + comment fix for #61, verified against the KubernetesClient v17.0.14 sources:
NamespacedPodExecAsync→MuxedStreamNamespacedPodExecAsync→WebSocketNamespacedPodExecAsyncwith subprotocolv4.channel.k8s.io— a WebSocket GET upgrade, which the API server authorizes with thegetverb onpods/exec(kubernetes/kubernetes#78741). A create-only grant therefore failsExecuteAsyncwith403 ... when status code '101' was expectedeven thoughkubectl auth can-i create pods/execreturns yes.CRPCF_DEPLOYMENT_GUIDE.md§3.1 (k8s/02-rbac.yaml):pods/execverbs are now["create", "get"]with an explanatory comment (createstays required for legacy SPDY/POST clients, and k8s >= 1.35 additionally verifiescreateon the WebSocket path).kubectl auth can-i create pods/exec/get pods/execchecks and the 403-on-101 symptom.v4.channel.k8s.io— not SPDY) and thecreate+getRBAC requirement.Verification
Kubernetes.WebSocket.cs:WebSocketNamespacedPodExecAsyncbuilds awss://.../pods/{name}/execGET withV4BinaryWebsocketProtocol).pr-validation.yml+dotnet-cicd.yml): build + full test suite — watched until green (changes are docs/comments, but the pipeline still runs).Closes #61