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.
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
This makes it possible to have external packages implement the
storage.FS, storage.Container, and storage.File interfaces and correctly
inspect the various options.
Add the following new tables used for storing session recordings:
* recording_session
* recording_connection
* recording_channel
* recording_channel_ssh
* storage_bucket
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.
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.
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.
This requires specifying `**` as the selector in the proto, which will
match any segments and simply requires that the verb is the last part of
the URL, which it already is.
This commit fixes the behaviour of scopes where whitespace was allowed
(and thus persisted) in the Name and Description fields.
It also adds some more tests for scope Create and Updateto cover more
error cases.
For scope update, `handlers.ValidateUpdateRequest` exists, however this
was not used as it does not work properly for requests where the
`global` scope is updated.
In `ValidateUpdateRequest`, an ID check is performed and it assumes
there's always a resource prefix (eg: "p", "o") and an identifier
(random numbers and letters) after the prefix. This fails for `global`.
See `handlers.ValidId`.
Most of the changes here are changes or enhancements that are useful for
tests. The crux of the issue was that I had pulled up one var to the
package level so it could be read from tests, but that var was not being
reset between tests. It's not even used in tests anymore, so I put it
back to function-local.
* feat: add a new daily billing view
* update views and table based on early feedback
* address review comments
* update CTE to be an accurate result of what we expect
* remove 'with time zone' from daily range
* remove timezone
* Update internal/db/schema/migrations/oss/postgres/70/01_hcp_billing_daily.up.sql
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
* go mod updates
* fix tests
---------
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
These are deps either maintained by the Boundary team or approved by
members of the team. A few specific notes on some of the non-HC and
non-DB ones:
github.com/fatih/color: fixes some windows issues
github.com/zalando/go-keyring: fixes a windows crash