mirror of
https://github.com/hashicorp/vault.git
synced 2026-04-29 02:01:35 -04:00
Add 'Period' support to AWS IAM token renewal (#3220)
This commit is contained in:
parent
be57fd0594
commit
a4f4e5bf34
1 changed files with 7 additions and 1 deletions
|
|
@ -943,7 +943,13 @@ func (b *backend) pathLoginRenewIam(
|
|||
}
|
||||
}
|
||||
|
||||
return framework.LeaseExtend(roleEntry.TTL, roleEntry.MaxTTL, b.System())(req, data)
|
||||
// If 'Period' is set on the role, then the token should never expire.
|
||||
if roleEntry.Period > time.Duration(0) {
|
||||
req.Auth.TTL = roleEntry.Period
|
||||
return &logical.Response{Auth: req.Auth}, nil
|
||||
} else {
|
||||
return framework.LeaseExtend(roleEntry.TTL, roleEntry.MaxTTL, b.System())(req, data)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *backend) pathLoginRenewEc2(
|
||||
|
|
|
|||
Loading…
Reference in a new issue