Commit Graph
1791 Commits
Author SHA1 Message Date
Johan Brandhorst-Satzkorn ad62df6b36 cluster: pass controller ext to authorize conn
Make the controller extension availalbe to the protocol
context constructor.
2023-05-31 12:18:13 +00:00
Johan Brandhorst-Satzkorn 5837d6f387 target: add PostSessionAuthorization callback
The callback is called for any steps that need to be performed
after a successful authorization but before returning to the user.
2023-05-31 12:18:13 +00:00
Johan Brandhorst-Satzkorn 13e1196797 target: add error handling to authorize session
Attempt to undo operations if there are failures during
session authorization.
2023-05-31 12:18:13 +00:00
Johan Brandhorst-Satzkorn 517fc91ebf target: return selected worker when authorizing 2023-05-31 12:18:13 +00:00
Johan Brandhorst-Satzkorn 6d219bd5d1 target: add controller extension to service handler
The controller extension can be used to access types unavailable
in OSS.
2023-05-31 12:18:13 +00:00
irenarindos 47477e8fd6 feat(bsr): add BSR playback/conversion interfaces 2023-05-31 12:18:13 +00:00
irenarindos 444af9151c feat(bsr): Sync BSR keys 2023-05-31 12:18:13 +00:00
Timothy Messier 51e6e64d09 fix(bsr/checksum): Close after calling Stat 2023-05-31 12:18:12 +00:00
Timothy Messier 96f3c71cda test(bsr): Properly handle closed state for test fs implementation
The test implementation will now correctly mimic a real fs's Close
behavior. It will prevent reads and writes to a closed file or
container.
2023-05-31 12:18:12 +00:00
Louis Ruch 34942e001b feat(loopback): Create directories in object key 2023-05-31 12:18:12 +00:00
Todd bc48f2d0e0 Add monitor session job proto and controller changes
This adds a new Job type that is for generic session state monitoring.  Monitoring sessions does not include any information about specific connections.
2023-05-31 12:18:12 +00:00
Jim 4d60f42210 feat(bsr): add bsr kms support in config, dev and tests 2023-05-31 12:18:12 +00:00
Jim 6cc984e4e4 feat (errors): add WorkerFoundForRequest error code 2023-05-31 12:18:12 +00:00
Jim 6f78889947 refact: add servers.ListWorkers(...)
refactor servers.(repository).ListWorkers(...) into just
servers.ListWorkers(...) used independently of the repo.  The method
func is refactor to use the new bits as well.
2023-05-31 12:18:12 +00:00
irenarindos b43830e66e feat(bsr): add protocol to sessionMeta 2023-05-31 12:18:12 +00:00
Louis Ruch 798a1f952a feat(storage): Add support for storage plugins 2023-05-31 12:18:12 +00:00
Damian Debkowski 9ef94892f4 test(plugin): Support storage service in loopback plugin 2023-05-31 12:18:12 +00:00
Louis Ruch 351444f1bd refact(plugin): Move host loopback plugin into internal/plugin/loopback 2023-05-31 12:18:12 +00:00
Todd 4c801cca18 update the recording msg type enums 2023-05-31 12:18:12 +00:00
Todd e2a681a66a stop exporting registerUpstreamMessageTypeSpecifier 2023-05-31 12:18:11 +00:00
Todd dbe3473874 Add CreateChannel enum for upstream message handler 2023-05-31 12:18:11 +00:00
Jim 8cd0e8595f refact: split UpstreamMessageHandler into two interfaces
Originally, UpstreamMessageHandler was used by
controllerUpstreamMessageServiceServer.UpstreamMessage to process
(aka handle) an upstream message and by SendUpstreamMessage to
send an upstream msg.

