From 3e16b433c2c496028a7349d5a7249d3a0ba90754 Mon Sep 17 00:00:00 2001 From: Calvin Hughes Date: Thu, 8 Aug 2019 13:58:09 +0100 Subject: [PATCH] Add explanation on duration argument help and README regarding the session duration defaults --- README.rst | 5 +++-- aws_google_auth/__init__.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 82204c0..990ac64 100644 --- a/README.rst +++ b/README.rst @@ -132,7 +132,8 @@ Usage -R REGION, --region REGION AWS region endpoint ($AWS_DEFAULT_REGION) -d DURATION, --duration DURATION - Credential duration ($DURATION) + Credential duration (defaults to value of $DURATION, then + falls back to 43200) -p PROFILE, --profile PROFILE AWS profile (defaults to value of $AWS_PROFILE, then falls back to 'sts') @@ -150,7 +151,7 @@ Usage -V, --version show program's version number and exit -**Note** that if you want longer than the default 3600 seconds (1 hour) +**Note** If you want a longer session than the AWS default 3600 seconds (1 hour) duration, you must also modify the IAM Role to permit this. See `the AWS documentation `__ for more information. diff --git a/aws_google_auth/__init__.py b/aws_google_auth/__init__.py index 51c0af9..3d1811f 100644 --- a/aws_google_auth/__init__.py +++ b/aws_google_auth/__init__.py @@ -27,7 +27,7 @@ def parse_args(args): parser.add_argument('-I', '--idp-id', help='Google SSO IDP identifier ($GOOGLE_IDP_ID)') parser.add_argument('-S', '--sp-id', help='Google SSO SP identifier ($GOOGLE_SP_ID)') parser.add_argument('-R', '--region', help='AWS region endpoint ($AWS_DEFAULT_REGION)') - parser.add_argument('-d', '--duration', type=int, help='Credential duration ($DURATION)') + parser.add_argument('-d', '--duration', type=int, help='Credential duration in seconds (defaults to value of $DURATION, then falls back to 43200)') parser.add_argument('-p', '--profile', help='AWS profile (defaults to value of $AWS_PROFILE, then falls back to \'sts\')') parser.add_argument('-D', '--disable-u2f', action='store_true', help='Disable U2F functionality.') parser.add_argument('-q', '--quiet', action='store_true', help='Quiet output')