From d52fb81e68b827fec06a24ede7cc35dd2f88abde Mon Sep 17 00:00:00 2001 From: Michael Gaffney Date: Mon, 21 Sep 2020 12:12:18 -0400 Subject: [PATCH] Change the default max session for a target to 8 hours (#392) * Change the default max session for a target to 8 hours * Run 'make migrations' --- internal/db/migrations/postgres.gen.go | 3 ++- internal/db/migrations/postgres/41_targets.up.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/db/migrations/postgres.gen.go b/internal/db/migrations/postgres.gen.go index 9552935ad9..a4d482f8d3 100644 --- a/internal/db/migrations/postgres.gen.go +++ b/internal/db/migrations/postgres.gen.go @@ -3153,7 +3153,8 @@ create table target_tcp ( description text, default_port int, -- default_port can be null -- max duration of the session in seconds. - session_max_seconds int not null default 0 + -- default is 8 hours + session_max_seconds int not null default 28800 check(session_max_seconds > 0), -- limit on number of session connections allowed. -1 equals no limit session_connection_limit int not null default 1 diff --git a/internal/db/migrations/postgres/41_targets.up.sql b/internal/db/migrations/postgres/41_targets.up.sql index 695cb5784f..e2d425c914 100644 --- a/internal/db/migrations/postgres/41_targets.up.sql +++ b/internal/db/migrations/postgres/41_targets.up.sql @@ -100,7 +100,8 @@ create table target_tcp ( description text, default_port int, -- default_port can be null -- max duration of the session in seconds. - session_max_seconds int not null default 0 + -- default is 8 hours + session_max_seconds int not null default 28800 check(session_max_seconds > 0), -- limit on number of session connections allowed. -1 equals no limit session_connection_limit int not null default 1