From 8e93e142bdb2071f51134fdcf497a7eeb052f400 Mon Sep 17 00:00:00 2001 From: mgeeky Date: Fri, 19 Jun 2020 14:23:11 +0200 Subject: [PATCH] Fix --- clouds/aws/assume-role-helper.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clouds/aws/assume-role-helper.sh b/clouds/aws/assume-role-helper.sh index 6b59c87..607efd4 100644 --- a/clouds/aws/assume-role-helper.sh +++ b/clouds/aws/assume-role-helper.sh @@ -26,7 +26,7 @@ SERIAL_MFA= # Duration in seconds. Values possible range: 900-43200 # 1 hour - 3600, 2 hours - 7200, 3 hours - 10800, 6 hours - 21600, 12 hours - 43200 -DURATION=42000 +DURATION=3600 # # -------------------------- @@ -70,8 +70,8 @@ if [ $? -eq 0 ]; then echo "[+] Collected session credentials. They will be valid for: $valid. " echo -e "\tPaste below lines to your '~/.aws/credentials' file:" echo - echo "[$PROFILE_NAME]" - echo "$out" | python33 -c 'import sys,json; foo=json.loads(sys.stdin.read()); print("aws_access_key_id={}\naws_secret_access_key={}\naws_session_token={}".format(foo["Credentials"]["AccessKeyId"],foo["Credentials"]["SecretAccessKey"],foo["Credentials"]["SessionToken"]))' + echo "[$PROFILE_NAME-$ROLE_NAME]" + echo "$out" | python3 -c 'import sys,json; foo=json.loads(sys.stdin.read()); print("aws_access_key_id={}\naws_secret_access_key={}\naws_session_token={}".format(foo["Credentials"]["AccessKeyId"],foo["Credentials"]["SecretAccessKey"],foo["Credentials"]["SessionToken"]))' echo else echo "[!] Could not obtain assume-role session credentials:"