Skip to content
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

feat(python): support customize credential provider for write_dataset… #3283

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yanghua
Copy link
Contributor

@yanghua yanghua commented Dec 23, 2024

… api in PyLance

@github-actions github-actions bot added enhancement New feature or request python labels Dec 23, 2024
@yanghua yanghua force-pushed the 3275-write_dataset_AwsCredentialsProvider branch 2 times, most recently from ab24a5b to b3219e8 Compare December 23, 2024 09:17
}

#[async_trait]
impl CredentialProvider for UrlBasedCredentialProvider {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @eddyxu May I ask a question? I realized an UrlBasedCredentialProvider for our inner object store service to get a temporal credential via an assume role. It seems it is very similar to the AwsCredentialAdapter you have provided. Based on AwsCredentialAdapter, if I only need to implement the ProvideCredentials trait, that's enough for my purpose?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way you can re-use the AwsCredentialsAdapter? Or is the purpose of this one somehow different?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I need to implement a non-standard AssumeRoleProvider which receives a URL and fetches ak, sk and session_token from it and support TTL. The built-in AssumeRoleProvider can not customize a URL. It seems AwsCredentialAdapter provided a TTL-based credential wrapper. Maybe I need to implement ProvideCredentials trait.

@yanghua yanghua force-pushed the 3275-write_dataset_AwsCredentialsProvider branch from 2653d0d to 596533b Compare December 23, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants