mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Merge pull request #1804 from hashicorp/issue-1800
Mark STS secrets as non-renwable
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user