Commit Graph
3048 Commits
Author SHA1 Message Date
Michael Gaffney 06e4e46248 feat(sql): Add static credential hst tables to session recording
This adds the `recording_static_credential` join table and a trigger
that runs as an after insert on the `recording_session` table. The join
table joins the `recording_session`, `credential_static_store_hst`,
`credential_static_history_base`, and the `credential_purpose_enm`
tables.
2023-05-31 12:18:18 +00:00
Michael Gaffney 3a64fb3d58 feat(sql): Add history tables for static credentials
This adds history tables for `credential_static_store`,
`credential_static_json_credential`,
`credential_static_username_password_credential`, and
`credential_static_ssh_private_key_credential`. This also adds a base
table for the static credential history tables.
2023-05-31 12:18:18 +00:00
Todd 386eac072c Add recording_channel_ssh_aggregate view 2023-05-31 12:18:18 +00:00
Johan Brandhorst-Satzkorn 89befba55e api: add state and error details fields to recordings 2023-05-31 12:18:18 +00:00
Johan Brandhorst-Satzkorn 11893a8885 db: add state and error_details to recording 2023-05-31 12:18:17 +00:00
Louis Ruch e83f5bcd4c feat(storage): Rename NewLocalFS to NewSyncingFS 2023-05-31 12:18:17 +00:00
Louis Ruch 042c46e00e test(storage): Avoid panic in test when writing to closed channel 2023-05-31 12:18:17 +00:00
Johan Brandhorst-Satzkorn af8e4d63be db: add channel summary details 2023-05-31 12:18:17 +00:00
Todd ee6a5f05b5 Add historical target and scope information to session recording 2023-05-31 12:18:17 +00:00
Todd 25d50d1077 Add tests for recording collection actions on scopes 2023-05-31 12:18:17 +00:00
irenarindos 2ba780703f feat(bsr): add summary unavailable error 2023-05-31 12:18:17 +00:00
Damian Debkowski 95c3b2d56a test(storage): improve loopback mock err & update storage container closed err msg 2023-05-31 12:18:17 +00:00
Todd cfe0dc08d9 Add session recording service stuff 2023-05-31 12:18:17 +00:00
Johan Brandhorst-Satzkorn 281989e595 regenerate API files 2023-05-31 12:18:17 +00:00
Michael Gaffney 477e6df269 feat(sql): Add target and host history tables to session recording
This adds four columns to the `recording_session` table which are
foreign keys to the `iam_scope_hst`, `target_ssh_hst`,
`host_history_base`, and `host_catalog_history_base` tables. The foreign
key to the `iam_scope_hst` table references the project scope of the
target at the time of the recording.
2023-05-31 12:18:17 +00:00
Michael Gaffney 73b710cd06 refactor(sql): Rename session recording migration
This renames the migration with the session recording table to come
after the history table migrations. This allows the session recording
table to have foreign key references to the history tables without using
alter table statements.
2023-05-31 12:18:17 +00:00
Michael Gaffney 37c6b8e540 feat(sql): Add history tables for hosts
This adds history tables for `static_host` and `host_plugin_host`. This
also adds a base table for the host history tables.

This also adds a new test to the history table test suite. The new test
verifies the contents of each history table against the contents of
their operational table.
2023-05-31 12:18:16 +00:00
Michael Gaffney b97dc07bb0 feat(sql): Add history tables for host catalogs
This adds history tables for `static_host_catalog` and
`host_plugin_catalog`. This also adds a base table for the host catalog
history tables and an immutable table with one row for when a target has
a direct address assigned to it.

This also adds a reusable trigger function for tables that are
immutable.
2023-05-31 12:18:16 +00:00
Michael Gaffney 7ebe393aee feat(sql): Add history table for target_ssh
This adds a history table for `target_ssh`.

