Copilot commented on code in PR #7932:
URL: https://github.com/apache/texera/pull/7932#discussion_r3848363252
##########
notebook-migration-service/src/main/scala/org/apache/texera/service/resource/NotebookMigrationResource.scala:
##########
@@ -106,11 +106,12 @@ object NotebookMigrationResource extends LazyLogging {
}
}
- // jupyterUrl and jupyterToken are single process-wide values, so this
service still
- // targets one Jupyter per process (the per-user-pod model) and must not be
deployed as a
- // shared global instance yet: every user would get the same Jupyter and the
same token.
- // Resolving these per user is a later stage of the migration (#7665).
- private val jupyterUrl = StorageConfig.jupyterURL
+ // Process-wide values, so this service targets one Jupyter per process (the
per-user-pod
+ // model) and must not be deployed as a shared global instance yet: every
user would get
+ // the same Jupyter and token. Per-user resolution is #7665.
+ // internalJupyterUrl is what this service calls, publicJupyterUrl is what
the browser loads.
+ private val internalJupyterUrl = StorageConfig.jupyterInternalURL
+ private val publicJupyterUrl = StorageConfig.jupyterPublicURL
Review Comment:
The core internal/public split is not exercised with distinct values: the
existing resource tests use the default where both URLs are `localhost:9100`,
so swapping these fields would still pass. Add a regression test that
configures different URLs and verifies probes/upload/delete target the internal
URL while API responses use only the public URL.
##########
bin/single-node/.env:
##########
@@ -99,3 +100,12 @@ LLM_ENDPOINT=http://nginx:8080
TEXERA_DASHBOARD_SERVICE_ENDPOINT=http://dashboard-service:8080
WORKFLOW_COMPILING_SERVICE_ENDPOINT=http://workflow-compiling-service:9090
WORKFLOW_EXECUTION_SERVICE_ENDPOINT=http://workflow-runtime-coordinator-service:8085
+
+# Notebook migration tool
+# Toggles the tool in the GUI; the migration itself needs an LLM key above.
+GUI_WORKFLOW_WORKSPACE_PYTHON_NOTEBOOK_MIGRATION_ENABLED=true
+# Weak default token so Jupyter is not fully open on its published port.
+JUPYTER_TOKEN=texera
Review Comment:
This ships every installation with the same known credential while Compose
publishes Jupyter on all host interfaces. Because authenticated Jupyter access
permits arbitrary code execution, anyone who can reach port 9100 can use the
documented default token without authenticating to Texera. Generate a unique
token during installation or require an explicit strong token; alternatively
bind the port to loopback by default.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]