You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Refresh the s3 credential automatically so that we can support long-running spark jobs. #1086
In here, we just assigned the fixed temprorary session token for the s3/gcp/abfs object storage reading, while for long runing job, it is possible to expire the temporary token. So we need a mechnism to refresh the expired session token automatically, so that we can support the long-runing spark jobs.
It actually provides the configure key to specify our own customized the CredentialsProvider via the fs.s3a.aws.credentials.provider. So the correct approach that I will suggest is: Just customize a new Credentialsprovider and inside that credentials provider we can automatically refresh the credentials, based on all the information that we need to.
For azure, there is also a similar approach for people to customize the token provider. The configure key is fs.adl.oauth2.access.token.provider, and the related classes is :
For gcp, we need to find out what's the correct approach. --> Oh, I see, @bijanhoule worked on this before, he introduced a GcsVendedTokenProvider without any refresh, so I think gcp totally support the customized credentials provider, we only need to implement the refreshable credentials provider here.
So in summary, I think all of the aws/gcp/azure support the customized credentials provider. Then I think we can use this approach to fix this renew issue.
Hey, we need this ability for a use-case in our company, I'm following the active PRs and we will be happy to contribute to help this to be released. Will it be released to Maven after all of the sub-issues will be completed? Because I noticed some changes on main branch are not released yet. @openinx Please let me know if there is any way I can help.
Hi @pelegtjfrog, thanks for the info. Yes, we are planning to release the 0.4.0. and also we finally will backport this feature to 0.3.1 and make the release. I think the ETA will be the end of Oct. Thanks.
Activity
openinx commentedon Sep 26, 2025
Essentially, we do the following steps to get the credential for s3/gcp/azure:
TemporaryCredentials.TemporaryCredentialsto configure the Hadoop configuration.So for both the
spark-driverandspark-executorneed to refresh the credential if there is any expiration. And the key point is : we are using the Hadoop S3AFilesytem to auth the s3 object storage, and it's a components that we cannot change or custormize. But the good thing is, according to the hadoop s3a document: https://hadoop.apache.org/docs/r3.4.1/hadoop-aws/tools/hadoop-aws/index.html#Using_Session_Credentials_with_TemporaryAWSCredentialsProviderIt actually provides the configure key to specify our own customized the CredentialsProvider via the
fs.s3a.aws.credentials.provider. So the correct approach that I will suggest is: Just customize a newCredentialsproviderand inside that credentials provider we can automatically refresh the credentials, based on all the information that we need to.openinx commentedon Sep 26, 2025
For aws s3, I think we need to add new implementation for the
AwsCredentialsProviderhttps://github.com/apache/hadoop/blob/d44ac28e326c786b183d1793c4c9e46d03ec2380/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/CredentialProviderListFactory.java#L247.For azure, there is also a similar approach for people to customize the token provider. The configure key is
fs.adl.oauth2.access.token.provider, and the related classes is :For gcp, we need to find out what's the correct approach. --> Oh, I see, @bijanhoule worked on this before, he introduced a GcsVendedTokenProvider without any refresh, so I think gcp totally support the customized credentials provider, we only need to implement the refreshable credentials provider here.
So in summary, I think all of the aws/gcp/azure support the customized credentials provider. Then I think we can use this approach to fix this renew issue.
I will provide several PRs for this.
pelegtjfrog commentedon Oct 20, 2025
Hey, we need this ability for a use-case in our company, I'm following the active PRs and we will be happy to contribute to help this to be released. Will it be released to Maven after all of the sub-issues will be completed? Because I noticed some changes on main branch are not released yet.
@openinx Please let me know if there is any way I can help.
openinx commentedon Oct 20, 2025
Hi @pelegtjfrog, thanks for the info. Yes, we are planning to release the 0.4.0. and also we finally will backport this feature to 0.3.1 and make the release. I think the ETA will be the end of Oct. Thanks.
openinx commentedon Dec 2, 2025
All those PR has been done, close now. Let's wait for the release 0.3.1 cut.