Skip to content

[Cherry-pick to branch-1.3] [#10990] feat(iceberg-rest): Vended credential refresh for S3, GCS, OSS, and ADLS (#11294) - #11449

Merged
mchades merged 1 commit into
branch-1.3from
cherry-pick-91ed7a2e-to-branch-1.3
Jun 5, 2026
Merged

[Cherry-pick to branch-1.3] [#10990] feat(iceberg-rest): Vended credential refresh for S3, GCS, OSS, and ADLS (#11294)#11449
mchades merged 1 commit into
branch-1.3from
cherry-pick-91ed7a2e-to-branch-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: 91ed7a2
  • Target branch: branch-1.3
  • Status: ✅ Clean cherry-pick (no conflicts)

…SS, and ADLS (#11294)

### What changes were proposed in this pull request?

This PR adds **Iceberg 1.11 vended credential refresh** for object
storage in the Iceberg REST Catalog (IRC), and includes the
**server-side Iceberg 1.11.0 upgrade** required for the feature.

**Vended credential refresh (IRC)**

- Add `IcebergRESTUtils.toRESTCredential(...)` to map Gravitino storage
tokens to Iceberg 1.11 client properties, table-scoped refresh paths
(`GET .../tables/{table}/credentials`), and storage `prefix` from table
location.
- Extend `CredentialPropertyUtils.toIcebergProperties` with token expiry
metadata for S3/IRSA, OSS, and ADLS (GCS expiry already supported).
- Wire credential refresh into IRC load-table, credentials API, and
scan-plan responses in `CatalogWrapperForREST`.
- For `catalog-backend=rest`, proxy `/credentials` to the upstream IRC
via `getRESTTableCredentials()` (uses
`UserPrincipalForwardingAuthManager` from `RESTCatalog` properties);
other backends use local `getLocalTableCredentials()` via
`catalogCredentialManager`.

**Iceberg 1.11 upgrade (included in this branch)**

- Upgrade server-side Iceberg to **1.11.0** for IRC and lakehouse
catalog.
- Adapt IRC REST handlers, plan-scan response building, and related
Spark/Flink IT classpath expectations.

### Why are the changes needed?

Iceberg 1.11 clients can refresh vended object-storage credentials
before they expire during long-running jobs. Gravitino IRC must return
expiry fields and table-scoped refresh endpoints for S3, GCS, OSS, and
ADLS when temporary credentials are enabled.

When IRC proxies another IRC (`catalog-backend=rest`), `/credentials`
must be fetched from the upstream catalog instead of being generated
locally on the proxy.

The server must run Iceberg 1.11 to align with the REST spec and client
refresh behavior.

Fix: #10990

### Does this PR introduce _any_ user-facing change?

- When `vended-credentials` is enabled, load-table / credentials /
scan-plan responses may include cloud-specific expiry fields and
refresh-endpoint properties (for example
`client.refresh-credentials-endpoint`,
`gcs.oauth2.refresh-credentials-endpoint`,
`adls.refresh-credentials-endpoint`).
- Refresh paths use the relative form without a leading slash:
`v1/{catalog}/namespaces/.../tables/.../credentials`.
- IRC and lakehouse Iceberg catalog documentation reflect **Iceberg
1.11.0** server support.

### How was this patch tested?

- [x] `./gradlew :common:test --tests
org.apache.gravitino.credential.TestCredentialPropertiesUtils -PskipITs`
- [x] `./gradlew :iceberg:iceberg-rest-server:test --tests
org.apache.gravitino.iceberg.service.TestIcebergRESTUtils --tests
org.apache.gravitino.iceberg.service.TestCatalogWrapperForREST
-PskipITs`
- [x] `./gradlew :iceberg:iceberg-rest-server:compileJava
:iceberg:iceberg-rest-server:compileTestJava -PskipITs`
@github-actions github-actions Bot added the cherry-pick Automatically opened cherry-pick PR label Jun 5, 2026
@github-actions
github-actions Bot requested a review from jerryshao June 5, 2026 06:17
@roryqi roryqi closed this Jun 5, 2026
@roryqi roryqi reopened this Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 66.92% -0.25% 🟢
Files changed 47.08% 🔴

Module Coverage
aliyun 1.72% 🔴
api 46.8% -2.79% 🟢
authorization-common 85.96% 🟢
aws 3.66% -0.28% 🔴
azure 2.47% 🔴
catalog-common 10.04% 🔴
catalog-fileset 80.33% 🟢
catalog-glue 66.67% 🟢
catalog-hive 79.33% 🟢
catalog-jdbc-clickhouse 80.02% 🟢
catalog-jdbc-common 45.31% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.29% 🟢
catalog-jdbc-starrocks 78.51% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 44.89% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.66% 🟢
catalog-lakehouse-paimon 79.29% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.91% 🟢
common 50.17% +0.32% 🟢
core 82.49% -0.2% 🟢
filesystem-hadoop3 76.97% 🟢
flink 0.0% 🔴
flink-common 46.09% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 53.42% 🟢
iceberg-common 56.54% 🟢
iceberg-rest-server 73.5% +0.94% 🟢
idp-basic 85.99% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.83% 🔴
lance-rest-server 60.27% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.73% 🟢
server-common 73.28% 🟢
spark 29.85% 🔴
spark-common 41.01% 🟢
trino-connector 39.44% 🔴
Files
Module File Coverage
api ADLSTokenCredential.java 0.0% 🔴
AwsIrsaCredential.java 0.0% 🔴
GCSTokenCredential.java 0.0% 🔴
JdbcCredential.java 0.0% 🔴
OSSSecretKeyCredential.java 0.0% 🔴
OSSTokenCredential.java 0.0% 🔴
S3SecretKeyCredential.java 0.0% 🔴
S3TokenCredential.java 0.0% 🔴
aws AwsIrsaCredentialGenerator.java 3.25% 🔴
common CredentialPropertyUtils.java 75.34% 🟢
core CatalogCredentialManager.java 1.61% 🔴
iceberg-rest-server IcebergRESTUtils.java 86.44% 🟢
CatalogWrapperForREST.java 76.91% 🟢

@mchades
mchades merged commit 8ea1e3a into branch-1.3 Jun 5, 2026
33 checks passed
@mchades
mchades deleted the cherry-pick-91ed7a2e-to-branch-1.3 branch June 5, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick Automatically opened cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants