Commit Graph
1920 Commits
Author SHA1 Message Date
Timothy Messier c2da88d2a5 test(cmd/config): Fix test compilation error
Refs: 9ae2bdfae
2023-05-31 12:47:20 +00:00
Timothy Messier cdf18b6369 test(cli/targets): Add test case for default client port 2023-05-31 12:18:24 +00:00
Todd fb1ea92a30 Pass both the control and data context into handle 2023-05-31 12:18:24 +00:00
irenarindos 8c96d3ef9b fix(cmd): add session recording resource prefixes 2023-05-31 12:18:24 +00:00
Johan Brandhorst-Satzkorn 3e07b2ffaf bsr: rename fields and remove project id from meta 2023-05-31 12:18:24 +00:00
Johan Brandhorst-Satzkorn 64764e29e5 bsr: invert credential, cred store relationship
This lifts the credential sources up to the top of
the SessionMeta struct, avoiding indirection through
the credential stores.
2023-05-31 12:18:24 +00:00
Johan Brandhorst-Satzkorn e0700570a2 bsr: add endpoint to session meta
The endpoint stores the address of the host
the egress worker proxies to.
2023-05-31 12:18:24 +00:00
Johan Brandhorst-Satzkorn 59f78ac1f8 config: allow wasm execution under UI CSP
The wasm-unsafe-eval option is necessary for the asciinema
player on the Admin UI
2023-05-31 12:18:24 +00:00
Danielle Miu b4137a14c3 update test.sh to use loopback flag 2023-05-31 12:18:24 +00:00
Damian Debkowski e7420eb690 fix(plugin): correct spelling mistake 2023-05-31 12:18:24 +00:00
Todd 6178dd516e Let a target subtype validate the authorize session's session state 2023-05-31 12:18:23 +00:00
Timothy Messier 9f2c83f3b0 refact(bsr): Rename const to denote when interpolation is needed 2023-05-31 12:18:23 +00:00
Jim 21e4827178 fix(Upstream Msg): limit types used in tests 2023-05-31 12:18:23 +00:00
Timothy Messier b88b4cce75 feat(bsr/ssh): Add file transfer direction to channel summary
When an SSH channel is used for a file transfer, the summary will report
the detected direction of the file transfer as either an upload or
download, relative to the end client.
2023-05-31 12:18:23 +00:00
Timothy Messier 78ea1a9f3a refact(bsr): Use JSON for session meta and summary data
The session metadata is provided all at once when a new bsr is opened.
While the session recording metadata records metadata about a recording
while the recording is happening, notably it records each time a new
connection occurs.

The nested structure of the session metadata does not lend itself to the
append-only syntax of the recording meta file. In addition we do not
want to mix different kinds of metadata together. Thus the session
metadata is now written to a separate file in the BSR, and is written as
JSON which better handles the nested structure and allows for simpler
encoding/decoding.

Similarly the summary files are intended to be written to as containers
close and have been switched to JSON.
2023-05-31 12:18:23 +00:00
Jim 7dc15f1f39 fix(Upstream Msg): limit types supported in toMsgType(...) 2023-05-31 12:18:23 +00:00
Louis Ruch 203d4bb048 fix(storage): Remove client 2023-05-31 12:18:23 +00:00
Danielle Miu 1052118836 remove field masks from proto 2023-05-31 12:18:23 +00:00
Louis Ruch f0e95d7267 docs(storage): Update comments 2023-05-31 12:18:23 +00:00
Timothy Messier f53d65eacd refact(sql): Rename migrations to avoid number conflicts 2023-05-31 12:18:23 +00:00
Todd 2359d5b7a5 remove filter flags and options for session recordings 2023-05-31 12:18:23 +00:00
Todd d1a5f3a2ff Update attribute fields to be proto struct so generated api becomes map[string]any 2023-05-31 12:18:22 +00:00
irenarindos 4785f2388f chore(session recording): update cmd typo 2023-05-31 12:18:22 +00:00
Todd 4063880bbe Add credential history views 2023-05-31 12:18:22 +00:00
Louis Ruch 95398d3b65 fix(dev): Fix panic in controller-only dev mode
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb8 pc=0x16626b0]

goroutine 1 [running]:
github.com/hashicorp/boundary/internal/cmd/commands/dev.(*Command).Run(0xc000b90000, {0xc00003e110, 0x1, 0x1})
        github.com/hashicorp/boundary/internal/cmd/commands/dev/dev.go:484 +0x490
github.com/mitchellh/cli.(*CLI).Run(0xc0003323c0)
        github.com/mitchellh/cli@v1.1.5/cli.go:262 +0x5f8
github.com/hashicorp/boundary/internal/cmd.RunCustom({0xc00003e100?, 0x60?, 0x0?}, 0x0?)
        github.com/hashicorp/boundary/internal/cmd/main.go:189 +0xa16
github.com/hashicorp/boundary/internal/cmd.Run(...)
        github.com/hashicorp/boundary/internal/cmd/main.go:95
main.main()
        github.com/hashicorp/boundary/cmd/boundary/main.go:16 +0xc7
