From 56b8c33c950955bdfa5fec230ede69d6dba0e301 Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Thu, 18 Aug 2016 15:16:32 -0400 Subject: [PATCH] aws-ec2: se max_ttl when ttl is not set, during login --- builtin/credential/aws-ec2/path_login.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builtin/credential/aws-ec2/path_login.go b/builtin/credential/aws-ec2/path_login.go index da57edde4..360d6558a 100644 --- a/builtin/credential/aws-ec2/path_login.go +++ b/builtin/credential/aws-ec2/path_login.go @@ -411,6 +411,10 @@ func (b *backend) pathLoginUpdate( resp.Auth.TTL = shortestMaxTTL } + if resp.Auth.TTL == 0 { + resp.Auth.TTL = shortestMaxTTL + } + return resp, nil }