mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
prevent int64 overflow for default_lease_ttl and max_lease_ttl (#14206)
* prevent int64 overflow for default_lease_ttl and max_lease_ttl * add changelog entry * wording change in changelog entry
This commit is contained in:
4
changelog/14206.txt
Normal file
4
changelog/14206.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
```release-note:change
|
||||||
|
core: Changes the unit of `default_lease_ttl` and `max_lease_ttl` values returned by
|
||||||
|
the `/sys/config/state/sanitized` endpoint from nanoseconds to seconds.
|
||||||
|
```
|
||||||
@@ -831,8 +831,8 @@ func (c *Config) Sanitized() map[string]interface{} {
|
|||||||
|
|
||||||
"enable_ui": c.EnableUI,
|
"enable_ui": c.EnableUI,
|
||||||
|
|
||||||
"max_lease_ttl": c.MaxLeaseTTL,
|
"max_lease_ttl": c.MaxLeaseTTL / time.Second,
|
||||||
"default_lease_ttl": c.DefaultLeaseTTL,
|
"default_lease_ttl": c.DefaultLeaseTTL / time.Second,
|
||||||
|
|
||||||
"cluster_cipher_suites": c.ClusterCipherSuites,
|
"cluster_cipher_suites": c.ClusterCipherSuites,
|
||||||
|
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ func testConfig_Sanitized(t *testing.T) {
|
|||||||
"cluster_addr": "top_level_cluster_addr",
|
"cluster_addr": "top_level_cluster_addr",
|
||||||
"cluster_cipher_suites": "",
|
"cluster_cipher_suites": "",
|
||||||
"cluster_name": "testcluster",
|
"cluster_name": "testcluster",
|
||||||
"default_lease_ttl": 10 * time.Hour,
|
"default_lease_ttl": (365 * 24 * time.Hour) / time.Second,
|
||||||
"default_max_request_duration": 0 * time.Second,
|
"default_max_request_duration": 0 * time.Second,
|
||||||
"disable_cache": true,
|
"disable_cache": true,
|
||||||
"disable_clustering": false,
|
"disable_clustering": false,
|
||||||
@@ -718,7 +718,7 @@ func testConfig_Sanitized(t *testing.T) {
|
|||||||
},
|
},
|
||||||
"log_format": "",
|
"log_format": "",
|
||||||
"log_level": "",
|
"log_level": "",
|
||||||
"max_lease_ttl": 10 * time.Hour,
|
"max_lease_ttl": (30 * 24 * time.Hour) / time.Second,
|
||||||
"pid_file": "./pidfile",
|
"pid_file": "./pidfile",
|
||||||
"plugin_directory": "",
|
"plugin_directory": "",
|
||||||
"seals": []interface{}{
|
"seals": []interface{}{
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ seal "awskms" {
|
|||||||
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
|
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
|
||||||
}
|
}
|
||||||
|
|
||||||
max_lease_ttl = "10h"
|
max_lease_ttl = "30d"
|
||||||
default_lease_ttl = "10h"
|
default_lease_ttl = "365d"
|
||||||
cluster_name = "testcluster"
|
cluster_name = "testcluster"
|
||||||
pid_file = "./pidfile"
|
pid_file = "./pidfile"
|
||||||
raw_storage_endpoint = true
|
raw_storage_endpoint = true
|
||||||
|
|||||||
Reference in New Issue
Block a user