We split UpstreamMessageHandler into two interfaces so we can
register handlers independently of a senders.
2023-05-31 12:18:11 +00:00
irenarindos 431b9d25a2 feat(bsr): use go 1.20 multierror 2023-05-31 12:18:11 +00:00
Jim 3995f2e6ae feat: add proper audit events for UpstreamMessage
The upstream messages all basically looked the same; regardless
of which message was sent.  This PR adds DetailsUpstreamMessage to
audit events emitted by UpstreamMessage requests/response
2023-05-31 12:18:11 +00:00
Jim 7161569955 feat (events): new test helpers: CloudEventFromFile, CloudEventFromBuf 2023-05-31 12:18:11 +00:00
Jim c4b31313a6 feat (controller): define a ControllerExtension 2023-05-31 12:18:11 +00:00
Todd 68dc4da50e Add CloseConnectionRecording enums to the upstream message service 2023-05-31 12:18:11 +00:00
irenarindos ba476ca73b feat(bsr/ssh): Add SSH Request type chunks 2023-05-31 12:18:11 +00:00
Timothy Messier 26bd86fb07 feat(bsr): Add chunk encoder 2023-05-31 12:18:11 +00:00
Timothy MessierandIrena Rindos 2a31ddd881 feat(bsr): Define container and the required fs interfaces
Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
2023-05-31 12:18:11 +00:00
Timothy Messier 897b70f090 feat(storage): Make Option fields exported
This makes it possible to have external packages implement the
storage.FS, storage.Container, and storage.File interfaces and correctly
inspect the various options.
2023-05-31 12:18:10 +00:00
Johan Brandhorst-Satzkorn 7632143861 add session recording API definitions 2023-05-31 12:18:10 +00:00
Johan Brandhorst-Satzkorn 7bb44b46f5 internal/db: add session recording tables
Add the following new tables used for storing session recordings:

* recording_session
* recording_connection
* recording_channel
* recording_channel_ssh
* storage_bucket
2023-05-31 12:18:10 +00:00
Jim f9b45ca5b7 refact: extend registerControllerUpstreamMessageService to reg hdrs
Extend registerControllerUpstreamMessageService to register upstream
message handlers
2023-05-31 12:18:10 +00:00
Jim 9f01e1b3c1 refact: RegisterUpstreamMessageHandler stop returning dup err
Stop returning an error if RegisterUpstreamMessageHandler is called
multiple times, since it provides little/no value and creates
invalid errors when more than one test controller is started across
all the unit tests.
2023-05-31 12:18:10 +00:00
Jim ff9b3b0873 fix(bsr/kms): VerifySignatureWithBsrKey: handle invalid signature 2023-05-31 12:18:10 +00:00
Jim 9543af8765 feature (bsr/kms): add VerifySignatureWithBsrKey(...) 2023-05-31 12:18:10 +00:00
Jim 410bec1e00 feature(worker/controller): register UpstreamMessageServiceServer 2023-05-31 12:18:10 +00:00
Jim 20cf521cc0 feat(bsr): add bsr kms support in config, dev and tests 2023-05-31 12:18:10 +00:00
Jim a8574621c7 refact(tests): upstream msg tests for node enrollment chg 2023-05-31 12:18:10 +00:00
Louis Ruch def8e47f32 feat(storage): Add pluginInfo to storageBucket 2023-05-31 12:18:10 +00:00
Damian Debkowski 87eb94e026 feat(proto): plugin support validate permissions 2023-05-31 12:18:09 +00:00
Damian Debkowski 39f3e391ae feat(proto): add headObject to storage plugin service 2023-05-31 12:18:09 +00:00
Louis Ruch 52fbc6410c feat(storage): Add interface, options and errors 2023-05-31 12:18:09 +00:00
Todd 1e3b02fbe7 Add error info and code test for a recently added error 2023-05-31 12:18:09 +00:00
Jim b9cc441227 feature (handlers): add UpstreamMessageService and its oss impl.
Define OSS protos for UpstreamMessageService rpc which defines a way
to send an upstream message to a controller (across multi-hops if
needed).

Implement OSS versions of both workers and controllers for the
UpstreamMessageService. The upstream requests/responses are encrypted
using the originating worker's NodeCredential's key.

The worker always forwards the request upstream.

The controller attends to find a registered UpstreamMessageHandler to
handle the msg; if none if found, then an Unimplemented status error
is returned.
2023-05-31 12:18:09 +00:00
Todd bd2bca987d Add the first iteration of the recorder cache and wire it in 2023-05-31 12:18:09 +00:00
Timothy Messier 397a697731 feat(bsr): Define stubs for meta structures
These are used to provide the metadata about a session or connection
when writing a BSR and will be written to the corresponding .meta files
within a BSR.
2023-05-31 12:18:09 +00:00
Timothy Messier d15d2e3bc0 feat(bsr): Define required interface needed by storage 2023-05-31 12:18:09 +00:00
Jim aa10d1dbfe feat(KMS): add BsrKeys type and req. receiver functions 2023-05-31 12:18:09 +00:00