2023-05-31 12:18:22 +00:00
Louis Ruch 9a3006e42a feat(storage): Include type plugin in API response for buckets 2023-05-31 12:18:22 +00:00
Jim 468c58836b feat(recordings/cli): more read detail info 2023-05-31 12:18:22 +00:00
Damian Debkowski 9aa4d40d95 feat(storage): provide optional chunk size field for GetObject 2023-05-31 12:18:22 +00:00
irenarindos b57692f8fc chore(bsr): check index bounds for meta unmarshal 2023-05-31 12:18:22 +00:00
Jim d49fde2299 feat(cli/session-recordings): add download cmd 2023-05-31 12:18:22 +00:00
Jim 9207ec08f2 feat: add request ctx stream interceptor 2023-05-31 12:18:22 +00:00
Jim 0c465706cc chore: increment base version to 0.13.0 2023-05-31 12:18:22 +00:00
Johan Brandhorst-Satzkorn 98e0b9db98 commands: add created, updated to recordings 2023-05-31 12:18:22 +00:00
Johan Brandhorst-Satzkorn 3374d32a55 api: add created, updated times to conn, chan
In addition to session recordings, connection and
channel recordings now also include the created and
updated time.
2023-05-31 12:18:21 +00:00
Louis Ruch 7207353066 docs(ssh): Update docs to reflect ssh default port is not required 2023-05-31 12:18:21 +00:00
Timothy Messier b9de6cf00b fixup:(bsr): Correctly reference subcontainers when opening
This is a fixup for 60785b5a8
2023-05-31 12:18:21 +00:00
Timothy Messier 738a6c6472 feat(bsr/convert): Implement ToAsciicast
This adds support for converting a channel in a SSH BSR to an asciicast.
2023-05-31 12:18:21 +00:00
Timothy Messier 9227fcd879 feat(bsr/convert): Add logic to convert ssh channel to asciicast 2023-05-31 12:18:21 +00:00
Timothy Messier ed6882a457 feat(bsr/convert): Add asciicast package
This provides a new internal package for constructing and serializing an
asciicast in the v2 asciicast file fromat.

See: https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md
2023-05-31 12:18:21 +00:00
Timothy Messier 916a919bf0 feat(bsr): Remove ascii format of protocol
This was originally introduced to ensure that the meta files only
included ascii characters. However, this makes reading the protocol from
meta file less reliable since it does not exactly match the protocol
string. Instead protocol strings will be recorded in the meta files as
is. Generally protocol strings should include readable characters.

This also updates the ssh.Protocol to be 4 readable characters.
2023-05-31 12:18:21 +00:00
Timothy Messier 4112c4e8fe feat(bsr): Add methods for opening ChunkScanners for data files 2023-05-31 12:18:21 +00:00
Timothy Messier e37fa39c95 feat(bsr/fstest): Add localfs implementation
This adds another test storage.FS implemenation. This can be used to
write/read containers and files from a local filesystem via calls to the
os pacakge.
2023-05-31 12:18:21 +00:00
Timothy Messier 713d961152 feat(bsr/fstest): Add test TempFile implementation 2023-05-31 12:18:21 +00:00
Timothy Messier b4ce802572 refact(bsr/convert): Use new storage.TempFile interface
This changes the ToAscinema function to take a storage.TempFile instead
of a storage.FS. It was noticed that when this was being used a
storage.FS was being created just prior to calling this just so that it
could then create a temporary file. It seemed to make more sense to just
pass the temporary file in, instead of needing to expand the storage.FS
interface.

This also renames this method to align with the file format that the
returned io.Reader will contain.
2023-05-31 12:18:21 +00:00
Timothy Messier e29939ce41 feat(storage): Define interface for creating temporary files
This provides a new type for a temporary file and a method on a
RecordingStorage to create temporary files. Temporary files will get
removed when closed.
2023-05-31 12:18:21 +00:00
irenarindos 6705f6128a feat(bsr):unmarshal updated meta 2023-05-31 12:18:20 +00:00
irenarindos 304d15021f chore(bsr): remove references to ssh protocol 2023-05-31 12:18:20 +00:00
irenarindos e567bb97e6 feat(bsr): instantiate BSR session for playback 2023-05-31 12:18:20 +00:00
Timothy Messier 46e1752283 feat(bsr/fstest): Support read mode
This updates the fstest implementation of a storage.FS to support
opening sub containers and files in read-only mode.

Now when calling `SubContainer`:

- If using `storage.WithCreateFile`, an error is returned if the
  container already exists.
- If not using `storage.WithCreateFile` and error is returned if the
  container does *not* exist.

When calling `OpenFile`:

- on a container that was created with `storage.ReadOnly`, an error is
  returned if attempting to open the file wth `storage.ReadWrite`.
- with `storage.WithCreateFile`, an existing file is replaced with a new
  empty file, (ie "truncated").
- without `storage.WithCreateFile`, an error is returned if the file
  does not exist.
2023-05-31 12:18:20 +00:00
Timothy Messier e9c7e373e9 feat(bsr/fstest): Implement Open method 2023-05-31 12:18:20 +00:00