diff --git a/backend/windmill-worker/src/prepare_deps.rs b/backend/windmill-worker/src/prepare_deps.rs index 9c8a5179e3..e0d5f39568 100644 --- a/backend/windmill-worker/src/prepare_deps.rs +++ b/backend/windmill-worker/src/prepare_deps.rs @@ -355,7 +355,7 @@ fn uv_registry_args(registry: &RegistryConfig) -> Vec { } } if *NATIVE_CERT { - args.push("--native-tls".to_string()); + args.push("--system-certs".to_string()); } args } diff --git a/backend/windmill-worker/src/python_executor.rs b/backend/windmill-worker/src/python_executor.rs index 7f2291099a..4ab3d50df8 100644 --- a/backend/windmill-worker/src/python_executor.rs +++ b/backend/windmill-worker/src/python_executor.rs @@ -367,7 +367,7 @@ pub async fn uv_pip_compile( args.extend(["--cert", cert_path]); } if *NATIVE_CERT { - args.extend(["--native-tls"]); + args.extend(["--system-certs"]); } if let Some(exclude_newer) = uv_exclude_newer.as_deref() { args.extend(["--exclude-newer", exclude_newer]); @@ -2247,7 +2247,7 @@ async fn spawn_uv_install( vars.push(("TRUSTED_HOST", host)); } if *NATIVE_CERT { - vars.push(("UV_NATIVE_TLS", "true")); + vars.push(("UV_SYSTEM_CERTS", "true")); } if let Some(timeout) = UV_HTTP_TIMEOUT.as_ref() { vars.push(("UV_HTTP_TIMEOUT", timeout.as_str())); @@ -2371,7 +2371,7 @@ async fn spawn_uv_install( }); } if *NATIVE_CERT { - command_args.extend(["--native-tls"]); + command_args.extend(["--system-certs"]); } // TODO: // Track https://github.com/astral-sh/uv/issues/6715 diff --git a/backend/windmill-worker/src/python_versions.rs b/backend/windmill-worker/src/python_versions.rs index 11674efcd6..b52352915a 100644 --- a/backend/windmill-worker/src/python_versions.rs +++ b/backend/windmill-worker/src/python_versions.rs @@ -556,7 +556,7 @@ impl PyV { child_cmd.env("SSL_CERT_FILE", cert_path); } if *NATIVE_CERT { - child_cmd.env("UV_NATIVE_TLS", "true"); + child_cmd.env("UV_SYSTEM_CERTS", "true"); } if let Some(mirror) = UV_PYTHON_INSTALL_MIRROR.read().await.as_ref() { @@ -664,7 +664,7 @@ impl PyV { } if *NATIVE_CERT { - vars.push(("UV_NATIVE_TLS", "true")); + vars.push(("UV_SYSTEM_CERTS", "true")); } let output = child_cmd // .current_dir(job_dir) diff --git a/backend/windmill-worker/src/worker.rs b/backend/windmill-worker/src/worker.rs index 7c3c3971fa..4f31570218 100644 --- a/backend/windmill-worker/src/worker.rs +++ b/backend/windmill-worker/src/worker.rs @@ -711,7 +711,7 @@ lazy_static::lazy_static! { /// registry configuration. pub static ref TRUSTED_HOST: Option = non_empty_env("PY_TRUSTED_HOST").or_else(|| non_empty_env("PIP_TRUSTED_HOST")); pub static ref INDEX_CERT: Option = non_empty_env("PY_INDEX_CERT").or_else(|| non_empty_env("PIP_INDEX_CERT")); - pub static ref NATIVE_CERT: bool = non_empty_env("PY_NATIVE_CERT").or_else(|| non_empty_env("UV_NATIVE_TLS")).map(|flag| flag == "true").unwrap_or(false); + pub static ref NATIVE_CERT: bool = non_empty_env("PY_NATIVE_CERT").or_else(|| non_empty_env("UV_SYSTEM_CERTS")).or_else(|| non_empty_env("UV_NATIVE_TLS")).map(|flag| flag == "true").unwrap_or(false); /// uv's HTTP request timeout (seconds). The uv invocations use env_clear(), so a /// UV_HTTP_TIMEOUT set on the worker is dropped unless forwarded explicitly. /// Only forwarded when set; otherwise uv keeps its own default. Lets operators diff --git a/debugger/README.md b/debugger/README.md index 1dba49d977..040fb4ef67 100644 --- a/debugger/README.md +++ b/debugger/README.md @@ -139,7 +139,7 @@ the debug service. Where two names are listed the first wins; a worker reads the | `PY_TRUSTED_HOST` / `PIP_TRUSTED_HOST` | Hosts to trust, whitespace-separated (`--trusted-host`) | - | | `PY_INDEX_CERT` / `PIP_INDEX_CERT` | CA bundle for the index, passed to uv as `SSL_CERT_FILE`. Falls back to `SSL_CERT_FILE`, then `REQUESTS_CA_BUNDLE`, then `CURL_CA_BUNDLE`, so a host that configures its CA under any of those names is picked up. Whichever is used **replaces** uv's own roots rather than adding to them, so it has to be a complete bundle: one holding only a private CA leaves every public index untrusted. `bun install` gets the same bundle as `NODE_EXTRA_CA_CERTS`, the only spelling Bun reads | - | | `SSL_CERT_DIR` | Directory of certificates, forwarded to uv as-is. Replaces uv's roots the same way the bundle does, so a directory holding only a private CA leaves public indexes untrusted | - | -| `PY_NATIVE_CERT` / `UV_NATIVE_TLS` | `true` to also trust the platform certificate store (`--native-tls`) | false | +| `PY_NATIVE_CERT` / `UV_SYSTEM_CERTS` | `true` to also trust the platform certificate store (`--system-certs`) | false | | `UV_HTTP_TIMEOUT` | uv HTTP request timeout, in seconds | uv's own default | | `DAP_REGISTRY_CONFIG_TIMEOUT_MS` | How long to wait on the settings fetch before installing without it | 10000 | @@ -172,7 +172,7 @@ and the container still boots. `INIT_SCRIPT` remains the hook for anything more the CA update it aborts startup when it fails. Note what the system store does *not* cover, which is most of what a debug session installs with: -uv trusts its own bundled roots unless `PY_NATIVE_CERT`/`UV_NATIVE_TLS` is `true`, Bun and Node read +uv trusts its own bundled roots unless `PY_NATIVE_CERT`/`UV_SYSTEM_CERTS` is `true`, Bun and Node read only `NODE_EXTRA_CA_CERTS`, and `requests` carries certifi. Registering the CA fixes Python's stdlib `ssl`, `curl` and `git`; the rest still needs the variables above.