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
[aws-cpp-sdk-core]: STS Web Identity Provider no longer caches - one-shot authentication only #4004
In c6ed3e3, the STSAssumeRoleWebIdentityCredentialsProvider switched from Internal::STSCredentialsClient to CRT.
This is using aws_credentials_provider_new_sts_web_identity() via CreateCredentialsProviderSTSWebIdentity().
That chosen aws-c-auth credentials provider does not cache or refresh credentials. It is one-shot credentials provider.
This is evident in code and in logs. Any job running > 1 hour dies.
Log Examples
Example 1:
2026-11-19 05:59:36 Z stderr INFO, 2026-11-19 05:59:36,034:b'I20261119 05:59:36.034477 140596569544256 run_critic.cc:479] --->>> [redacted, code starts to run]...2026-11-19 07:03:08 Z stderr INFO, 2026-11-19 07:03:08,895:b'Exception name: ExpiredToken'2026-11-19 07:03:08 Z stderr INFO, 2026-11-19 07:03:08,895:b'Error message: Unable to parse ExceptionName: ExpiredToken Message: The provided token has expired.'
Example 2:
2026-11-19 02:30:27 Z stdout cwd [redacted, code starts to run]...2026-11-19 03:34:47 Z stdout Exception name: ExpiredToken2026-11-19 03:34:47 Z stdout Error message: Unable to parse ExceptionName: ExpiredToken Message: The provided token has expired.
Regression Issue
Select this option if this issue appears to be a regression.
The previous implementation refreshed viaReload(), RefreshIfExpired(), ExpiresSoon().
Possible Solution
Should use CreateCredentialsProviderCached().
However, the code in aws-c-auth is not as production-tested as the previous implementation based on Aws::Internal::STSCredentialsClient, which had a proper retry configuration - see awslabs/aws-c-auth#311 and #3977.
Please could you consider reverting to use the AWSHttpResourceClient, as per the comment:
// src/aws-cpp-sdk-core/include/aws/core/auth/STSCredentialsProvider.h/** * To support retrieving credentials of STS AssumeRole with web identity. * Note that STS accepts request with protocol of queryxml. Calling GetAWSCredentials() will trigger (if expired) * a query request using AWSHttpResourceClient under the hood.*/classAWS_CORE_API STSAssumeRoleWebIdentityCredentialsProvider : public CrtCredentialsProvider {
//...
};
Caching is NOT required, since STSAssumeRoleWebIdentityCredentialsProvider subclasses CrtCredentialsProvider, which calls Reload() if the credentials are within 5 minutes of their expiration time (RefreshIfExpired()).
The symptoms we were seeing and the expiration in the logs were due to a different code path, which has nothing to do with the STS Web Identity provider.
Will create an issue once the root cause is clear.
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Activity
grrtrr commentedon Nov 21, 2026
Wrong conclusion
Caching is NOT required, since
STSAssumeRoleWebIdentityCredentialsProvidersubclassesCrtCredentialsProvider, which callsReload()if the credentials are within 5 minutes of their expiration time (RefreshIfExpired()).The symptoms we were seeing and the expiration in the logs were due to a different code path, which has nothing to do with the STS Web Identity provider.
Will create an issue once the root cause is clear.
github-actions commentedon Nov 21, 2026
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.