-
Notifications
You must be signed in to change notification settings - Fork 3.7k
branch-3.1: [refactor](credential) Refactor vended credentials system with unified architecture #55912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…d architecture (apache#55760) This PR refactors the vended credentials system by introducing a unified architecture to support multiple data sources (Iceberg, Paimon) with better abstraction and extensibility. - **`AbstractVendedCredentialsProvider`**: Abstract base class providing unified credential handling workflow - **`VendedCredentialsFactory`**: Factory pattern for creating appropriate credential providers - **`CredentialUtils`**: Utility class for cloud storage property filtering and backend property extraction - `CredentialExtractor` interface and its implementations (`IcebergS3CredentialExtractor`, `PaimonOssCredentialExtractor`) - Scattered credential handling logic across different modules - Cloud storage property filtering with support for s3, oss, cos, obs, gs, azure prefixes - Unified use` StorageProperties.createAll()` integration for consistent format conversion - Improved error handling and graceful degradation - Thread-safe singleton pattern for credential providers ##### Updated Components: - `IcebergVendedCredentialsProvider`: Now extends AbstractVendedCredentialsProvider - `PaimonVendedCredentialsProvider`: Now extends AbstractVendedCredentialsProvider - `IcebergScanNode`、`IcebergTableSink`、`PaimonScanNode`: Updated to use unified credential system - Simplified credential management across data sources - Better code maintainability and extensibility - Consistent behavior and error handling - Reduced code duplication - Iceberg(Polaris): ``` Doris > CREATE CATALOG `polaris_vended_test` PROPERTIES ( -> "warehouse" = "doris_test", -> "type" = "iceberg", -> "iceberg.rest.vended-credentials-enabled" = "true", -> "iceberg.rest.uri" = "http://127.0.0.1:20181/api/catalog", -> "iceberg.rest.security.type" = "oauth2", -> "iceberg.rest.oauth2.server-uri" = "http://127.0.0.1:20181/api/catalog/v1/oauth/tokens", -> "iceberg.rest.oauth2.scope" = "PRINCIPAL_ROLE:ALL", -> "iceberg.rest.oauth2.credential" = "root:secret123", -> "iceberg.catalog.type" = "rest" -> ); Query OK, 0 rows affected (0.05 sec) Doris > use polaris_vended_test.test; Database changed Doris > select * from test; +------+------+ | id | name | +------+------+ | 1 | a | | 2 | b | +------+------+ 2 rows in set (0.92 sec) ``` - Glue Rest S3Table ``` Doris > CREATE CATALOG glue_s3_vended PROPERTIES ( -> 'type' = 'iceberg', -> 'warehouse' = '<account_id>:s3tablescatalog/s3-table-bucket-hk-glue-test', -> 'iceberg.catalog.type' = 'rest', -> 'iceberg.rest.uri' = 'https://glue.ap-east-1.amazonaws.com/iceberg', -> 'iceberg.rest.sigv4-enabled' = 'true', -> 'iceberg.rest.signing-name' = 'glue', -> 'iceberg.rest.access-key-id' = 'ak', -> 'iceberg.rest.secret-access-key' = 'sk', -> 'iceberg.rest.signing-region' = 'ap-east-1', -> "iceberg.rest.vended-credentials-enabled" = "true" -> ); Query OK, 0 rows affected (0.07 sec) Doris > use glue_s3_vended.athena_ns; Database changed Doris > select * from test; +------+------+ | id | name | +------+------+ | 1 | a | +------+------+ 1 row in set (0.20 sec) ``` - Paimon: ``` Doris > CREATE CATALOG paimon_dlf_test PROPERTIES ( -> 'type' = 'paimon', -> 'paimon.catalog.type' = 'rest', -> 'uri' = 'http://cn-beijing-vpc.dlf.aliyuncs.com', -> 'warehouse' = 'xxx', -> 'paimon.rest.token.provider' = 'dlf', -> 'paimon.rest.dlf.access-key-id' = 'xxx, -> 'paimon.rest.dlf.access-key-secret' = 'xxx' -> ); Query OK, 0 rows affected (0.02 sec) Doris > use paimon_dlf_test.new_dlf_paimon_db; Database changed Doris > select * from users_samples; +---------+-----------+-------------------+------+ | user_id | age_level | final_gender_code | clk | +---------+-----------+-------------------+------+ | 1 | 25-34 | M | 1 | | 5 | 25-34 | M | 1 | | 3 | 25-34 | M | 1 | | 2 | 18-24 | F | 0 | | 4 | 18-24 | F | 0 | | 6 | 18-24 | F | 0 | +---------+-----------+-------------------+------+ 6 rows in set (0.90 sec) ```
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
TPC-H: Total hot run time: 32743 ms |
morrySnow
approved these changes
Sep 11, 2025
TPC-DS: Total hot run time: 191765 ms |
ClickBench: Total hot run time: 29.6 s |
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.
bp (#55760)