If callers want errors to create events, they can do so
by wrapping the error. Sometimes we don't want db
errors to be events, and before this there was no way
to supress them.
Observed some flakiness here. A test reported that the session was still "pending". Adding additional retries to ensure that it will eventually go active.
We have observed several unit tests occasionally fail when trying to read a handshake due to the following error:
failed to read protobuf message: failed to get reader: received close frame: status = StatusProtocolError and
reason = "received header with unexpected rsv bits set: false:false:true"
After an investigation, it's still unclear how this happens. We are opting to just retry to mitigate the flakiness.
There was a misunderstanding of how goroutines work. Turns out, the goroutine uses the same keyring as the main routine, which can result in some conflicts depending on when the goroutine executes
Rearranges the directory structure to align better with the enos scenarios. Tests will now be added in the `tests` directory, with a folder in the directory corresponding to an enos scenario.
The bullet point for _Consistent Workflow for Access_ uses the word "securely" twice:
> Boundary securely connects the user securely to their infrastructure regardless of cloud platform
This PR removes the second instance.
Add initial templating support to Vault credential libraries
This adds support for templating various account and user values into
Vault dynamic credential library POST bodies and GET/POST paths.
It also unifies how parameters are used in grants, with backwards
compatibility.
This fixes a theoretical issue with database interaction. Because the
fields in the database are signed 64-bit integers, it's theoretically
possible to overflow them if we're using unsigned 64-bit integers in the
application code.
With this commit, the Worker now sends BytesUp and BytesDown for each
of the connections it handles to the Controller in the Status request.
The Controller then persists these fields to the database. There is also
a new trigger to prevent bytes_up and bytes_down to change after a
connection has been closed, as the last update to a session_connection
row should be the one that is performed as part of the connection
closure process.
Introduces data about bytes read and written to the connection close
payload. No changes are required in the Controller because the RPC
messages already contained the required fields. As of this commit,
bytes_up and bytes_down columns in the session_connection table are now
populated when a connection closes.
Refs: #2509
This commit introduces a new net.Conn implementation (countingConn) that
will keep track of bytes read and written for a particular client
connection. This is then implemented into the worker code using
interface composition.
Refs: #2501
Fixes the comments on functions wt_add_seconds, wt_add_seconds_to_now,
wt_sub_seconds, and wt_sub_seconds_from_now which were the tragic
victims of a copypasta error.
The "can not read deleted $NEW_STORE static store" bats test was demonstrating flaky behavior where it would fail due to the credential store read still returning something valid. This check has been moved to an e2e test in order to add some retry logic to the check.