Skip to content

feat(oss): add sts token support for aliyun oss via storage_options#5632

Merged
Xuanwo merged 4 commits intolance-format:mainfrom
hh23485:feature/oss-security-token_support
Jan 9, 2026
Merged

feat(oss): add sts token support for aliyun oss via storage_options#5632
Xuanwo merged 4 commits intolance-format:mainfrom
hh23485:feature/oss-security-token_support

Conversation

@hh23485
Copy link
Copy Markdown
Contributor

@hh23485 hh23485 commented Jan 6, 2026

Summary

This PR adds support for passing an OSS STS security token through storage_options when using Lance with Aliyun OSS or other lake‑based storage systems.

In multi‑tenant environments, operating on OSS with short‑lived STS credentials is a critical use case. Previous versions only extracted access_key_id and access_key_secret, so the security token was not recognized. This change ensures that the token can be provided explicitly via storage_options.


Motivation

While environment variables can technically be used, they are not suitable in multi‑tenant scenarios due to process‑level leakage risks and the inability to safely refresh credentials at runtime. Passing credentials through storage_options remains the correct and secure approach.


Implementation Notes

The change is intentionally minimal. Although we could introduce a whitelist to iterate over allowed OSS fields, this does not appear necessary at the moment given the current scope and usage patterns.

@github-actions github-actions Bot added the enhancement New feature or request label Jan 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 6, 2026

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@hh23485 hh23485 changed the title feat: Add security token support for Aliyun OSS access through storage_options feat(oss): add security token support for Aliyun OSS through storage_options Jan 6, 2026
@hh23485
Copy link
Copy Markdown
Contributor Author

hh23485 commented Jan 6, 2026

Hi @wjones127, I’m not entirely sure, but it seems that the Claude Code Review CI here requires the current actor to have write permission to this repo, so I’m unable to make this check pass.

This change is quite small. Could you please help review it when you have a chance?

@hh23485 hh23485 changed the title feat(oss): add security token support for Aliyun OSS through storage_options feat(oss): add sts token support for aliyun oss via storage_options Jan 6, 2026
@hh23485
Copy link
Copy Markdown
Contributor Author

hh23485 commented Jan 8, 2026

Is there any reviewer interested in this feature? We rely on this capability for using Lance in our production environment

Copy link
Copy Markdown
Collaborator

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thank you!

@hh23485
Copy link
Copy Markdown
Contributor Author

hh23485 commented Jan 8, 2026

Thank you!

Hi @Xuanwo thanks!

I ran into some CI failures (cargo-deny and aws-integtest). Since I haven't modified any dependencies and the AWS test seems unrelated to my OSS changes, I believe these are not caused by my code.

I've merged the latest main hoping to resolve any environment issues. If they fail again, could you please help check?

Links:

https://github.com/lance-format/lance/actions/runs/20742942831/job/59776109503?pr=5632
https://github.com/lance-format/lance/actions/runs/20742942851/job/59776109553?pr=5632

@hh23485
Copy link
Copy Markdown
Contributor Author

hh23485 commented Jan 9, 2026

Hi @Xuanwo Can you help on this?

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Xuanwo Xuanwo merged commit 9438b88 into lance-format:main Jan 9, 2026
27 of 28 checks passed
@hh23485
Copy link
Copy Markdown
Contributor Author

hh23485 commented Jan 18, 2026

Hi @Xuanwo, I'd like to know when this commit will be released with a new version of Pylance. I see that the latest 1.0.2 version doesn't include it, so what's the release plan here.

jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
…ance-format#5632)

## Summary

This PR adds support for passing an OSS STS security token through
`storage_options` when using Lance with Aliyun OSS or other lake‑based
storage systems.

In multi‑tenant environments, operating on OSS with short‑lived STS
credentials is a critical use case. Previous versions only extracted
`access_key_id` and `access_key_secret`, so the security token was not
recognized. This change ensures that the token can be provided
explicitly via `storage_options`.

---

## Motivation

While environment variables can technically be used, they are not
suitable in multi‑tenant scenarios due to process‑level leakage risks
and the inability to safely refresh credentials at runtime. Passing
credentials through `storage_options` remains the correct and secure
approach.

---

## Implementation Notes

The change is intentionally minimal. Although we could introduce a
whitelist to iterate over allowed OSS fields, this does not appear
necessary at the moment given the current scope and usage patterns.

Co-authored-by: Xuanwo <github@xuanwo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants