Description
This action gets credentials by requesting a web identity token and using it directly to generate temporary credentials, and exports those temporary credentials as environment variables. The web identity token itself is not persisted in any way. This means that there's no way for an AWS SDK to refresh the credentials if they expire.
The action should at least be saving the token to a file and exporting its path as AWS_WEB_IDENTITY_TOKEN_FILE
, that way if the temporary credentials expire, then new ones can be obtained by an AWS SDK (I'm not sure if they'll properly handle throwing away the expired credentials, i.e. a subprocess can't shred environment variables that its parent process has, but maybe something like the CLI would still generate new credentials and just not export them).
Ideally we wouldn't obtain any temporary credentials so that the SDKs can handle it all themselves, but that might be an overly breaking change.
I wrote a little workaround action here that I'll be using in case I actually do need indefinitely refreshing credentials.