djc / gcp_auth

Minimal authentication library for Google Cloud Platform (GCP)
Other
63 stars 38 forks source link

Reduce Token expiry delta and add get_token retries #73

Closed valkum closed 1 year ago

valkum commented 1 year ago

This tackles some smaller issues.

First, other, official, SDKs use smaller values than 30s. The Python SDK uses 20s, and the Go SDK uses 0s for credentials from the metadata server. This PR reduces the delta to 20s, following the Python SDK.

Second, the official SDKs use a retry mechanism for fetching tokens from the various backends. This PR adds a retry of at most 5 requests for each fetch token request.

This also bumps the version to 0.8.1. The changes above are internal only and thus are semver compatible for a patch release.