* oss:feat(storage): add observation tag in proto for telemetry
* oss:feat(storage): add observation tag in proto service
* oss:feat(storage): generate proto files with changes
* oss:feat(storage): add storage bucket id to target proto
* Add observation tags to session_recording.proto
* remove scope_info observation tags
* Remove quotes and add tag to storage_bucket_id
* Add tags for session recording service
* Update proto definitions
- Remove gotags on messages
- Remove quotes
The client agent serves on "localhost:9300" by default. It appears
on some systems this resolves to ::1:9300 and on some systems
127.0.0.1:9300. We should use the same address on the client
as the server to avoid any incompatibilities between systems.
* internal/cmd/wrapper: add deprecation wrapper
The deprecation wrapper can be used to display a warning to callers
when a command is deprecated.
* all: rename daemon to cache
Rename the boundary daemon command to boundary cache. This
avoids confusion with future client/daemons.
* changes daemon to cache in nav
---------
Co-authored-by: Robin Beck <stellarsquall@protonmail.ch>
The cluster listener supports a `max_request_duration` option, and
defaults to 90 seconds. However, this configuration was not being use
when processing grpc requests from the listener. This meant that
requests from worker to controller could hang indefinitely and
contributed to the recently fixed issue with database connections being
stuck in `idle in transaction`.
This commit adds a grpc interceptor that ensures each request has a
deadline set to the max request duration for the listener.
Refs: 29cd7bc9d6
The workflow started breaking when there was a competing file in /usr/local/bin/LICENSE.txt (from a packer install). The added flag forces unzip to overwrite any files.
Several session.Repository methods need to encrypt or decrypt fields
when persisting or retrieving a Session. These encrypt/decrypt
operations where being performed while within a database transaction.
The first step in the encrypt/decrypt operation is to retrieve the
kms.Wrapper. While the wrappers get cached in memory, the retrieval
still results in a database query to check that the kms collection
version has not changed. This query happens with a separate db.Reader,
and therefore uses a separate database connection from the transaction
being used by the session.Repository.
If the controllers are configured with a relatively low
`max_open_connections`, and be under sufficient load interactive with
sessions, the controller can consume all of the available database
connections, and get stuck with open transactions while waiting for a
database connection to execute the kms related queries. This can be see
by checking pg_stat_activity and seeing transactions stuck in `idle in
transaction` with a wait_event of ClientRead.
This commit changes all of the Repository methods the perform any
encryption or decryption operations, including the retrieval of the
kms.Wrapper, outside of a database transaction. An alternative approach
would be to unsure that the kms.Wrapper retrieval happens within the
same database transaction. However, it seems preferable to avoid doing
these relatively expensive operations within a transaction when it is
not necessary.
As part of this fix, it also eliminates some logic that is no longer
needed. During previous would with KMS wrapping, the method of how
sessions were encrypted was changed, and some logic to lazily re-encrypt
sessions was introduced. However, given that terminated sessions are
deleted, and the KMS changes was introduced several versions ago
(0.13.0), this lazy re-encrypt logic should no longer be necessary.
Refs: edd323b73a
See:
https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEWhttps://www.postgresql.org/docs/current/runtime-config-client.html#GUC-IDLE-IN-TRANSACTION-SESSION-TIMEOUThttps://developer.hashicorp.com/boundary/docs/configuration/controller#max_open_connections
* Auto generate the permissions pages.
* Add add- set- remove- auto descriptions. Hide scope line when no scope provided
* Document the resource info struct
AuthToken selection involves checking to seeing if the one we are picking has been canceled or expired on the boundary controller. If we are only searching locally and not performing a refresh, there is no need to check if the tokens have expired or not.
* docs: Add bsr purpose key examples
* Apply batch of suggestions from code review
Co-authored-by: Michael Li <michael.li@hashicorp.com>
---------
Co-authored-by: Michael Li <michael.li@hashicorp.com>
* Update README_docker_io.md
Fix image names in Docker run commands README to include "hashicorp/" prefix to make sure that local trash images will not pollute the process.
* doc: Add trailing backslashes to make it copyable
---------
Co-authored-by: Michael Li <michael.li@hashicorp.com>
* Add hidden ferry pause and resume functions
* add check for 200 status
* include pause/resume status in ferry status, fix output
* put error string back to previous state