This also fixes a bug in the history table test suite. Prior to this
change, the operational table name was calculated from the history table
name using the SQL trim() function. The SQL trim function as used
returned 'targe' for 'target_ssh_hst' instead of the expected value
'target_ssh'.
2023-05-31 12:18:16 +00:00
Todd d365123045 add session recording aggregate view 2023-05-31 12:18:16 +00:00
Danielle Miu bb82fa6507 update storage buckets to use a shared persisted secrets type. add options 2023-05-31 12:18:16 +00:00
Jim 70a950b7a3 feat (session recordings): Read, List and Download API 2023-05-31 12:18:16 +00:00
Jim e4d6742514 feat (action/resource): add Download and SessionRecording 2023-05-31 12:18:16 +00:00
Jim 46348d7b49 fix (bsr/kms): use const time compare for sig 2023-05-31 12:18:16 +00:00
irenarindos 3e9a4bf03e feat(bsr): add VerifySignatureWithPubKey to kms methods 2023-05-31 12:18:16 +00:00
Timothy Messier 18eca382c6 feat(globals): Add prefixes for recording resources 2023-05-31 12:18:16 +00:00
Timothy Messier 29c739e8b8 feat(bsr): Add function for generating a channel id 2023-05-31 12:18:16 +00:00
irenarindos 718536783c feat(bsr): expand session metadata 2023-05-31 12:18:16 +00:00
irenarindos 93afd24327 feat(bsr): add channel request types to chan callbacks 2023-05-31 12:18:15 +00:00
irenarindos 7ac73d7ba8 feat(bsr): Define types for summary data 2023-05-31 12:18:15 +00:00
Todd 59ae4b5901 Expand the recorder manager interface 2023-05-31 12:18:15 +00:00
Louis Ruch ba0dd857f3 feat(target): Add CLI support for storage bucket association 2023-05-31 12:18:15 +00:00
Louis Ruch 0d96a20024 feat(target): Add domain support for storage bucket association 2023-05-31 12:18:15 +00:00
Todd 8f9e218e1c refactor historical values in the session recording resource 2023-05-31 12:18:15 +00:00
Damian Debkowski 39a07252b6 refactor(storage): read from local disk for putObject 2023-05-31 12:18:15 +00:00
Louis Ruch 7263d08bc5 feat(storage): Add target storage_bucket relation 2023-05-31 12:18:15 +00:00
Johan Brandhorst-Satzkorn 328b039138 scopes: fix test expectation 2023-05-31 12:18:15 +00:00
Jim ac67b8d7f5 chore: fix typo in workerUpstreamMessageServiceServer godoc 2023-05-31 12:18:15 +00:00
Timothy Messier 21f6be9ab5 refact(sql): Move migrations to avoid number conflict 2023-05-31 12:18:15 +00:00
Michael Gaffney 882b7eca2f feat(sql): Add IAM history table references to session recording
This adds two columns to the `recording_session` table. One column is a
foreign key to the `iam_user_hst` table and the other is a foreign key
to the `iam_scope_hst` table. The foreign key to the `iam_scope_hst`
table reference the IAM scope the user belongs to at the time of the
recording.
2023-05-31 12:18:14 +00:00
Michael Gaffney 9fd01a79f0 refactor(sql): Move and rename session recording migration
This moves and renames the migration with the session recording table to
come after the history table migrations. This allows the session
recording table to have foreign key references to the history tables
without using alter table statements.
2023-05-31 12:18:14 +00:00
Louis Ruch 1662445e8e feat(storage): Wire up storage buckets in session recording 2023-05-31 12:18:14 +00:00
Louis Ruch 7ab3c66544 feat(storage): Add support for Storage Bucket CLI 2023-05-31 12:18:14 +00:00
Louis Ruch 8ea61054cd feat(storage): Add support for Storage Bucket API 2023-05-31 12:18:14 +00:00
Todd feb87e717e Add Closed error code and rename recorder cache to manager 2023-05-31 12:18:14 +00:00
Todd dbbcdb72bf Add match test for hashicorp and go 1.20 multi errors 2023-05-31 12:18:14 +00:00
irenarindos e29b844131 feat(bsr): improve error handling 2023-05-31 12:18:14 +00:00
Michael Gaffney 4488f5f8cd refactor(sql): Move and rename history table migrations
This moves and renames the history table migration files into the
correct migration directory.
2023-05-31 12:18:14 +00:00
Michael Gaffney 463f1e36af feat(sql): Add history table for iam_user
This adds a history table for `iam_user`.
2023-05-31 12:18:14 +00:00
Michael Gaffney 8ae658a570 feat(sql): Add history table and triggers for iam_scope
This adds a history table for `iam_scope`. It also includes reusable
triggers to maintain the included history table and future history
tables.

This also includes a test suite that runs on any table ending in `_hst`.
2023-05-31 12:18:14 +00:00