Commit Graph
2616 Commits
Author SHA1 Message Date
Damian DebkowskiandHugo b3ba9c5b4d test(enos): new e2e test for target address (#2732)
Co-authored-by: Hugo <hugoamvieira@users.noreply.github.com>
2023-01-09 15:39:55 +00:00
Hugo Vieira f85da3ee2b feat(cmd): Create target using address on boundary dev / database init
Creates a target using an address for boundary dev and when first
init-ing boundary (boundary database init).

It also makes this newly created target the default one
(ttcp_1234567890). The target using host sources is now a secondary
target (ttcp_0987654321).
2023-01-09 15:39:55 +00:00
Damian Debkowski 1d3930a711 feat(handlers): Support address field on a Target 2023-01-09 15:39:55 +00:00
Damian Debkowski bca7c371d8 feat(session): Support connecting to an address associated to a Target 2023-01-09 15:39:55 +00:00
Damian Debkowski 760671f223 feat(target): Support connecting to an address associated to a Target 2023-01-09 15:39:55 +00:00
Damian Debkowski 0dbe18e453 fix(db): remove migration test 59_01
This test uses the target domain repository code to test the ingress
& egress worker filter. With our changes we have updated the target
domain repository logic to fetch the target address. When this migration
test is invoked, the target_address table does not exist and the domain
code will always return an error making this test invalid.
2023-01-09 15:39:55 +00:00
Damian Debkowski 3dd4b1c63d feat(db): Support a direct address association to a Target 2023-01-09 15:39:55 +00:00
Hugo Vieira 1f9063e042 docs(target): Introduce direct address targets and explain tradeoffs 2023-01-09 15:39:55 +00:00
Hugo Vieira 803cd278ae fix(cmd): boundary connect SSH depending on a host id for ssh aliasing
Targets are not guaranteed to have Host Ids anymore, so we now use
Target Id when a Host Id is not present.
2023-01-09 15:39:55 +00:00
Hugo Vieira c82d2efb14 feat(cli): Implement address flag for boundary targets create/update
This commit adds CLI support for addresses to be attached directly to a
Target, for all current types of Target (ssh and tcp).

It also clarifies the relevant documentation regarding the autogen of
API option functionality.
2023-01-09 15:39:55 +00:00
Johan Brandhorst-SatzkornandJeff Mitchell 61c90c5623 Add grant parsing fuzz test (#2534)
* testing(perms): Add Parse fuzz test

I ran this for a few minutes and it didn't discover anything catastrophic.

* Add roundtrip tests

* Fix invalid unicode parsing, empty output fields

* Do the unicode conversion once on input

* Remove incorrect fix for empty output fields

* Allow empty output_fields

This is the same behavior as output_fields=,

* Add tests back, make JSON behaviour consistent

* Rework the output fields mechanism to fix some bugs such as properly handling no fields

* Change signature of Fields

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2023-01-06 18:27:19 -05:00
Irena Rindos b7f0f455db Add options for directly connected worker (#2762) 2023-01-06 17:34:43 -05:00
Johan Brandhorst-Satzkorn ef6f94f496 chore: Remove unused CI job (#2764) 2023-01-06 14:45:02 -05:00
Irena Rindos c80d7eae65 use product version from file if env var not set (#2763) 2023-01-06 12:34:29 -05:00
Jeff Mitchell b286060ea8 Fix string regression in attribute parsing (#2759)
In #2721, the ability for key-only values was added via using a
wrapperspb.StringValue that could be null. This introduced a bug because
originally the default case for `-attr` was to get the string value but
instead it used the incoming value as-is to allow for nulls; the null
check was moved up later but the original behavior was not restored. As
a result, non-explicitly-quoted strings carried through the
wrapperspb.StringValue, resulting in a map for the value in JSON instead
of a string.

This also fixes the ability to set explicitly quoted strings.
2023-01-05 13:25:59 -05:00
Irena Rindos 9135cc7668 In absence of ingress filter, use directly connected worker (#2757)
* directly connected ingress filtering
2023-01-05 12:09:31 -05:00
Irena Rindos 400f13a7e8 Revert "fix milestone check" (#2758)
This reverts commit a283e8be5e8edfa843a7dfc838d4294644841d78.
2023-01-05 10:39:06 -05:00
Irena Rindos 078f5e9328 Fix failing attribute flag test (#2755) 2023-01-04 14:32:12 -05:00
Jeff Mitchell 9001642099 Use non-deprecated v3 checkout runner in milestone check (#2754)
Move milestone-check.json to the right place
2023-01-04 14:27:26 -05:00
Jeff Mitchell 098248be18 Add the ability for CLI map values to contain keys only, which map to JSON nulls (#2721) 2023-01-04 12:44:11 -05:00
Irena Rindos 24bbf57a19 AuthorizeConnection with filters (#2734)
* AuthorizeConnection with filters
2023-01-04 11:24:09 -05:00
Irena Rindos 99cf985649 fix milestone check (#2753) 2023-01-04 11:07:22 -05:00
Jeff MitchellandJohan Brandhorst-Satzkorn ee7bf3cde6 Add check to ensure milestone (#2747)
* Add check to ensure milestone

Stolen from https://github.com/hashicorp/vault/pull/18406

* Update .github/workflows/milestone-checker.yml

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

* Pin grafana github actions ref

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2023-01-03 22:37:34 -05:00
Irena Rindos d5fed10918 fix no path info message (#2751) 2023-01-03 15:00:45 -05:00
Carlos Alcaide Corvo 276afa029f Bump UI version (#2750) 2023-01-03 10:15:54 -08:00
Dan Heath a026e6e70e docs: Fix typo in Use Cases topic (#2746) 2023-01-03 12:15:20 -05:00
Irena Rindos 7db9fc59ce Expose State() *structpb.Struct interface through the metric connection trackers 2022-12-23 08:14:58 -05:00
Michael Li fdf3318f72 test(e2e): Add tests for bytes_up/bytes_down (#2740)
* refact(e2e): Create env files for consistency

* refact(e2e): Addmethod for waiting for session

* test(e2e): Add bytes up/down test

* fix(e2e): Fix require.Equal statements to have the correct order

* fix(e2e): Fix loop variable
2022-12-22 11:11:03 -05:00
Irena Rindos 895aecb58c Do not emit error on auth not found (#2737) 2022-12-22 08:07:02 -05:00
Michael Li ff8f1be0a1 test(e2e): Add test for when an incorrect tag is used in a dynamic host catalog (#2731)
* refact(e2e): Move Dynamic Host Catalog env to its own file

This keeps each scenario consistent (an env_test.go file in each directory)

* refact(e2e): Update to use type casting

* refact(e2e): Rename existing dynamic host catalog test

* test(e2e): Add test for an empty dynamic host catalog

This test verifies that you fail to connect to a target with an empty host set (in a dynamic host catalog)

* fix(e2e): Update return statement since we know err is nil

* fix(e2e): Add ok checks in type assertions
2022-12-20 13:53:59 -05:00
Jim 1c9ca14a8e fix (db): Improve error handling for commit errors. (#2728)
We were not capturing the errors which happen on commit.  We've changed
to a multierror so we should get the commit error and any subsequent
rollback errors in the same txn.
2022-12-20 07:41:31 -05:00
Dan Heath e2ac9e9f27 docs: Add HCP link to navigation (#2722)
* docs: Add HCP link to navigation

* Add trailing slash

* Use relative path instead of absolute

* Change back to absolute link

* Change link to cloud.hashicorp

* Update name of product
2022-12-19 15:03:59 -05:00
Ryan Cragun 23f1cdea27 enos: make the local build target configurable (#2313)
This makes the `make` build target that is used for local builder
variant configurable. This will allow us to utilize the local builder
variant in downstreams that might use different targets for their build.

* Make the local build target configurable
* Allow cross compiling `linux/amd64` on different platforms.
2022-12-19 14:35:10 -05:00
Michael Li 74f7ce93bc chore(e2e): Update to use Vault 1.12.2 (#2726) 2022-12-19 14:29:25 -05:00
Michael Li 44fd85c751 fix(kms/test): Fix flake (#2723)
There was some flakiness observed in this test, where keyCount was reported to be 21. To prevent any potential conflicts, we are making the sub-tests not run in parallel.
2022-12-16 12:16:17 -05:00
Michael Li 8bd883a37d test(e2e): Add tests to validate that session ends after target is deleted (#2709)
* test(e2e): Add more "session end" tests

These tests validate that the session ends when the respective project or target is deleted. It also ensures that the session can still be read after the deletion of the corresponding item.

* Removing test from PR due to bug

This test found a bug that will be resolved in the future. Taking this test out of the PR and will add it once the bug is fixed.
2022-12-15 15:49:18 -05:00
Michael Li 26a85ef61b chore(e2e): Better output formatting (#2719)
Updating the `go test` command to include a table summary of test results at the end. This is the same command used by unit tests.
2022-12-15 14:57:24 -05:00
Jeff Mitchell 5353725278 Merge duplicated attr/secret/kv flag handling into one function (#2720) 2022-12-15 13:01:57 -05:00
Michael Li 1596b02e53 test(e2e): Add database migration test (#2627)
* test(e2e): Add database migration test

* chore(enos): Add enos scenario for migration test

* chore(enos): Update go test command to use count option

* doc(e2e): Update readme with migration test details

* Fix: Typo

* CR: Use different library

* CR: Add additional context in comment

* CR: Move some code from test into functions

* doc(e2e): Add instructions to more easily retrieve environment variables

* refact(e2e): Create some more methods to increase test readability
2022-12-13 17:00:50 -05:00
Dan Heath 49909a331c docs: Delete roadmap topic (#2707)
* docs: Delete roadmap topic

* Remove topic from navigation

* Add redirect

* Fix redirect
2022-12-13 14:55:13 -05:00
Irena Rindos 5c73e43912 revert 2712 (#2713) 2022-12-13 14:25:40 -05:00
Irena Rindos a135127524 Move dialingListener setAddresses 2022-12-13 13:29:14 -05:00
Mike Baum cc42c51e5e [QT-396] Ensure oss enos ci bootstrap workflow only runs in the oss repo (#2711) 2022-12-13 13:06:18 -05:00
Danielle 46037cf85a Add Staticcheck to Build Pipeline (#2421)
Run staticcheck linters on pull requests
2022-12-13 12:07:18 -05:00
Jim 38b12394fd refactor (kms): add GetWrapperer for RewrapFn parameter (#2701)
* refactor (kms): add GetWrapperer for RewrapFn parameter

* tests (kms): add MockWrapper and MockGetWrapperer

Make it a bit easier to write unhappy path tests which depend on
a Wrapper or GetWrapperer
2022-12-13 05:38:14 -05:00
Irena Rindos 173e1587d0 Append initial worker upstreams if current upstreams are unresponsive (#2698)
* Append initial worker upstreams if current upstreams are unresponsive
2022-12-12 13:48:28 -05:00
Mike Baum 24c3d6824d [QT-396] Add Enos CI bootstrapping scenarios (#2621)
* Add Enos CI bootstrapping scenarios
* Add GitHub Actions workflow for CI bootstrapping
* Add service quotas limit increase request to Enos CI bootstrapping
2022-12-12 13:48:10 -05:00
Todd 7a6983c463 Fix wrapped reverse grpc listener (#2702) 2022-12-12 10:27:31 -08:00
Haotian 340cfb0d88 refactor(metric): adds filter function to collector init method (#2695) 2022-12-12 09:12:33 -08:00
Johan Brandhorst-Satzkorn 240278cbf1 fix(docs): Use "root" to reference the root key (#2700)
The "root" identifier is how we identify the root key in configuration,
so it is the phrase we should use in this documentation.
2022-12-12 11:24:58 -05:00