IBM / python-sdk-core

The python-sdk-core repository contains core functionality required by Python code generated by the IBM OpenAPI SDK Generator.
Apache License 2.0
20 stars 27 forks source link

fix: adjust IAM token expiration time #189

Closed padamstx closed 6 months ago

padamstx commented 7 months ago

This commit changes the IAM, Container and VPC Instance authenticators slightly so that an IAM access token will be viewed as "expired" when the current time is within 10 seconds of the official expiration time. IOW, we'll expire the access token 10 secs earlier than the IAM server-computed expiration time. We're doing this to avoid a scenario where an IBM Cloud service receives a request along with an "almost expired" access token and then uses that token to perform downstream requests in a somewhat longer-running transaction and then the access token expires while that transaction is still active.

ibm-devx-sdk commented 6 months ago

:tada: This PR is included in version 3.19.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: