Commit Graph
1861 Commits
Author SHA1 Message Date
Michael Gaffney a783c91b2d feat(sql): Add dynamic credential hst tables to session recording
This adds the `recording_dynamic_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_vault_store_hst`,
`credential_library_history_base`, and the `credential_purpose_enm`
tables.
2023-05-31 12:18:19 +00:00
Michael Gaffney 3769f0851c test(sql): Refactor the colors persona
This changes multiple IDs in the colors persona to be 12 characters. It
also renames some IDs in an attempt to make them more consistent. This
also changes the order of the columns in some insert statements to
follow the pattern of the other insert statements.

This also adds documentation to the top of colors persona file in an
attempt to explain the general patterns being followed in the file.
2023-05-31 12:18:19 +00:00
Michael Gaffney 03b1291b34 feat(sql): Add history tables for dynamic credentials
This adds history tables for `credential_vault_store`,
`credential_vault_library`, and `credential_vault_ssh_cert_library`.
This also adds a base table for the credential library history tables.
2023-05-31 12:18:19 +00:00
Danielle Miu 385b804ed2 update plugin options to include WithVersion 2023-05-31 12:18:19 +00:00
Todd 5f20eb60ad Add Host and Catalogs to the API resource 2023-05-31 12:18:19 +00:00
irenarindos 92df5cf8c7 feat(bsr): add worker information to session meta 2023-05-31 12:18:19 +00:00
Johan Brandhorst-Satzkorn 15524f3408 api: add created, updated times to recordings 2023-05-31 12:18:19 +00:00
irenarindos 200e7dca5a feat(bsr): add credentials to session meta 2023-05-31 12:18:19 +00:00
Jim 35a2296092 feat(cli): add session recordings: read and list cmds 2023-05-31 12:18:19 +00:00
Jim de88a871c6 feat: (api/cli): add custom type for duration 2023-05-31 12:18:18 +00:00
Jeff Mitchell 18e59998e9 Add storage bucket worker filter handling 2023-05-31 12:18:18 +00:00
Damian Debkowski 234c4ade86 refactor(plugin): use flat file system for loopback storage 2023-05-31 12:18:18 +00:00
Johan Brandhorst-Satzkorn 4387a59ce5 sessionrecordings: add endpoint 2023-05-31 12:18:18 +00:00
Damian Debkowski 331254402a feat(loopback): add ability to mock putObject response 2023-05-31 12:18:18 +00:00
Todd e1540be9f3 Add host information to session recording view 2023-05-31 12:18:18 +00:00
Michael Gaffney a8224f4f57 feat(sql): Add endpoint from session table to session recording
This adds an `endpoint` column to the `recording_session` table and
updates the session recording insert trigger to copy the value of
`endpoint` from the `session` table to the `recording_session` table.
2023-05-31 12:18:18 +00:00
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 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