Closed hessjcg closed 2 months ago
This may mitigate some token expiration problems in Cloud Run.
Fixes https://github.com/GoogleCloudPlatform/cloud-sql-jdbc-socket-factory/issues/2059
We don't know for sure that this will fix the above issue right? We should probably mark this as "Related to #2509" and have it tested in the wild first before marking as fixed. Thoughts?
This may mitigate some token expiration problems in Cloud Run. Fixes #2059
We don't know for sure that this will fix the above issue right? We should probably mark this as "Related to #2509" and have it tested in the wild first before marking as fixed. Thoughts?
Good point. I set this as "related to."
Added a 4 minute buffer to refreshing tokens and certificates to avoid creating race condition that would allow the connector to create an ephemeral certificate with an expired auth token.
Now, IAM auth tokens are now refreshed 4 minutes before they token expire. Also, the Lazy Refresh Strategy will refresh the client certificate 4 minutes before the expiration of the certificate and the IAM auth token.
This should mitigate some of the strange certificate expiration errors commonly found in Cloud Run, see: #2059