mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Make backends much more consistent:
1) Use the new LeaseExtend 2) Use default values controlled by mount tuning/system defaults instead of a random hard coded value 3) Remove grace periods
This commit is contained in:
@@ -138,9 +138,8 @@ func (b *backend) pathLogin(
|
||||
},
|
||||
DisplayName: *user.Login,
|
||||
LeaseOptions: logical.LeaseOptions{
|
||||
TTL: ttl,
|
||||
GracePeriod: ttl / 10,
|
||||
Renewable: ttl > 0,
|
||||
TTL: ttl,
|
||||
Renewable: true,
|
||||
},
|
||||
},
|
||||
}, nil
|
||||
@@ -152,5 +151,5 @@ func (b *backend) pathLoginRenew(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return framework.LeaseExtend(config.MaxTTL, 0, false)(req, d)
|
||||
return framework.LeaseExtend(config.TTL, config.MaxTTL, b.System())(req, d)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user