Skip to content

[Runtime Env] Add bearer token support for remote URI downloads - #60050

Merged
edoakes merged 1 commit into
ray-project:masterfrom
dkhachyan:issue-46833-1
Jan 12, 2026
Merged

edoakes merged 1 commit into
ray-project:masterfrom
dkhachyan:issue-46833-1

Conversation

@dkhachyan

Copy link
Copy Markdown
Contributor

Description

Add support for authenticating HTTPS downloads in runtime environments using
bearer tokens via the RAY_RUNTIME_ENV_BEARER_TOKEN environment variable.

Related issues

Fixes #46833

@dkhachyan
dkhachyan requested a review from a team as a code owner January 12, 2026 13:24

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for bearer token authentication for HTTPS downloads in runtime environments, which is a useful feature for accessing private resources. The implementation is straightforward. However, I've identified a potential security vulnerability related to CRLF injection, as the bearer token from the environment variable is used directly in an HTTP header without validation. I've provided a suggestion to mitigate this. Additionally, this change lacks corresponding tests. It's crucial to add tests to verify that the Authorization header is correctly handled, ensuring both successful authentication with valid tokens and failures with invalid or missing tokens.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Jan 12, 2026
@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Jan 12, 2026

@edoakes edoakes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. As a follow up, could you add a note about this to the runtime_env documentation page?

@edoakes
edoakes enabled auto-merge (squash) January 12, 2026 22:01
@edoakes
edoakes merged commit b3f1323 into ray-project:master Jan 12, 2026
AYou0207 pushed a commit to AYou0207/ray that referenced this pull request Jan 13, 2026
…project#60050)

Add support for authenticating HTTPS downloads in runtime environments
using
bearer tokens via the RAY_RUNTIME_ENV_BEARER_TOKEN environment variable.

Fixes [ray-project#46833](ray-project#46833)

Signed-off-by: Denis Khachyan <[email protected]>
Signed-off-by: jasonwrwang <[email protected]>
@dkhachyan

Copy link
Copy Markdown
Contributor Author

LGTM. As a follow up, could you add a note about this to the runtime_env documentation page?

Sure

rushikeshadhav pushed a commit to rushikeshadhav/ray that referenced this pull request Jan 14, 2026
…project#60050)

Add support for authenticating HTTPS downloads in runtime environments
using
bearer tokens via the RAY_RUNTIME_ENV_BEARER_TOKEN environment variable.

Fixes [ray-project#46833](ray-project#46833)

Signed-off-by: Denis Khachyan <[email protected]>
edoakes pushed a commit that referenced this pull request Jan 14, 2026
## Description

Added documentation about using RAY_RUNTIME_ENV_BEARER_TOKEN_ENV_VAR for
authenticating remote URIs in runtime_env

## Related issues

[#46833](#46833)

## Related PRs
[#60050](#60050)

Signed-off-by: Denis Khachyan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ray CORE] Gitlab integration with authentication

2 participants