Repository navigation
feat(storage/opendal): read vended s3.* properties in the native OSS backend - #2332
plusplusjiajia wants to merge 1 commit into
Conversation
CTTY
left a comment
There was a problem hiding this comment.
Hi @plusplusjiajia thanks for the contribution! Logic wise this makes sense, but I'm concerned that this will confuse users that OSS storage has two modes. Do you think we should just keep one?
| #[cfg(feature = "opendal-oss")] | ||
| // OSS is S3-API-compatible; route through S3 so `s3.*` props | ||
| // work for OSS-backed tables (mirrors pyiceberg/Java S3FileIO). | ||
| #[cfg(feature = "opendal-s3")] |
There was a problem hiding this comment.
| #[cfg(feature = "opendal-s3")] | |
| #[cfg(all(feature = "opendal-oss", feature = "opendal-s3"))] |
Only having s3 feature flag will introduce oss related code to non-oss users
| } | ||
| // Fallback: builds without `opendal-s3` but with `opendal-oss` | ||
| // still use the native OSS service (which consumes `oss.*` keys). | ||
| #[cfg(all(feature = "opendal-oss", not(feature = "opendal-s3")))] |
There was a problem hiding this comment.
I'm not very familiar with OSS storage so not sure about it: Is the fallback actually necessary? I'm thinking if using OSS exactly like S3 is the common case, maybe we can just use OpenDalS3Storage directly?
There was a problem hiding this comment.
@CTTY Agreed, removed it. OSS is S3-compatible and the Java/Python Iceberg implementations both route OSS through S3FileIO without a native fallback.
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
db91b0b to
3260943
Compare
Instead of trying to route OSS to S3, I suggest allowing OSS to parse options from the S3 config. OpenDAL's OSS support is natively implemented, which means it works with Aliyun OSS's RAM out of the box. Switching to S3 services prevents users from working with Aliyun's OIDC or assume roles. |
Thanks for the feedback! I initially removed it, but @Xuanwo raised a valid concern — routing everything through S3 would prevent users from using Aliyun's native RAM/OIDC/assume-role auth. So I restored the native OSS path as a fallback: when s3.* config is present (e.g. REST catalog vended credentials), we route through S3; otherwise we use the native OSS backend. This keeps both use cases working. |
3260943 to
b73b446
Compare
b73b446 to
c57b1ff
Compare
Good point! I've added a dual-path approach: has_s3_config() checks for s3.endpoint or s3.access-key-id — if present, routes through S3; otherwise falls back to the native OSS backend so RAM/OIDC/assume-role still works. |
de5442a to
96845f5
Compare
|
Hi @CTTY @Xuanwo, mind taking another look when you get a chance? The dual-path resolver should cover both your points: |
248de21 to
8dcda7d
Compare
|
@CTTY @Xuanwo friendly ping — the dual-path resolver should address both of your points:
Mind taking another look if it looks good? Thanks! |
|
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions. |
8dcda7d to
9fa4fe6
Compare
9fa4fe6 to
68c7948
Compare
|
@Xuanwo — on not breaking native Aliyun auth: the resolver is dual-path. @CTTY — would appreciate another look |
684c323 to
bb34312
Compare
|
@CTTY @Xuanwo Sorry to ping again — I'd rather check the reasoning than push another revision. |
bb34312 to
aa57ff1
Compare
aa57ff1 to
341fcf7
Compare
341fcf7 to
bf48615
Compare
bf48615 to
237099d
Compare
8930633 to
e28deb4
Compare
e28deb4 to
67df68a
Compare
67df68a to
df0b4c3
Compare
1339623 to
5ef63de
Compare
…backend REST catalogs vend S3-style credentials (`s3.*`) for OSS tables. When no `oss.*` property is set, the native OSS backend now reads `s3.endpoint`, `s3.access-key-id`, `s3.secret-access-key` and `s3.session-token`. The two sets are never mixed, so credentials only reach the endpoint they were configured with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5ef63de to
a20e2c1
Compare
Which issue does this PR close?
N/A
What changes are included in this PR?
REST catalogs vend S3-style credentials (
s3.*) for OSS tables, as pyiceberg and Java expect, but the native OSS backend only readsoss.*.As @Xuanwo suggested, the native OSS backend now reads
s3.endpoint,s3.access-key-id,s3.secret-access-keyands3.session-tokenwhen nooss.*property is set, so RAM/OIDC auth keeps working. If anyoss.*property is set, onlyoss.*is used, so existing configurations behave as before.Are these changes tested?
Unit tests, including an offline signing test. Not tested against a live OSS endpoint.