Skip to content

[Cherry-pick to branch-1.3] [#14069] fix(core): Reject token credential providers on catalogs without path-based credentials (#14080) - #14201

Merged
jerryshao merged 2 commits into
branch-1.3from
cherry-pick-10ba5761-to-branch-1.3
Oct 26, 2026
Merged

jerryshao merged 2 commits into
branch-1.3from
cherry-pick-10ba5761-to-branch-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: 10ba576
  • Target branch: branch-1.3
  • Status: ⚠️ Has conflicts - manual resolution required

…hout path-based credentials (#14080)

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

Reject path-based token credential providers (`s3-token`, `oss-token`,
`gcs-token`, `adls-token`, `cos-token`) when creating or altering a
catalog that cannot provide path-based credential contexts. Only Fileset
and Iceberg catalogs support them. Also correct the supported catalogs
table in the credential vending docs.

### Why are the changes needed?

Token providers return no credentials for a catalog-level context. A
Hive catalog configured with `gcs-token` is accepted, but every engine
query then fails with a storage authorization error. The docs also list
Hive as vending GCS.

Fix: #14069

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

Yes. Creating or altering a catalog other than Fileset and Iceberg with
a token provider now fails with an error naming the provider and the
catalog type. Existing catalogs still load.

### How was this patch tested?

Added unit tests in `TestBaseCatalogCredentialProviders`,
`TestCatalogManager`, `TestFilesetCatalogCredential` and
`TestIcebergCatalog`.

---------

Co-authored-by: Jerry Shao <jerryshao@datastrato.com>
# Conflicts:
#	catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/TestFilesetCatalogCredential.java
#	core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java
#	core/src/test/java/org/apache/gravitino/catalog/TestCatalogManager.java
#	docs/security/credential-vending.md
@github-actions github-actions Bot added cherry-pick Automatically opened cherry-pick PR cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge labels Oct 23, 2026
@github-actions
github-actions Bot requested a review from jerryshao October 23, 2026 14:52
@diqiu50 diqiu50 self-assigned this Oct 26, 2026
…1-to-branch-1.3

# Conflicts:
#	docs/security/credential-vending.md
@diqiu50 diqiu50 changed the title [DO NOT MERGE] [Cherry-pick to branch-1.3] [#14069] fix(core): Reject token credential providers on catalogs without path-based credentials (#14080) [Cherry-pick to branch-1.3] [#14069] fix(core): Reject token credential providers on catalogs without path-based credentials (#14080) Oct 26, 2026
@diqiu50 diqiu50 removed the cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge label Oct 26, 2026
@github-actions

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 69.97% +0.04% 🟢
Files changed 73.41% 🟢

Module Coverage
aliyun 19.74% 🔴
api 47.41% 🟢
authorization-common 85.96% 🟢
authorization-ranger 10.17% 🔴
aws 60.78% 🟢
aws-bundle 0.0% 🔴
azure 68.04% 🟢
azure-bundle 0.0% 🔴
catalog-common 19.13% 🔴
catalog-fileset 81.08% 🟢
catalog-glue 71.28% -1.23% 🟢
catalog-hive 80.57% +0.27% 🟢
catalog-jdbc-clickhouse 84.78% 🟢
catalog-jdbc-common 54.07% -1.0% 🟢
catalog-jdbc-doris 89.47% 🟢
catalog-jdbc-hologres 55.61% 🟢
catalog-jdbc-mysql 85.0% 🟢
catalog-jdbc-oceanbase 78.97% 🟢
catalog-jdbc-postgresql 85.54% 🟢
catalog-jdbc-starrocks 83.04% 🟢
catalog-kafka 75.28% -1.73% 🟢
catalog-lakehouse-generic 75.99% -0.23% 🟢
catalog-lakehouse-hudi 78.78% -1.22% 🟢
catalog-lakehouse-iceberg 85.98% 🟢
catalog-lakehouse-paimon 82.1% -0.02% 🟢
catalog-model 78.55% -3.06% 🟢
cli 44.51% 🟢
client-java 78.45% 🟢
client-java-runtime 0.0% 🔴
common 51.51% 🟢
core 84.28% -0.24% 🟢
filesystem-hadoop3 77.68% 🟢
flink 18.07% 🔴
flink-common 51.9% 🟢
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-common 15.43% 🔴
hive-metastore-common 62.61% 🟢
hive-metastore3-libs 58.8% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 60.96% 🟢
iceberg-rest-server 76.51% 🟢
idp-basic 86.99% 🟢
integration-test-common 0.0% 🔴
jobs 60.37% 🟢
lance-common 35.51% 🔴
lance-rest-server 79.88% 🟢
lineage 59.39% 🟢
optimizer 82.85% 🟢
optimizer-api 42.56% 🟢
server 89.8% 🟢
server-common 79.3% 🟢
spark 28.57% 🔴
spark-common 51.36% 🟢
trino-connector 62.84% 🟢
Files
Module File Coverage
catalog-glue GlueCatalog.java 0.0% 🔴
catalog-hive HiveCatalog.java 91.3% 🟢
catalog-jdbc-common JdbcCatalog.java 30.61% 🔴
catalog-kafka KafkaCatalog.java 25.0% 🔴
catalog-lakehouse-generic GenericCatalog.java 63.64% 🟢
catalog-lakehouse-hudi HudiCatalog.java 50.0% 🔴
catalog-lakehouse-paimon PaimonCatalog.java 80.95% 🟢
catalog-model ModelCatalogImpl.java 0.0% 🔴
core CredentialUtils.java 90.0% 🟢
CatalogManager.java 78.48% 🟢
BaseCatalog.java 77.1% 🟢

@jerryshao
jerryshao merged commit e4da71a into branch-1.3 Oct 26, 2026
37 of 40 checks passed
@jerryshao
jerryshao deleted the cherry-pick-10ba5761-to-branch-1.3 branch October 26, 2026 09:09
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.

2 participants