Repository navigation
[Cherry-pick to branch-1.3] [#14069] fix(core): Reject token credential providers on catalogs without path-based credentials (#14080) - #14201
Merged
Conversation
…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
…1-to-branch-1.3 # Conflicts: # docs/security/credential-vending.md
Author
Code Coverage Report
Files
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick Information:
branch-1.3