Skip to content

Issue #61: pods/exec RBAC needs "get" in addition to "create" (WebSocket exec clients authorize the GET handshake) - #62

Merged
larsbuch merged 1 commit into
mainfrom
vibe/rbac-pods-exec-get-293624
Nov 29, 2026
Merged

larsbuch merged 1 commit into
mainfrom
vibe/rbac-pods-exec-get-293624

Conversation

@larsbuch

Copy link
Copy Markdown
Contributor

Summary

Docs + comment fix for #61, verified against the KubernetesClient v17.0.14 sources: NamespacedPodExecAsync → MuxedStreamNamespacedPodExecAsync → WebSocketNamespacedPodExecAsync with subprotocol v4.channel.k8s.io — a WebSocket GET upgrade, which the API server authorizes with the get verb on pods/exec (kubernetes/kubernetes#78741). A create-only grant therefore fails ExecuteAsync with 403 ... when status code '101' was expected even though kubectl auth can-i create pods/exec returns yes.

Verification

  • Transport and authorization behavior verified against the KubernetesClient v17.0.14 source (Kubernetes.WebSocket.cs: WebSocketNamespacedPodExecAsync builds a wss://.../pods/{name}/exec GET with V4BinaryWebsocketProtocol).
  • CI on the PR (pr-validation.yml + dotnet-cicd.yml): build + full test suite — watched until green (changes are docs/comments, but the pipeline still runs).

Closes #61

…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>
@larsbuch
larsbuch marked this pull request as ready for review November 29, 2026 14:45
@larsbuch
larsbuch merged commit eea14ec into main Nov 29, 2026
11 checks passed
@larsbuch
larsbuch deleted the vibe/rbac-pods-exec-get-293624 branch November 29, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deployment guide RBAC: pods/exec needs 'get' in addition to 'create' - WebSocket exec clients authorize the GET handshake with the 'get' verb

2 participants