Add multi connection parameters through targets and into session creation (#375)
* Update protos and gen * Add new values to targets CLI command * Lots more plumbing of new parameters through everything * allow fields to be set to zero value. * Disallow set but empty name/description strings in create/update verifiers Co-authored-by: Jim Lambert <jlambert@hashicorp.com>
This commit is contained in:
1 parent
07a7e9750a
commit
62baef1b7e
34 files changed
+725
-229
No files matched your search
@@ -100,14 +100,14 @@ create table target_tcp (
|
||||
description text,
|
||||
default_port int, -- default_port can be null
|
||||
-- max duration of the session in seconds. default of 0 equals no limit
|
||||
session_duration_seconds int not null default 0
|
||||
check(session_duration_seconds >= 0),
|
||||
session_max_duration int not null default 0
|
||||
check(session_max_duration >= 0),
|
||||
-- limit on number of session connections allowed. default of 0 equals no limit
|
||||
connection_limit int not null default 1
|
||||
check(connection_limit >= 0),
|
||||
session_connection_limit int not null default 1
|
||||
check(session_connection_limit >= 0),
|
||||
-- connection idle timout in seconds. default of 0 equals no limit
|
||||
connection_idle_timeout_seconds int not null default 0
|
||||
check(connection_idle_timeout_seconds >= 0),
|
||||
connection_idle_timeout_duration int not null default 0
|
||||
check(connection_idle_timeout_duration >= 0),
|
||||
create_time wt_timestamp,
|
||||
update_time wt_timestamp,
|
||||
version wt_version,
|
||||
@@ -129,7 +129,7 @@ create trigger
|
||||
immutable_columns
|
||||
before
|
||||
update on target_tcp
|
||||
for each row execute procedure immutable_columns('public_id', 'scope_id', 'session_duration_seconds', 'connection_limit', 'connection_idle_timeout_seconds', 'create_time');
|
||||
for each row execute procedure immutable_columns('public_id', 'scope_id', 'create_time');
|
||||
|
||||
create trigger
|
||||
update_version_column
|
||||
@@ -162,9 +162,9 @@ select
|
||||
name,
|
||||
description,
|
||||
default_port,
|
||||
session_duration_seconds,
|
||||
connection_limit,
|
||||
connection_idle_timeout_seconds,
|
||||
session_max_duration,
|
||||
session_connection_limit,
|
||||
connection_idle_timeout_duration,
|
||||
version,
|
||||
create_time,
|
||||
update_time,
|
||||
|
||||
@@ -159,7 +159,7 @@ begin;
|
||||
immutable_columns
|
||||
before
|
||||
update on session
|
||||
for each row execute procedure immutable_columns('public_id', 'certificate', 'expiration_time', 'connection_limit', 'create_time', 'endpoint');
|
||||
for each row execute procedure immutable_columns('public_id', 'certificate', 'expiration_time', 'connection_limit', 'create_time', 'endpoint', 'connection_idle_timeout_seconds');
|
||||
|
||||
create trigger
|
||||
update_version_column
|
||||
|
||||
Reference in new issue
Block a user