Merge pull request #1804 from hashicorp/issue-1800

Mark STS secrets as non-renwable
This commit is contained in:
Vishal Nayak
2016-08-29 11:46:19 -04:00
committed by GitHub

View File

@@ -99,6 +99,9 @@ func (b *backend) secretTokenCreate(s logical.Storage,
// Set the secret TTL to appropriately match the expiration of the token
resp.Secret.TTL = tokenResp.Credentials.Expiration.Sub(time.Now())
// STS are purposefully short-lived and aren't renewable
resp.Secret.Renewable = false
if usernameWarning != "" {
resp.AddWarning(usernameWarning)
}
@@ -141,6 +144,9 @@ func (b *backend) assumeRole(s logical.Storage,
// Set the secret TTL to appropriately match the expiration of the token
resp.Secret.TTL = tokenResp.Credentials.Expiration.Sub(time.Now())
// STS are purposefully short-lived and aren't renewable
resp.Secret.Renewable = false
if usernameWarning != "" {
resp.AddWarning(usernameWarning)
}