Commit Graph
2549 Commits
Author SHA1 Message Date
Pradeep Sekarandprsekar 8b5c8e8b7a chore: Update changelog with bytes up and down changes (#2673)
Co-authored-by: prsekar <pradeep.sekar@hashicorp.com>
2022-12-05 17:21:45 +00:00
Jeff Mitchell 66dc82a7ba Send message on dev mode SIGHUP so it doesn't just appear to have been swallowed 2022-12-02 13:59:37 -05:00
Irena Rindos 5b162a4433 add worker version to network graph (#2672)
* add worker version to network graph
2022-12-02 12:36:10 -05:00
Danielle 601be14c12 move custom response headers to next in changelog (#2667) 2022-12-01 14:01:05 -05:00
Johan Brandhorst-Satzkorn 6d25b35b4e Add KMS rotation/destruction feature to the changelog and docs (#2600)
* Add initial changelog entry

* feat(docs): Add initial stab at docs for KMS rotation/destruction

* fixup! Add initial changelog entry

* Review comments
2022-12-01 13:32:35 -05:00
Danielle 5f8d292ea1 Inject Custom Response Headers By Status (#2587)
* add custom ResponseWriter struct to inject custom response headers based on status code

* docs

* upgrade listenerutil

* fix config tests

* replace all instances of "data:*" with "data:" to reflect changes to listenerutil

* swapping strings.HasPrefix in favor of mux.Handler for ui request matching

* set ui path as const

* add custom response headers to changelog
2022-12-01 13:15:53 -05:00
Hugo 4b03a39958 chore: Update changelog with bytes up and down changes (#2665) 2022-12-01 18:15:08 +00:00
Irena Rindos 834a2a88f7 feat(targets): Addition of egress and ingress worker filters (#2654)
* feat(targets): Addition of egress and ingress worker filters
2022-11-30 15:23:37 -05:00
Louis Ruch aca22cacb9 chore: Update changelog 2022-11-29 13:57:20 -08:00
Haotian 2b84013379 Revert " feat(metric): adds accepted/closed connections counters for controller and worker cluster connections (#2656)" for failing a build test (#2660)
This reverts commit 80f72b8511.
2022-11-29 10:22:53 -08:00
Dan Heath c506107127 Document vault credential library templating (#2635)
* Document credential library injection

* Add caveat about versions < 0.11.1, remove link
2022-11-29 10:41:50 -05:00
Haotian 80f72b8511 feat(metric): adds accepted/closed connections counters for controller and worker cluster connections (#2656)
same contents as PR https://github.com/hashicorp/boundary/pull/2593 but this time actually push to main
2022-11-28 17:35:16 -08:00
Todd 7c2d0692f6 Fix NPE and GetReleaseVersion now includes metadata. (#2657) 2022-11-28 15:10:36 -08:00
Irena Rindos 2e7cf260af Remove Feature tests running in parallel (#2655) 2022-11-28 15:53:32 -05:00
Irena Rindos ffc37d97bf update backoff to match ENT (#2653) 2022-11-28 11:54:20 -05:00
Irena Rindos 400f8d081d update go-version (#2651) 2022-11-28 09:58:57 -05:00
Irena Rindos 6315821c9a Add feature manager (#2633)
* add feature manager
2022-11-28 09:33:38 -05:00
Johan Brandhorst-SatzkornandDan Heath df02501dcc Create new "previous-root" key purpose for root key migrations (#2639) (#2648)
* Update go-kms-wrapping dependency

* Apply changes suggested by Jeff

* Fix listener test

* Add note about config fix to CHANGELOG

* Review comments

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

Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>
2022-11-24 20:07:37 -05:00
58f86936e7 [SPE-6] Boundary vs. other software (#2626)
* [SPE-6] Boundary vs. other software

* Minor edit for word choice

* Update navigation

* Change redundant word in nav

* Fix broken links

* Add anchor link

* Copy edits

* Nest navigation for What is Boundary? section

* Apply batch suggestions from code review

Co-authored-by: Adam Bouhmad <adbouhmad@gmail.com>

* Update intro sentence with new wording

* Split sections out into topics

* changes title of Introduction -> Overview to What is Boundary?

* adds redirects for use-cases and what-is-boundary

Co-authored-by: Adam Bouhmad <adbouhmad@gmail.com>
Co-authored-by: stellarsquall <stellarsquall@protonmail.ch>
2022-11-23 16:18:24 -05:00
Dan Heath 066e184bf6 Fix changelog typos (#2636) 2022-11-21 16:24:28 -05:00
Todd 35e5bcd8e5 Fixing missed error handling when merging from 0.11.1 into main (#2634) 2022-11-18 14:48:09 -08:00
Haotian 96a630905f formatting consistency for 'create function' statements (#2620) 2022-11-18 11:04:34 -08:00
Johan Brandhorst-Satzkorn 8908dccf6d Forward port some release fixes (#2631)
* fix(worker): Verify contents of loaded session (#2629)

* fix(worker): Verify contents of loaded session

Previously, it was possible for an empty private key to be used
when the session had no user or project associated with it.
The new checks guarantee that we will fail gracefully in these
cases.

* Check against len instead of nil

* Add CHANGELOG

* fix(session): Always invoke all parts of session cancel trigger

The session cancelation trigger would not set the key_id to null
appropriately if another one of the fields on the session was
already null, since that case statement would be matched first.
The new structure matches all statements, in case any of them have
special logic (such as in the project case).
2022-11-17 18:21:20 -05:00
Irena Rindos 70e20b5cf5 revert merge llb-multihop-sessions (#2628) 2022-11-17 14:51:29 -05:00
edd323b73a Key Rotation/Destruction (#2477) (#2607)
* Key Rotation/Destruction (#2477)

* fix: Correct kms.CreateKeys comment

This method does not return anything.

* feat(kms): Add new ListKeys method

The new ListKeys method wraps the underlying KMS wrapper,
returning all the keys in the scope specified.

* feat(scopes): Add new scope actions for key management

Adds list-keys, rotate-keys and revoke-keys actions for scopes.

* feat(scopes): Add ListKeys API endpoint

This new endpoint lists all keys in a scope

* feat(api): Add ListKeys to Scopes client

This has to be a custom function because it is a custom action
and doesn't map well to any of the existing templates, or
generalises well in a way that would make it reasonable
to create a new template.

* feat(cli): Add new scopes list-keys command

* add RotateKeys function to the kms repository

* Add Rotate Keys Endpoint to Scopes Api (#2360)

* add rotate keys endpoint

* add tests for RotateKeys endpoint

* remove that one comment I forgot about

* addressing more PR comments

* Add Rotate Keys CLI Command (#2395)

* add cli command and client

* add bats tests

* fix some info text and pr comments

* write a new rotate keys description

* Add Missing DEK Foreign Keys (#2408)

* add missing fks

* mark key as nullable in gorm

* update tests to use a new wrapper with a real key_id

* fix formatting in test and add keys for auth_token test

* replace key values

* revert postgres_40_01_test.go

* style: reformat sql for readability

* refactor: change type of key_id columns to kms_private_id

* Store key_id and scope_id with oplog entries, re-type columns referencing data key version (#2431)

* fix(db): Correct types of data key version referencers

* fix(oplog): Fix missing error handling

* feat(oplog): Store key_id and scope_id with oplog entries

This migration truncates all existing oplog entries, as
migrating existing data would have been complex and
likely unnecessary.

* Update view references

* Always delete oplog entries when dropping keys

* Fix rebase issues

* Fix sql tests

* Add schema for new kms destruction jobs (#2479)

* feat: Add schema for new kms destruction jobs

The schema lets us manage destruction jobs per-table
while providing a guarantee that only one run is running
at a time.

* Apply suggestions from code review

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* Fix table reference and tests

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* update domain, api, and cli to all include key versions in outputs (#2472)

* update domain, api, and cli to all include key versions in outputs

* fix go sum

* add migration to fix immutable error

* fix final test issue as well as make gen issue

* rebase and fix

* address johan pr comments

* make gen, didn't realize comments were included

* update migrations based on new migration 55 file 03

* Move migrations to 56

* feat: Add key version rewrapping function registry (#2478)

The new RegisterTableRewrapFn can be used by a domain
to register a callback to use when rewrapping data in a
specific table name.

* feat(kms): Add scopeId to RewrapFn (#2539)

This makes it much easier for rewrap functions to look up
the correct wrapper and limit the number of rows searched.

* Update Root Cert Proto Definition (#2542)

* update root cert proto definition to properly identify public_key as the table primary key

* add the test fix as well

* Rewrap Functions for Encrypted Tables (#2532)

* add oidc rewrap

* add argon2 config rewrap

* add auth token rewrapping

* add worker auth cert rewrapping

* check the err

* add username password credential rewrapping

* add ssh private key credential rewrapping

* add vault client certificate rewrap function

* add host catalog secret rewrap function

* cleanup a little

* add host vault token rewrap function

* add session credential rewrap function

* add session rewrap function

* add worker auth rewrap function

* update test to include full assert gamut

* add session rewrap function TEST

* bring all tests up to current standards, make more readable, and include full assert gamut

* rework all rewrap functions to utilize scope id

* update comments, queries, sql refs, etc, in response to PR comments

* forgot a comment

* remove hmac updates and fix a couple comments again

* Rewrapping Registered Tables Test (#2555)

* add the registered table test as well as the two missing rewrap functions

* address pr comments, add db r/w conversions, cmp.diff, sql comment, remove (now) faulty immutable test

* Add ability to list key version destruction jobs, recurring jobs and destroying key versions (#2498)

* feat(kms): Add ability to list data key version destruction jobs

* feat(scopes): Add ListKeyVersionDestructionJobs

* feat(cli): Add list-key-version-destruction-jobs

* feat(kms): Add recurring job that performs table rewrapping

The new recurring job runs for each job table with a registered
rewrapping callback. It attempts to become the running run and
start its rewrapping, gracefully handling sudden interruptions
by resuming it's work if it finds evidence of sudden interruption.

* feat(kms): Add recurring job for destroying key versions

The new job monitors the database for data key version destruction
jobs that have finished rewrapping all its data, performing
the final data key version revocation.

* feat(kms): Add DestroyKeyVersion

DestroyKeyVersion immediately destroys a key version
if it is a root key version or a data key version
which encrypts no data. If the data key version
encrypts data which needs to be rewrapped, it
queues an asynchronous job to complete the rewrapping
operation.

* feat(scopes): Add DestroyKeyVersion API endpoint

* feat(cli): Add scopes destroy-key-version CLI command

* Ensure all secret updates include key ID (#2556)

* feat(all): Ensure all secret updates include key ID

When updating a secret, it is paramount that the key ID
is also updated, as it is the only means we have of ensuring
that we only destroy keys once there is no more data
associated with the key.

* Remove fix to session repository for now

This breaks the current private key derivation method

* add new encrypt/decrypt funcs and made necessary proto changes (#2557)

* add new encrypt/decrypt funcs and made necessary proto changes

* address all PR comments

* fix test panic

* add param checking to rewraps

* fix(schema): Correctly organize migrations again

* Review comments part 1

* Review comments part 2

* Review comments part 3

* Store cert private key, encrypt tofu token (#2583)

* fix(session): store cert private key, encrypt tofu token

Previously, we would derive a session certificate private key from
the session key used in each project, and not store the key. We
would also encrypt the tofu token with the database key but not
store a reference to this key in the database.

This change fixes this by replacing our key derivation with a key
generation step, and instead store the generated key, encrypted,
in the database. We also ensure that any new tofu tokens are
encrypted with the same key.

To handle existing sessions, we lazily rewrite the sessions whenever
a user lists them. There is a minor risk that a user could end up
destroying the database key that encrypts the tofu token before
that session has been rewrapped, but this is going to be rare and
temporary.

* feat(session): Allow the random source for secrets to be configured

* Review comments

* Minor fixes

* More minor fixes

* More small fixes

Co-authored-by: Danielle Miu <dani.miu@hashicorp.com>
Co-authored-by: Danielle <29378233+DanielleMiu@users.noreply.github.com>
Co-authored-by: Michael Gaffney <mike@gaffney.cc>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* fix(session): Unset session key ID when scope is deleted

Unsetting the key ID allows the session to live beyond the lifetime of
the scope, while allowing the scope to cascade delete its keys.

* fix(migrations): Rewrite migration 56 tests

These tests can no longer use the normal test helpers
as they try to use the new oplog table structure, so we
have to manually write all the interactions.

* fix(migrations): Rename migration 58 file name

This was the name used in the release branch, update
it to the new migration number.

* fix(e2e): Add some comments and debug to kms tests

* fix(session): Handle empty project and user IDs in read

When a project or user is deleted, the session is automatically
canceled and the respective field on the session is unset.
LookupSession did not handle this case gracefully, and would
error on decryption in this state. Skip decrypting sessions that
do not have either a user or project to avoid this error. The
decrypted values are not used for a canceled session.

* Fix worker test

* Increase test timeout

Co-authored-by: Danielle Miu <dani.miu@hashicorp.com>
Co-authored-by: Danielle <29378233+DanielleMiu@users.noreply.github.com>
Co-authored-by: Michael Gaffney <mike@gaffney.cc>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2022-11-16 18:17:28 -05:00
Irena Rindos 0c51f52222 Merge pull request #2625 from hashicorp/llb-multihop-sessions
Dataplane connections
2022-11-16 16:55:29 -05:00
Irena Rindos 781b03d080 dataplane management (#2624) 2022-11-16 16:22:36 -05:00
Irena Rindos 011a7cf640 Dataplane routing (#2623)
* addition of dataplane routing
2022-11-16 15:34:39 -05:00
Dan Heath 72410cfa97 Update Boundary network requirements (#2609) 2022-11-15 16:50:46 -05:00
Haotian d97d34adc4 refactor(db): applies consistent formatting to 'comment on' statements 2022-11-15 10:26:26 -08:00
Todd 426e6aaa79 Check that the returned resources before referencing them (#2612) 2022-11-14 13:23:56 -08:00
Dan Heath 4509981e5b Fix pull-down placement (#2610) 2022-11-11 15:57:07 -05:00
Jeff MitchellandTodd 0c96c6ff6c Split grace period into multiple config values (#2578) (#2603)
Co-authored-by: Todd <github@quaddi.com>
2022-11-10 13:14:57 -05:00
Johan Brandhorst-Satzkorn a216c701ee Silence events from DB errors (#2601) (#2602)
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.
2022-11-09 17:04:05 -05:00
Michael Li ae28bf7838 test(e2e): Update test to also use a username/password credential in vault (#2595)
* test(e2e): Add test that uses a vault username/password
* refact(e2e): Use go:embed for policy file
2022-11-08 16:45:55 -05:00
Irena Rindos 1e59aaf19b fix host sets command sample command (#2596) 2022-11-07 08:05:16 -05:00
Todd 2a4ce02de6 Disconnect PKI workers from upstreams when they are no longer authorized (#2515) 2022-11-03 14:50:48 -07:00
Michael Li 80cdbc305d test(e2e): Check that an active session ends if the user is deleted (#2588)
Adds a new test to the e2e test suite that checks that an active session ends once the user is deleted.
2022-11-02 20:05:15 -04:00
Michael Li d68d57e884 fix(e2e): Add retry when checking if session is active (#2586)
Observed some flakiness here. A test reported that the session was still "pending". Adding additional retries to ensure that it will eventually go active.
2022-11-01 18:41:56 -04:00
Michael Li 067530cdbf fix(test): Retry websocket connection due to flaky failure (#2584)
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.
2022-11-01 15:05:22 -04:00
Michael Li c20bd8a37e chore(e2e): Update to use latest version of Vault CLI (#2585) 2022-11-01 13:13:00 -04:00
Michael Li a9872621ef Merge pull request #2581 from hashicorp/moduli-e2e-group-test-ICU-6621
test(e2e): Add test that creates a role for a group
2022-10-31 14:28:11 -04:00
Michael Li 48e6156428 test(e2e): Add test that creates a group 2022-10-31 13:29:09 -04:00
Michael Li 02dc9be85f refact(e2e): Create role functions 2022-10-31 10:36:18 -04:00
Michael Li 81bb361148 test(e2e): Add ssh localhost test (#2579)
This adds a test case where a user would do `boundary connect` in one terminal and `ssh localhost` in another to get to the target.
2022-10-28 16:36:18 -04:00
Irena Rindos b26814a3cc move user variables into globals (#2580)
* move user variables into globals
2022-10-28 15:52:06 -04:00
Robin BeckandAshlee M Boyer c20445754e Docs deploy and login updates (#2574)
* replaces all references to Origin URL with Cluster URL

* fixes content headers

* removes reference to Beta

* removes content duplicated by dev-portal page subtitle

* updates style for code snippet copy-paste values

* Update website/content/docs/getting-started/deploy-and-login.mdx

Use h1 header

Co-authored-by: Ashlee M Boyer <43934258+ashleemboyer@users.noreply.github.com>

* fixes headers

Co-authored-by: Ashlee M Boyer <43934258+ashleemboyer@users.noreply.github.com>
2022-10-28 12:49:36 -06:00
Irena Rindos 946dab487e enable recovery user to list targets and sessions (#2576)
* enable recovery user to list targets and sessions
2022-10-28 11:17:33 -04:00
Michael Li 0c18dc0729 Merge pull request #2577 from hashicorp/moduli-e2e-vault-more-tests-ICU-ICU-6501
test(e2e): Add more checks in credential store tests
2022-10-28 09:22:35 -04:00
Michael Li f4a38a7fc9 fix(e2e): Fix authentication 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
2022-10-27 17:40:13 -04:00