change session duration to 5 days (#4480)

This commit is contained in:
Michal Nicpon 2022-03-07 15:37:54 -07:00 committed by GitHub
parent ff0ebaab7d
commit 1aa7b96837
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -0,0 +1 @@
* Increase default session duration to 5 days

View file

@ -61,5 +61,4 @@ func applyDevFlags(cfg *config.FleetConfig) {
cfg.Mysql.Username = "fleet"
cfg.Mysql.Database = "fleet"
cfg.Mysql.Password = "insecure"
cfg.Session.Duration = 7 * 24 * time.Hour
}

View file

@ -395,7 +395,7 @@ func (man Manager) addConfigs() {
// Session
man.addConfigInt("session.key_size", 64,
"Size of generated session keys")
man.addConfigDuration("session.duration", 24*time.Hour,
man.addConfigDuration("session.duration", 24*5*time.Hour,
"Duration session keys remain valid (i.e. 4h)")
// Osquery
@ -943,7 +943,7 @@ func TestConfig() FleetConfig {
},
Session: SessionConfig{
KeySize: 64,
Duration: 24 * 90 * time.Hour,
Duration: 24 * 5 * time.Hour,
},
Osquery: OsqueryConfig{
NodeKeySize: 24,

View file

@ -2,7 +2,7 @@ package fleet
import "time"
// Createable contains common timestamp fields indicating create time
// CreateTimestamp contains common timestamp fields indicating create time
type CreateTimestamp struct {
CreatedAt time.Time `json:"created_at" db:"created_at"`
}