Commit Graph
4531 Commits
Author SHA1 Message Date
Johan Brandhorst-Satzkorn 40cb9f5c9e Restrict concurrent password hashes (#5437)
* internal/auth/password: add resizable pool

The resizable pool wraps the permit pool with a mutex
to allow it to be resized at runtime.

* internal/auth/password: add concurrency limit

The default concurrency limit is 1, and it can be
set using the SetHashingPermits function.

* internal/cmd/config: allow configuring hashing limits

The new concurrent_password_hash_workers configuration
value can be used to loosen the constraints on the
userpass auth method hashing operation.

* internal/cmd: set password hashing constraints

Sets the password hashing concurrency constraints on
startup and config reload.

* CHANGELOG: add notice about password concurrency limit
2025-01-22 13:31:42 -08:00
Johan Brandhorst-Satzkorn aad833fe09 CHANGELOG: add note about worker status refactor (#5465) 2025-01-22 11:53:35 -08:00
Elim Tsiagbey 91c1308924 chore: Update boundary-plugin-gcp to version v0.1.0 (#5462)
Update the GCP plugin dependency to point the latest released version
2025-01-22 13:29:14 -05:00
Damian Debkowski efe9fe780d chore: update changelog with bug fix (#5460) 2025-01-22 10:05:16 -08:00
Irena Rindos dfe4f91be3 refactor(server): refactor worker tags (#5445)
* refactor(server): refactor worker tags
2025-01-22 13:03:55 -05:00
Irena Rindos e2102f65dd chore: update changelog for worker domain refactor (#5461) 2025-01-22 13:01:57 -05:00
Louis Ruch 75aac063ba chore: Update minio plugin version (#5444) 2025-01-22 09:58:47 -08:00
Michael Li 00a5a8f4c5 test(e2e): Address flakiness in bytes up/down test (#5450) 2025-01-22 11:14:00 -05:00
Michael Li 272c7cf4d3 chore: Add permissions to CI user (#5446) 2025-01-22 10:59:10 -05:00
Lauren 4731bc8747 bump-ui-commit-904864b14 (#5449) 2025-01-21 15:38:53 -08:00
Michael Li 54c9dc850d chore: Handle case with multiple artifacts (#5442) 2025-01-21 14:11:35 -05:00
Johan Brandhorst-Satzkorn a43cb90a32 internal/session: ensure orphaned connection cleanup (#5438)
Previously, the orphaned connection cleanup job would
not detect that a connection that was created before a
worker had submitted a successful session info was
orphaned. We now fall back to using the worker update
time as an indicator if the session info time is not set.
2025-01-21 11:09:15 -08:00
vanphan24 196f01bbd5 Update what-is-boundary.mdx (#5433)
added HTTPS and minor edits to the "Just-in-time network access" feature table
2025-01-21 10:30:02 -07:00
dd9c7b9d60 Create IPv6 and dual stack enos tests (#5212)
Co-authored-by: Danielle Miu <29378233+DanielleMiu@users.noreply.github.com>
Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com>
2025-01-21 07:37:04 -08:00
Elim Tsiagbey 34d13a0aae chore: update boundary-plugin-gcp dependency to latest version (#5419)
* chore: update boundary-plugin-gcp dependency to latest version
2025-01-09 15:53:08 -05:00
Johan Brandhorst-SatzkornandDamian Debkowski ec0a3f964b Worker status refactor (#5417)
* oss: feat(proto): statistics rpc added to server coordination service

* oss: feat(session): add update statistics status service

* oss: feat(handlers): add Statistics method to worker service server

* oss: feat(worker): add statistics ticking

* oss: internal/proto: define the new RoutingInfo RPC

* oss: internal/server: repository changes for RoutingInfo RPC

* oss: internal/daemon: add RoutingInfo handler to worker service

The new RoutingInfo RPC is used to get information from the worker
that is used to make routing decisions on the controller. It also
handles the initial request from the worker.

* oss: feat(db): server_worker_session_info table

* oss: feat(proto): session info rpc for server coordination service

* oss: feat(server): worker session info request data type

* oss: feat(worker): session info ticker

* oss: feat(handler): server coordination handler for session info

* oss: feat(session): utilize session info request time for session cleanup

* oss: proto: fix some gotags comments

Some of these fields were missing comments, while others had
incorrectly formatted comments.

* oss: worker: send connection status to server

This is required for the correct tracking of orphaned connections

* oss: internal/daemon/worker: add function to wait for Statistics RPC

* oss: internal/daemon/worker: add routing info RPC

The new RoutingInfo RPC replaces part of the Status RPC,
namely the part which is used by the controller and worker
to perform decisions around the establishment of new sessions
and new worker connections.

* oss: internal/daemon/worker: remove unnecessary error check

* oss: internal/daemon/worker: lock access to config and upstreams

The new confLock protects access to the conf value and to the
addressReceivers slice.

* oss: worker: replace Status RPC with RoutingInfo

* oss: worker: deprecate the Status RPC and related types

The Status RPC and related messages have been replaced
by the RoutingInfo/SessionInfo/Statistics RPCs. The controller
will continue to support the Status RPC until two new minor
versions have been released.

* oss: internal/event: add default deny for new worker RPCs

* oss: internal/daemon/worker: allow RPC interval to be set

The new SessionInfo/RoutingInfo/Statistics RPCs run at
long intervals, which make some of our cluster tests take
a long time to complete. This allows their interval to be
configured in tests.

* oss: all: use TestWorkerRPCInterval in slow tests

This should speed up these tests significantly.

* oss: internal/tests/cluster: reset sys eventer in test

---------

Co-authored-by: Damian Debkowski <damian.debkowski@hashicorp.com>
2025-01-09 10:26:37 -08:00
Michael Li 554195f49f test(e2e): Add test for connect http (#5423)
* test(e2e): Add comment to test

* test(e2e): Add test for connect http

* CR
2025-01-09 12:43:21 -05:00
Michael Li 0a54be59b5 chore: Modify tparse check (#5425) 2025-01-09 09:50:18 -05:00
Damian Debkowski dc66aa0556 fix(enos): bump default db version to new required minimum (#5426) 2025-01-08 22:42:08 -08:00
Michael Li 91c060ca44 test(e2e): Add increased retries due to worker status report changes (#5424) 2025-01-08 15:46:37 -05:00
HugoandJohan Brandhorst-Satzkorn dce336500e chore(plugins): Update AWS plugin to v0.5.0 (#5421)
* chore(plugins): Update AWS plugin to v0.5.0

* docs: Update CHANGELOG

* docs: Update CHANGELOG language

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2025-01-08 17:33:33 +00:00
Hugo 346ac58fa3 feat(cmd): Default to azure plugin when performing db migration (#5422) 2025-01-08 17:25:13 +00:00
Timothy Messier 71af25f584 fix(db): Remove begin when assembling migrations (#5148)
When building the set of migrations to run as part of executing the
`database migrate` or `database init`, the migrations are collected and
combined to run within a database transaction. As such the `begin` and
`commit` statements in the migration files should get removed from the
final set of statements that get executed. However, when the migrations
files were updated to include copyright and license headers, this broke
the logic that would strip out the `begin` statement.

While this does not cause any issue with executing the statements in a
single transaction, it does result in noise in the database server's
logs, with log messages like:

    BEGIN WARNING:  25001: there is already a transaction in progress
    BEGIN LOCATION:  BeginTransactionBlock, xact.c:3778

This commit fixes the logic to correctly strip the `begin` for files
that have the header lines.
2025-01-08 10:40:21 -05:00
846c849589 Worker Domain Refactor (#5338)
* feat(server): Refactor LookupWorkerByName to be a test method

* feat(server): Split worker tags table

* refact(worker): Export api and config tags

* refact(server): Return worker id from UpsertWorkerStatus

* refact(server): Create ListWorkerStorageBucketUpdates domain function

* refact(server): Use dedicated HCPb-worker list func

* refact(server): Create ConnectionRoute domain function

* refact(handlers): Move worker selection logic to internal/server package

This commit moves all the logic to select a worker to handle a session
to the internal/server package. Most functions were moved to this
package with no changes, however, there are a couple of notable
exceptions:

- Given that we don't use GRPC errors in repos, all errors were adjusted
  to use the internal/errors package instead.
- StorageBucketFilterCredIdFn is now used to prevent the internal/server
  package from importing internal/storage/plugin, which would cause a
  dep cycle. Callers of SelectSessionWorkers must implement this func
  which is responsible for returning a storage bucket's worker filter as
  well as its associated credential id.
- authorizeSessionWithWorkerFilter now receives an
  internal/server.(*Repository) object when called. This is transparent
  to SelectSessionWorkers callers as it is handled internally.

* feat(server): Add FilteredWithFeatures fn and new server options

* refact(server): create new list and lookup worker queries

* test(server): Add WorkerList unit tests

* feat(server): Implement WorkerList randomness using crypto/rand pkg

* chore(db): add index to server_worker table

* refact(server): prefix test method with Test

* refact(server): rename Downstreamers interface to Graph

* chore(server): unexport and rename method

* chore: add doc string to WorkerAddress (#5420)

---------

Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
Co-authored-by: irenarindos <irena.rindos@gmail.com>
2025-01-08 15:18:03 +00:00
Timothy Messier 5329f926b6 fix(api): Correctly apply BOUNDARY_MAX_RETRIES env var (#5385)
The api.Client was first checking for the environment variable, and then
resetting the max retries to 2, thus overriding the environment variable
value. In addition, the cli would set max retries to zero if the
environment variable was not set. This would mean that by default the
max retries would be zero, and if the environment variable was set, the
max retries would be 2, regardless of the actual value for the
environment variable.

This fixes the order in which the environment variables are read, to
ensure they take precedence.
2025-01-08 10:07:09 -05:00
Michael Li 02fe1b42d3 test(e2e): Extend vault oidc test to authenticate using the OIDC auth method (#5409)
* refact(e2e): Rename file for consistency

* test(e2e): Extend test to authenticate using oidc auth method

* CR: Add checks for account attributes

* CR: Use any instead of interface

* CR: Use %q
2025-01-07 14:04:54 -05:00
Michael Li 5077463aa0 chore: Only use dependabot for internal action updates (#5414) 2025-01-07 13:57:21 -05:00
db03d545bd Docs: fix missing worker registration CLI steps (#5407)
* fixes missing CLI registration steps, adds an additional step for additional workers

* Update website/content/docs/install-boundary/configure-workers.mdx

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

* Apply suggestions from code review

Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>
2025-01-07 11:43:48 -07:00
Johan Brandhorst-Satzkorn 1cbe1ca463 internal/event: fix log processor race (#5401)
The cloud events formatter Process function would call
the signer without protecting it, which was racy with the Rotate
function.
2025-01-07 09:11:52 -08:00
Johan Brandhorst-Satzkorn ae916727e5 Dockerfile: bump alpine version (#5411)
Should hopefully resolve the wget warning
2025-01-07 09:10:45 -08:00
Michael Li ab94d5cf59 chore(e2e): Modify bucket policy to 7 days (#5410) 2025-01-06 17:29:03 -05:00
Johan Brandhorst-Satzkorn a21f0f109a mod: update golang.org/x/net dependency (#5405)
Fixes CVE-2024-45338, GO-2024-3333
2025-01-03 15:33:28 -08:00
David Kanney 3b637e068c docs(CHANGELOG): Add session connection limit fix (#5404) 2025-01-03 13:34:50 -05:00
Johan Brandhorst-Satzkorn 7b30697ddd internal/session: fix race condition in connection cleanup (#5402)
The totalClosed variable was accessed in both the Status and the Run
functions, which may be called from independent goroutines.
2025-01-03 10:28:21 -08:00
Jeanne Franco ff68e41013 Add artifacts manifest (automatically generated) (#4992)
* Add artifacts manifest (automatically generated)

* Add copywrite header
2025-01-03 12:12:46 -05:00
Michael Li 629d7a93ee chore(e2e): Modify gcp label to meet format constraints (#5400)
GCP label constraints include the following:

The value can only contain lowercase letters, numeric characters, underscores and dashes. The value can be at most 63 characters long. International characters are allowed.
2025-01-03 10:47:08 -05:00
hashicorp-tsccr[bot]andhashicorp-tsccr[bot] 47538bddcc Result of tsccr-helper -log-level=info gha update -latest .github/ (#5398)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2025-01-02 11:42:50 -05:00
Michael Li 3d0f667151 chore(e2e): Update vault addresses in AWS scenarios (#5395) 2025-01-02 09:42:23 -05:00
Damian Debkowski 868d7b8a2d test(daemon): remove tests with multihop (#5397) 2024-12-30 12:21:52 -08:00
David Kanney 2342e4b644 fix(target): Assign session connection limit to SessionAuthorization.ConnectionLimit (#5396)
* fix(target): Assign session connection limit to SessionAuthorization.ConnectionLimit

* test(target): Update TestAuthorizeSession & TestAuthorizeSessionTypedCredentials to check session connection limit
2024-12-30 14:16:39 -05:00
Michael Li 157c305753 chore: Install tools if cache restore fails (#5394)
On occasion, the cache restore fails, causing the test pipeline to fail due to not having tparse. This adds a failsafe in the event that there's something wrong with the cache restore.
2024-12-23 14:55:35 -05:00
Damian Debkowski dd1482b5ac test(cluster): check worker status multiple times (#5393) 2024-12-23 11:39:58 -08:00
Johan Brandhorst-Satzkorn 1a6320794e cmd: propagate keyring reading errors (#5360)
Reading a token from the keyring can sometimes fail for reasons
other than the token not being present in the keyring. This PR
introduces a new error used to indicate that the token requested
could not be found in the keyring and propagates errors from the
keyring up to the caller, so that the caller can act on them.

Additionally, this fixes a bug in the client cache where it would
incorrectly assume that a token had been removed from the
keyring, when in fact there was an error reading from the keyring.
2024-12-23 09:21:18 -08:00
Damian Debkowski 98bb4c8c31 test(cluster): split tests between parallel and sequential packages (#5390) 2024-12-20 13:53:37 -08:00
Johan Brandhorst-Satzkorn 1b6b22ef4f internal/daemon/worker: improve runtime and reduce noise (#5387)
TestRotationTicking would previously wait for 5 rotations, which is
pretty slow considering each rotation takes 20 seconds. Reduce
the number to 3, and use require instead of assert to remove
noise during flaky test runs.

This doesn't fix the flakiness of this test, but it should reduce the log spam.
2024-12-20 12:02:22 -08:00
Dan HeathandJohan Brandhorst-Satzkorn 833ddb21ad docs: Update 0.18.x release notes (#5382)
* docs: Update 0.18.x release notes

* docs: Update version numbers

* Apply batch of suggestions from code review

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

* docs: Add issue link and minor edits

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2024-12-20 10:06:03 -07:00
Michael LiandJohan Brandhorst-Satzkorn 6ed077c69e test(e2e): Add test for vault oidc provider (#5384)
* test(e2e): Simplify vault address in docker network

* test(e2e): Add oidc test using vault

* Update enos/modules/docker_vault/main.tf

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2024-12-19 17:06:01 -05:00
Johan Brandhorst-Satzkorn 20f11ab01b Revert "internal/daemon: speed up multi-worker tests (#5370)" (#5386)
Unfortunately, this started causing the enterprise tests to break in
an unexpected way. Reverting to spend some more time testing the changes.
2024-12-19 09:29:48 -08:00
David Kanney 48e0289882 chore: bump boundary-plugin-gcp to latest version (#5381)
* chore: bump boundary-plugin-gcp to latest version

* chore: go mod tidy
2024-12-18 16:45:44 -05:00
Elim Tsiagbey e0eb393665 docs: Add docs for GCP DHC (#5364)
* docs: Add docs for GCP DHC

- Add documentation for GCP dynamic host catalog
- Add changelog for GCP dynamic host catalog
2024-12-18 15:20:19 -05:00