security: Prevent session hijacking through a malicious notebook. #3550
security: Prevent session hijacking through a malicious notebook. #3550sven-ernw wants to merge 7 commits into
Conversation
…icious notebook. Add the EnvoyFilter ``envoy-filter-gateway.yaml`` in the `oauth2-proxy` overlay that strips the authentication cookie from requests before they are forwarded to backend services, such as a malicious notebook. Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
…icious notebook. Add a description of how to set up multi-domain support for notebooks, including the configuration parameter (disabled by default). Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
…icious notebook. Add a Security Considerations section to the README.md which describes important security measures for a secure production setup. Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
|
Welcome to the Kubeflow Community Distribution Repository Thanks for opening your first PR. Your contribution means a lot to the Kubeflow community. Before making more PRs: Community Resources:
Thanks again for helping to improve Kubeflow. |
There was a problem hiding this comment.
Pull request overview
This pull request hardens Kubeflow notebook access against session hijacking.
Changes:
- Adds gateway cookie filtering.
- Documents production security and multi-domain notebook configuration.
- Adds notebook-controller subdomain parameters.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
README.md |
Adds production security guidance. |
proposals/20260705-secure-notebook-setup.md |
Documents multi-domain notebook setup. |
common/oauth2-proxy/README.md |
Documents cookie-name coupling. |
common/oauth2-proxy/base/oauth2_proxy.cfg |
Adds subdomain cookie guidance. |
common/istio/istio-install/overlays/oauth2-proxy/kustomization.yaml |
Includes the gateway filter. |
common/istio/istio-install/overlays/oauth2-proxy/envoy-filter-gateway.yaml |
Filters the session cookie. |
applications/notebooks-v1/upstream/notebook-controller/manager/params.env |
Adds subdomain parameters. |
applications/notebooks-v1/upstream/notebook-controller/manager/manager.yaml |
Injects the parameters into the controller. |
…icious notebook. Implemented suggestions from Copilot review. Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
|
Addressed all comments from Copilot. |
|
/assign @juliusvonkohout |
|
/ok-to-test |
…icious notebook. Implemented suggestions from the second Copilot review. Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@thesuperzapper I have reviewed and fixed all suggestions from the CoPilot review. |
…icious notebook. Implemented suggestions from the second Copilot review. Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
proposals/20260705-secure-notebook-setup.md:100
- Remove the duplicated word
section.
This will make the setup work. Please ensure that you follow the recommendations in the [_Security Considerations_ section](../README.md#security-considerations) section for guidance on a secure setup.
…icious notebook. Implemented suggestions from the second Copilot review. Signed-off-by: Lorin Lehawany <llehawany@ernw.de> Signed-off-by: Sven Nobis <snobis@ernw.de>
|
Fixed all feedback from review, pull request can be merged once kubeflow/notebooks#562 is merged. |
✏️ Summary of Changes
This pull request addresses the security issue described in GHSA-qjw6-hpc7-w36h together with the notebook's pull request !562. It prevents session hijacking through a malicious notebook.
This will be achieved by the following changes:
envoy-filter-gateway.yamlin theoauth2-proxyoverlay that strips the authenticating cookie from requests before it is forwarded to backend services like a malicious notebook. This prevents malicious notebooks from accessing other users' authentication credentials. This solution was discussed with @thesuperzapper during a Notebooks WG meeting.proposals/20260705-secure-notebook-setup.mdand the configuration parameter (disabled by default). This setup is required because even without authentication credentials, an attacker can control the user agent (browser) through a malicious notebook to make requests to the Kubeflow APIs.📦 Dependencies
🐛 Related Issues
✅ Contributor Checklist
CC: @lorinl @thesuperzapper @juliusvonkohout