Commit Graph
2411 Commits
Author SHA1 Message Date
Hugo 902ca3cccb fix(genapi): uint64 fields failing to be unmarshalled (#2492)
uint64 fields get marshalled into json by protobuf as strings, so we
have to tell the json parser to look for strings when unmarshalling.
2022-09-26 15:27:28 +01:00
Jeff Mitchell 6116dad2bc Fix incorrect flag name (#2494) 2022-09-25 18:08:05 -05:00
Jeff Mitchell 74a007bfdd Adapt to new nodeenrollment X25519KeyProducer interface (#2491) 2022-09-23 09:14:17 -04:00
Louis Ruch b7684a857a feat(ssh): Use HostId as HostKeyAlias for connect ssh helper (#2490) 2022-09-22 17:51:30 -07:00
Zhihe Li fd0cbbc776 Bump UI commitish (#2489) 2022-09-22 18:22:01 -04:00
Todd d270513b5a Add error printing when cluster listeners and their consumers error. (#2488) 2022-09-22 14:01:59 -07:00
Zhihe Li 8ab3c4c1f4 Bump UI commitish (#2487) 2022-09-22 15:16:35 -04:00
Jaymala 611bf80279 Add infrastructure tags to Enos scenarios (#2486)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-09-22 13:29:25 -04:00
Irena Rindos bd4f5f3801 update worker auth rotate (#2484) 2022-09-22 13:13:31 -04:00
Jamie Finnigan f6532c6cd6 tighten access to /boundary/config.hcl in container images (#2471) 2022-09-21 16:27:58 -07:00
Zhihe Li bbd006db85 Update changelog (#2482) 2022-09-21 16:04:22 -04:00
Louis Ruch b78d83e242 log(vault): Log formatted duration instead of nanoseconds (#2481) 2022-09-21 12:04:29 -07:00
Zhihe Li 423f3be251 Bump UI commitish (#2480) 2022-09-21 09:33:20 -04:00
Dharini Jeeva 8b71307556 add aws region website redirect (#2476)
* add aws region redirect
2022-09-20 12:59:44 -07:00
Johan Brandhorst-SatzkornandTimothy Messier 5dbcda512a Fix enos bats test errors (#2468)
* test(cli): Remove skips in CI for cli tests

* fix(enos): Fix enos bats tests

The tests still sometimes suffer from timing issues,
but I was able to run a successful run (setup, run, destroy)
of the tests from my machine at least once.

There were 2 issues:

- Some tests in groups.bats were hardcoding the default user id
- The default grants for a user in a project were missing
   the permission to connect to a target. We now add this
   explicitly.

Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2022-09-20 14:39:28 -04:00
Timothy Messier 01206eb586 chore(build): Allow for downloading pre-built admin ui assets (#2475)
The admin ui assets are built via a github workflow and published as
github a artifact. The artifact can be downloaded, avoiding the need to
build the assets again locally, and eliminating the need for front-end
build tools like yarn and npm.

This updates the `build-ui` target to use a new script that will attempt
to download the pre-built assets. Note that this script requires that
the `gh` cli is installed since an authenticated request is necessary to
download the workflow artifacts. If the artifact cannot be downloaded
either due to the lack of `gh` or because the artifact cannot be found,
it will fallback to using `git clone` (and will require yarn to build
the assets).

See:
    https://cli.github.com/
    https://docs.github.com/en/rest/actions/artifacts
    https://github.com/actions/upload-artifact/issues/51
2022-09-20 11:14:02 -04:00
Todd 06fd086004 Add health endpoint for worker (#2442)
* Return worker process information in the health endpoint.

Experimental:  The worker_info and returned worker_process_info fields are experimental and can change or be removed without notice.

When a user passes in "worker_info=1" or "worker_info=true" and a worker is running the returned json will be returned with a key named "worker_process_info" which value is a json object with information about the worker process.
2022-09-19 11:24:42 -07:00
Jamie Finnigan 54b3d36946 update Dockerfile to use more recent Alpine 3.13 releases (#2467) 2022-09-19 12:39:59 -04:00
Zhihe Li 309574b694 bump UI commitish (#2470) 2022-09-19 11:08:28 -04:00
Irena Rindos d951e1ebc1 Worker graceful shutdown (#2455)
* add graceful shutdown to worker
2022-09-19 09:59:18 -04:00
Timothy Messier a2ef14283b fix(org): Address bug that prevented deleting an org (#2465)
The schema changes introduced in 0.10.2 introduced a bug where an org
could not be deleted if there was a session for an org scoped user. It
would result in an error like:

    scope.(Service).deleteFromRepo: unable to delete scope: \
        iam.(Repository).DeleteScope: failed for o_VkNy46KwfS: \
        iam.(Repository).delete: db.DoTx: iam.(Repository).delete: \
        db.Delete: insert or update on table "session" violates foreign key constraint "target_fkey": integrity violation: error #1003

A worker around would be to first delete all projects in the org, then
finally delete the org.

This fix adds a regression test to the sqltests and updates several
constraints on the session table to be deferrable. Since the org delete
is a single transaction, this allows all of the necessary resources to
be deleted before attempting to enforce these constrains.

See: https://www.postgresql.org/docs/current/sql-set-constraints.html
Blame: 3a28ab614
2022-09-19 09:47:52 -04:00
Louis Ruch 42696d5da6 enos(smoke): Test brokered credential consumption instead of manually (#2456)
passing private key to boundary connect
2022-09-16 15:41:38 -07:00
Cameron Perera 3753f6d882 website: update host catalog redirects & add new host set redirects (#2466) 2022-09-16 17:05:57 -05:00
Damian Debkowski 546c5dc5be feat: static json credentials (#2423) 2022-09-16 15:00:04 -07:00
Michael Li 8c53d931aa Merge pull request #2425 from hashicorp/moduli-e2e-test-connect
Add "Connect to Target" tests to new end-to-end test suite
2022-09-16 16:12:25 -04:00
Michael Li 21e4b70e27 test(e2e): Add end-to-end tests (connect to first target)
This adds the initial end-to-end tests. These tests validate the admin workflow
of setting up their first target
2022-09-16 15:30:12 -04:00
Michael Li 172381f273 refact(enos): Move modules to its own file
Enos allows module definitions to be in any file. This keeps all of the modules
in one place (and also follows the model used by Vault)
2022-09-16 15:30:12 -04:00
Timothy Messier f19184ba72 Merge pull request #2462 from hashicorp/tmessi-cli-ui-dev
chore(cli): Run bats tests against boundary dev in CI
2022-09-16 15:25:22 -04:00
Johan Brandhorst-SatzkornandYoko Hyakuna 5dc7e7f55c doc: Add link to generated API docs on API page (#2460)
* doc: Add link to generated API docs on API page

This makes it easier to find the generated API docs from the API
description page.

* Update website/content/docs/api-clients/api.mdx

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
2022-09-16 12:02:15 -04:00
Timothy Messier f28bcd4aa7 chore(cli): Run bats tests against boundary dev in CI
Several of these tests are being skipped in the enos
run. This seems to be due to differences in the setup that is performed.
When these tests were run manually, `boundary dev` was used which
performs some setup of resources automatically. However since enos uses
a non-dev controller, a similar setup is performed via the enos modules.

Until the discrepancies between the setup can be investigated, this adds
a separate CI job to run the tests against `boundary dev`. These tests
are all passing, without any being skipped. This test suite can still be
useful even if the enos version is fixed, since this test suite will run
much faster, and therefore identify failures sooner.
2022-09-16 15:54:55 +00:00
Timothy Messier c41e31381d test(cli): Fix session read and cancellation test 2022-09-16 15:54:10 +00:00
Kevin Wang 4f69fcedbb fix(website/Makefile): mount /../internal/gen (#2461) 2022-09-16 11:18:30 -04:00
Irena Rindos 821d8317dc address op state review feedback (#2453)
* address op state review feedback
2022-09-16 09:13:37 -04:00
Louis Ruch c73a13aa3e scheduler: log details when starting scheduler (#2459) 2022-09-15 11:44:45 -07:00
Irena Rindos e588623ebd docs(vault): add Vault worker filter documentation (#2404)
* docs(vault): add Vault worker filter documentation
2022-09-15 13:18:22 -04:00
06370867c7 website: content updates for developer (#2426)
* chore(website/nav-data): sup to badge
```
            "badge": {
              "text": "OSS Only",
              "type": "outlined",
              "color": "neutral"
            }
```

* update previews to render developer UI

* Apply suggestions from code review

* update redirects

Co-authored-by: Kevin Wang <kwangsan@gmail.com>
Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com>
2022-09-15 10:27:10 -04:00
Jeff Mitchell 53b5e532d5 Remove deprecated methods/fields on targets (#2393) 2022-09-15 09:20:08 -04:00
Dharini Jeeva 54cdaaada8 add worker tags redirect (#2447) 2022-09-14 12:48:39 -07:00
Louis Ruch 506fdfa5c3 cli(ssh): Do not print private key if consumed (#2451) 2022-09-14 12:46:34 -07:00
Damian Debkowski 5dfabe5f90 fix: show warning log when token will expire before it can be renewed (#2446) 2022-09-14 09:35:37 -07:00
Jeff Mitchell 37fb9815ce Add session endpoint test for #2448 (#2450) 2022-09-13 20:29:58 -04:00
Yoko Hyakuna fa619b0910 Address reported bugs (#2449) 2022-09-13 19:48:06 -04:00
Timothy Messier 2b994f3005 fix(perms): Properly resolve "only self" for permissions (#2448)
When generating permissions from the grants, if a single grant was
limited to the set of "self" actions, the permission would be marked as
only self, even if additional grants were given for non-self actions.
This would result in the generated permissions being more limiting then
they should be based on the grants. This only impacts the sessions list
endpoint. It would result in users that have been granted access to list
other user's sessions to be unable to see these results in the list
results.
2022-09-13 19:46:52 -04:00
Louis Ruch 50490d71ae chore(targets): Improve help and errors around ssh targets (#2445) 2022-09-13 13:05:36 -07:00
Damian Debkowski 2db6bee3e2 fix: return an error for vault tokens that will expire before the scheduler can run (#2444) 2022-09-13 10:43:49 -07:00
Louis Ruch b908cfb860 chore: prep for next release 2022-09-13 10:16:48 -07:00
Louis Ruch 5812a42ba3 feat(scheduler): set intervals from config (#2443) 2022-09-13 10:01:49 -07:00
Timothy Messier d0a61b29b8 chore: Add missing items to changelog (#2440)
Add items for SIGHUP database reload and performance improvements.
2022-09-13 07:55:39 -04:00
Irena Rindos fc0ead73e6 feat(workers): worker operational state (#2427)
* feat(workers): worker operational state
2022-09-12 16:10:03 -04:00
Hugo f3f0c55d91 Merge pull request #2422 from hashicorp/hugoamvieira-controller-dbswap
If the database url is updated on Boundary's config and then a SIGHUP
triggered, we now connect to the new database, ensure it's OK to use
and use that one going forwards instead.

This allows a controller to be deployed in a more dynamic infrastructure
where, for example, database credentials could change, without having
to restart the controller.

This operation is done atomically to prevent errors and inconsistency. 
A timeout is present so that if the object is swapped after the 
existing one has been looked up it isn't immediately invalidated. 
The timeout is a maximum; a ticker once a second that looks at
stats to determine how many database connections are still in use 
and then closes the driver as soon as none are in use.
2022-09-12 18:05:11 +01:00