Repository navigation
[Core/Auth][docs] Document token authentication on by default for all clusters - #67724
Conversation
… clusters Signed-off-by: Chi-Sheng Liu <[email protected]>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…p upgrade note Signed-off-by: Chi-Sheng Liu <[email protected]>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…missions Signed-off-by: Chi-Sheng Liu <[email protected]>
dstrodtman
left a comment
There was a problem hiding this comment.
Hi @MortalHappiness, this is a style and grammar review from the Ray docs team. Douglas Strodtman ran it with help from Claude Code, and has read and stands behind every comment. It covers prose, grammar, and docs conventions against the Ray documentation style guide. It doesn't cover whether the described behavior is correct. That belongs to the Core maintainers, and @rueian's approval covers it.
This is a clear rewrite. Moving the token steps into the VM, on-prem, Slurm, YARN, and Serve guides is the right call for a change of default, and the mismatch table under "Opt out" is useful. The inline suggestions are mostly sentence structure: comma-wrapped asides, one inline six-item list, and two heading-case fixes in on-premises.md. They don't change any technical claim. The one exception is the comment on token-auth.md L21, which is a question about consistency between two pages in this PR.
Questions
- Removing the banner in
conf.py. Before Ray 2.61, the banner warned readers that the default was about to change. Once 2.61 ships, this is the release where upgrades start failing for clusters without a token, so a short pointer could still help. For example: "Starting in Ray 2.61, token authentication is on by default for all clusters. Read the setup guide." Did you mean to drop the banner, or replace it? Either way is fine from the docs side. I just want to make sure removing it was intentional. ray upbehavior in three places. The token-shipping description appears ingetting-started.md, theauth_modereference entry, andtoken-auth.md. They agree today, and the token-auth page links to the getting-started section. If any detail changes later, someone will need to update all three. That's not a blocker, just a note for whoever maintains these pages.
From the docs side, nothing here blocks the PR.
| Starting in Ray 2.61, token authentication is on for every Ray cluster unless you set `RAY_AUTH_MODE=disabled`. Ray authenticates all external APIs and internal communications with the token as a shared secret. Every node in a cluster and every client that connects to it needs the same token. | ||
|
|
||
| The process for generating and configuring authentication tokens differs depending on how you launch your Ray cluster. When you start a local instance of Ray using `ray.init()` with token authentication enabled, Ray automatically generates and uses a token. | ||
| Only the following create a token when none exists: |
There was a problem hiding this comment.
Question, not a style fix: this list says "Only the following" and names three entry points, but core/internals/token-authentication.md in this same PR names six, adding ray.cluster_utils.Cluster(), ray.cluster_utils.AutoscalingCluster, and C++ and Java drivers that start their own cluster. A reader who compares the two pages sees a contradiction on the word "Only." Would you either drop "Only" here, or say this list covers the common entry points and link to the internals page for the full set? I'll defer to you on which framing is accurate.
There was a problem hiding this comment.
I dropped "Only" here and added a sentence after the list: Ray's test cluster utilities and C++ and Java drivers that start their own cluster also create a token, with a link to the internals page for the full list. The three entry points shown are the ones most readers use.
Signed-off-by: Chi-Sheng Liu <[email protected]>
dstrodtman
left a comment
There was a problem hiding this comment.
Docs stamp removes other Ray library CODEOWNER requirements for docs-only PRs.
Approving here to unblock, as it looks like edits in other areas are small. Trusting you to communicate with other library maintainers as necessary on this change.
Thanks!
| # The entrypoint (simple-trainer.py) will only run on the head node. | ||
| # Create the auth token once. Every node reads it from ~/.ray/auth_token, | ||
| # so this assumes the home directory is shared across the job's nodes. | ||
| ray get-auth-token --generate |
There was a problem hiding this comment.
Could we redirect stdout here: ray get-auth-token --generate > /dev/null? This command prints the token even when it already exists, so every job writes the persistent cluster credential into its Slurm output log
|
|
||
| `ray metrics launch-prometheus` needs no change when it runs where the token is. It fails if it finds no token. When `RAY_AUTH_TOKEN` is set, it writes the token into its own config with file mode `0600`. Otherwise, the config reads the token file at `RAY_AUTH_TOKEN_PATH` or `~/.ray/auth_token`. The config is `ray_prometheus.yml` in the Prometheus directory it downloads, such as `./prometheus-<version>.linux-amd64/`. | ||
|
|
||
| If you run your own Prometheus, including one that uses the config Ray generates at `/tmp/ray/session_latest/metrics/prometheus/prometheus.yml`, copy the token file to the Prometheus host and add an `authorization` block to the `ray` scrape job: |
There was a problem hiding this comment.
nit: could we also update the HTTP service discovery example above to include an authorization block inside http_sd_configs? auth on the scrape job only authenticates metric scrapes. discovery uses a separate HTTP client
Signed-off-by: Chi-Sheng Liu <[email protected]>
Signed-off-by: Chi-Sheng Liu <[email protected]>
Description
Updates the docs for #67523, which makes token authentication the default for every cluster:
ray-security/token-auth.mdandcore/internals/token-authentication.md: who creates the token, how nodes and clients get it, and theRAY_AUTH_MODE=disabledopt-out.cluster/metrics.md: scraping with the token, andRAY_AUTH_SKIP_METRICS.starting-ray.mdand Servedeploy-vm.md: create the token beforeray start --head. The cluster YAML reference documents the newauth_modekey.conf.py: removes the token-auth banner.The KubeRay guide is left to #67057.
Related issues
Closes #67056