Skip to content

Implement Secure Port Forwarding#1128

Open
aojea wants to merge 7 commits into
kubeflow:notebooks-v2from
aojea:ssh
Open

Implement Secure Port Forwarding#1128
aojea wants to merge 7 commits into
kubeflow:notebooks-v2from
aojea:ssh

Conversation

@aojea
Copy link
Copy Markdown

@aojea aojea commented May 26, 2026

This PR implements secure, bidirectional TCP port forwarding (tunneling) over WebSockets for Kubeflow Workspaces. This allows users to securely access workspace resources (like SSH or other container ports) without exposing raw ports over the internet.

  • Expand the WorkspaceKindPort to allow to expose TCP ports in addition to the existing HTTP ones (port forwarding is only allowed on TCP types). This is required because for HTTP the controller creates an Istio VirtualService to route web traffic from the browser through the Istio Ingress Gateway directly to the container but it breaks TCP only traffic. Setting the Service to TCP allows to forward it.
  • It proxies TCP traffic bidirectionally via a secure WebSocket connection using the workspaces-backend API service.
  • Introduces a new, narrow connect verb on the workspaces Kubernetes resource. Access is strictly enforced at the API layer via Delegated SubjectAccessReviews (SAR).
  • Enforces strict same-origin checking on the WebSocket handshake for browser-based clients, ensuring it is secure-by-default in production.
  • The backend dynamically resolves and routes traffic to the workspace's underlying Kubernetes Service based on label selectors.

closes: #23

Human at the wheel, AI in the passenger seat

@github-project-automation github-project-automation Bot moved this to Needs Triage in Kubeflow Notebooks May 26, 2026
@google-oss-prow google-oss-prow Bot added the area/backend area - related to backend components label May 26, 2026
@google-oss-prow
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kimwnasptd for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot added area/ci area - related to ci area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 size/XXL labels May 26, 2026
@aojea aojea changed the title Implement ecure Port Forwarding Implement Secure Port Forwarding May 26, 2026
aojea added 7 commits May 26, 2026 11:44
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend area - related to backend components area/ci area - related to ci area/controller area - related to controller components area/v2 area - version - kubeflow notebooks v2 size/XXL

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

1 participant