You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
- convert debug logs in authentication_token_loader to info so that
users are aware of where the token being used is being loaded from
- When we raise the `AuthenticationError`, if RAY_AUTH_MODE is not set
to token we should explicitly print that in the error message
- in error messages suggest storing tokens in filesystem instead of env
- add state api tests in test_token_auth_integration.py
---------
Signed-off-by: sampan <sampan@anyscale.com>
Co-authored-by: sampan <sampan@anyscale.com>
Copy file name to clipboardExpand all lines: doc/source/ray-security/token-auth.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,10 +93,7 @@ $ export RAY_AUTH_MODE=token
93
93
# First attempt - an error is raised if no token exists.
94
94
$ ray start --head
95
95
...
96
-
RuntimeError: Token authentication is enabled but no authentication token was found. Please provide an authentication token using one of these methods:
97
-
1. Set the RAY_AUTH_TOKEN environment variable
98
-
2. Set the RAY_AUTH_TOKEN_PATH environment variable (pointing to a token file)
99
-
3. Create a token file at the default location: ~/.ray/auth_token
96
+
ray.exceptions.AuthenticationError: Token authentication is enabled but no authentication token was found. Ensure that the token forthe cluster is availablein a local file (e.g., ~/.ray/auth_token or via RAY_AUTH_TOKEN_PATH) or as the `RAY_AUTH_TOKEN` environment variable. To generate a token forlocal development, use `ray get-auth-token --generate` For remote clusters, ensure that the token is propagated to all nodes of the cluster when token authentication is enabled. For more information, see: https://docs.ray.io/en/latest/ray-security/auth.html
". Ensure that you have `RAY_AUTH_MODE=token` set and the token for the cluster is available as the `RAY_AUTH_TOKEN` environment variable or a local file. "
498
+
# Check if RAY_AUTH_MODE is set to token and add a heads-up if not
"Failed to load authentication token. To generate a token for local development, use `ray get-auth-token --generate`. For remote clusters, ensure that the token is propagated to all nodes of the cluster when token authentication is enabled."
0 commit comments