mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-03 06:05:04 +09:00
feat: Recommending using OIDC (#871)
* Recommending using OIDC * Added tests * fix test and package * update readme --------- Co-authored-by: peterwoodworth <woodwoop@amazon.com>
This commit is contained in:
+4
@@ -143,6 +143,10 @@ async function assumeRoleWithWebIdentityTokenFile(params, client, webIdentityTok
|
||||
}
|
||||
async function assumeRoleWithCredentials(params, client) {
|
||||
core.info('Assuming role with user credentials');
|
||||
if (!process.env['AWS_SESSION_TOKEN']) {
|
||||
core.warning('To avoid using long-term AWS credentials, please update your workflows to authenticate using OpenID Connect.' +
|
||||
' See https://s12d.com/gha-oidc-aws for more information.');
|
||||
}
|
||||
try {
|
||||
const creds = await client.send(new client_sts_1.AssumeRoleCommand({ ...params }));
|
||||
return creds;
|
||||
|
||||
Reference in New Issue
Block a user