Repository: cevoaustralia/aws-google-auth

Issue:
Max duration for a session can be increased to 12h
The limit was recently increased on the AWS side: https://aws.amazon.com/about-aws/whats-new/2018/03/longer-role-sessions/

Discussion:

Patch:
diff --git a/aws_google_auth/configuration.py b/aws_google_auth/configuration.py
index ce02aa3..270cb5e 100644
--- a/aws_google_auth/configuration.py
+++ b/aws_google_auth/configuration.py
@@ -44,7 +44,7 @@ class Configuration(object):
 
     @property
     def max_duration(self):
-        return 3600
+        return 43200
 
     @property
     def credentials_file(self):
diff --git a/aws_google_auth/google.py b/aws_google_auth/google.py
index cd5b636..70beb14 100644
--- a/aws_google_auth/google.py
+++ b/aws_google_auth/google.py
@@ -42,7 +42,7 @@ class Google:
         sp_id: Google's assigned SP identifier for your AWS SAML app
 
         Optionally, you can supply:
-        duration_seconds: number of seconds for the session to be active (max 3600)
+        duration_seconds: number of seconds for the session to be active (max 43200)
         """
 
         self.version = _version.__version__


Test patch:
diff --git a/aws_google_auth/tests/test_config_parser.py b/aws_google_auth/tests/test_config_parser.py
index 223d51b..aa3e798 100644
--- a/aws_google_auth/tests/test_config_parser.py
+++ b/aws_google_auth/tests/test_config_parser.py
@@ -57,7 +57,7 @@ class TestDurationProcessing(unittest.TestCase):
     def test_default(self):
         args = parse_args([])
         config = resolve_config(args)
-        self.assertEqual(3600, config.duration)
+        self.assertEqual(43200, config.duration)
 
     def test_cli_param_supplied(self):
         args = parse_args(['-d', "500"])