Commit Graph
38 Commits
Author SHA1 Message Date
Damian Debkowski 1d3930a711 feat(handlers): Support address field on a Target 2023-01-09 15:39:55 +00:00
Michael Li 5b0ff4f058 test(e2e): Port "credential stores deletion check" from bats test to e2e test suite
The "can not read deleted $NEW_STORE static store" bats test was demonstrating flaky behavior where it would fail due to the credential store read still returning something valid. This check has been moved to an e2e test in order to add some retry logic to the check.
2022-10-20 13:47:46 -04:00
Todd c2d02966c6 When checking authorized actions, read the worker we created for the test. (#2548) 2022-10-19 11:02:09 -07:00
Michael Li 16e90ddd35 fix(bats): Fix flakiness in sessions.bats tests (#2537)
The sessions.bats tests were seeing some flaky behavior when listing sessions but not getting the expected amount back. This is due to the connect_nc command that is currently used, which will immediately set the session to be "canceled" once it returns. This can cause subsequent operations to  get unexpected results (sometimes, listing sessions would return an empty list if the created sessions go to a "terminated" state).
2022-10-17 10:27:35 -04:00
Todd 1437d5452d Filter out null named workers when looking up the worker id in bats (#2531) 2022-10-11 14:01:20 -07:00
Todd c9d902ebd0 Add worker create, list, read, update, and delete cli ui tests. (#2384) 2022-10-10 12:37:17 -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
Damian Debkowski 546c5dc5be feat: static json credentials (#2423) 2022-09-16 15:00:04 -07: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
Jeff Mitchell 53b5e532d5 Remove deprecated methods/fields on targets (#2393) 2022-09-15 09:20:08 -04:00
Jeff Mitchell 3f5d265cfd Update bats tests with new password paradigm 2022-08-05 19:52:04 -04:00
Jeff Mitchell d92cbac37d Update enos/bats with changes 2022-08-05 18:17:07 -04:00
9169c6bacb [QTI-220] Add infrastructure integration testing (#2282)
* [QTI-275] Add infrastructure integration testing

On pull requests that originate from branches of the `hashicorp/boundary`
repo, we now conditionally dispatch infrastructure integration tests using
the Enos framework. The `integration` Enos scenario includes two `builder`
variants which allow developers or CI to deploy a Boundary cluster in AWS
using either a local `boundary` install bundle or that which is produced
in the `build` workflow for CRT. The `test` variants determine which type
of infrastructure integration test to run. At present those options are
`cli_ui` (Bats CLI tests) or `smoke` (creates target instances and a
target host catalog and verifies that `boundary` works).

In addition to the new workflow and quality scenarios, we simplified the
some `build` workflow steps and added Go module caching to speed up the
build pipeline.

See the [enos/README.md](https://github.com/hashicorp/boundary/blob/main/enos/README.md)
for a detailed explanation on how to configure and execute Enos scenarios
from your machine.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Rebecca Willett <rwillett@hashicorp.com>
Co-authored-by: Josh Branch <jbrand@hashicorp.com>
2022-07-28 14:48:51 -06:00
Louis RuchandJeff Mitchell a17e973712 feat(credentials): Refactor credential purposes (#2260)
* feat(credentials): Refactor credential purposes

 * Application credentials have been refactored to Brokered credentials
 * Egress credentials have been refactored to Injected Application
credentials

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2022-07-19 15:16:24 -07:00
Louis Ruch 00dfea1244 feat(target): Add support for static credential as target credential sources 2022-06-14 13:01:17 -07:00
Louis Ruch 58d546cdd4 feat(credential): Add static credential store and username_password credential 2022-06-14 13:01:17 -07:00
Jim 769416c2ff refactor (controller): Use a grpc server for the grpc-gateway (#1576)
* refactor (controller): Use a grpc server for the grpc-gateway

This starts a grpc server for the grpc-gateway.  The new gateway
server uses an in-memory listener which also supports "dialing", so
the http proxy can connect to the in-memory listener.

This change allows us to use all grpc server features and was in part
motivated by a need for an interceptor of inbound requests.  With that
said, having a "proper" grpc server for the gateway will provide a lot
more flexibility and capabilities moving forward.

The request context will still be verified via middleware in the
http proxy (see wrapHandlerWithCommonFuncs).  This verified context
will be serialized into a protobuf and sent along to the grpc-gateway
via metadata where an interceptor will add the verified request
info to the request's context (see requestCtxInterceptor).  The
interceptor will verify the serialized request info via a shared ticket
with it's companion in-memory http proxy.  FYI: the ticket is simply
random base62 string (see db.NewPrivateId).

This change also necessitated a minor change to services.  We need to
return an empty response instead of nil, nil when there are no errors
and the response is empty.

* refactor (handlers): Rename gRPC Gateway filter

Originally, this was called an OutgoingInterceptor, which is an
unfortunate name since it's not an interceptor.  Now that we're
refactoring the gateway stuff and have proper interceptors, renaming
this should remove ambiguity

* refactor: Rework how 204 with empty msg is handled

Recent changes to grpc gateway has necessitated a change to how
204s are handled by the gateway

* tests (bats): Check status codes for delete operations
2021-10-19 17:21:41 -04:00
Jeff Mitchell 7ee8ddba6a True up some spelling 2021-05-14 16:26:25 -04:00
Jim c7bac26e1a Fix a broken auth token test and support conditional tests for "versioned" releases. (#1195) 2021-05-04 10:25:11 -04:00
Jeff Mitchell e6af51943d Add read:self and delete:self to auth tokens and add logout command (#1162) 2021-04-23 13:45:08 -04:00
Jeff Mitchell c63529e020 Fix WithKeyId after recent PR (#978)
Fixing the session passing around its key ID (which had previously been
blank) exposed another issue which was caught during bats tests:
WithKeyId statements using the wrong key, which prior to now had been
ignored because the argument was empty, resulting in an ineffective
option. This fixes those situations.

It also updates a bats test that didn't get updated in the CLI return
status PR.
2021-03-04 20:45:27 -05:00
Jeff Mitchell 9649a19d23 Update CLI error codes to be consistent with connect (#976) 2021-03-04 20:05:17 -05:00
Jeff Mitchell 72aa110f72 CLI JSON updates (#962)
See Changelog for details.
2021-02-25 12:43:17 -05:00
Jeff Mitchell 341e7aff0d CLI Generation (#953) 2021-02-23 19:06:39 -05:00
Jeff Mitchell 22462cdd84 Add read:self and cancel:self to sessions; add dev unpriv user (#923)
* Sessions support for read:self and cancel:self permissions. This is automatic with fallback; no API change is needed.

* Strips out values from listing if only self actions are allowed on the resource and the user ID is different. This prevents a default ACL of id=*;type=session;actions=read:self,cancel:self from causing all values to be visible when listing.

* Adds an unprivileged user to development/testing instances. This user has only default permissions plus the ability to authorize sessions in the default target.
2021-02-11 13:14:18 -05:00
Jeff Malnick 10a5f1b832 test: add tests for authorized-action (#893) 2021-01-29 08:04:46 -08:00
Jeff Malnick 76a891cfe2 tests: remove testing of revision output for now (#667) 2020-10-14 07:29:31 -07:00
Jeff Malnick e08ab98a2b tests: add CLI tests for version output (#664) 2020-10-13 12:34:38 -07:00
Jeff Malnick dfa94c7990 tests: allow overriding auth variables in CLI tests (#647)
* tests: ensure default user can connect to default target and ensure created target has intended host sets

* docs: update readme for CLI tests with how to run against arbitrary clusters

* feat: override auth variables in CLI tests
2020-10-13 07:41:32 -07:00
Jeff Malnick 7f48e2edc6 tests: ensure default user can connect to default target and ensure created target has intended host sets (#646) 2020-10-13 07:41:14 -07:00
Jeff Malnick 3c1670c0d0 tests: add scopes CLI tests (#645) 2020-10-12 21:15:49 -07:00
Jeff Malnick 70e696a446 tests: add roles CLI tests (#644) 2020-10-12 20:57:57 -07:00
Jeff Malnick cad8949ac8 tests: add host sets CLI tests (#643) 2020-10-12 17:00:34 -07:00
Jeff Malnick bee1412785 tests: add host catalog CLI tests (#639) 2020-10-12 16:44:45 -07:00
Jeff Malnick 0f1fbea8f7 tests: add hosts CLI tests (#638) 2020-10-12 14:56:23 -07:00
Jeff Malnick c4c1e108b0 test: add groups resource CLI tests (#633) 2020-10-12 14:40:32 -07:00
Jeff Malnick 90e1dbe444 tests: add bats tests for testing CLI on arbitrary Boundary deployments (#614) 2020-10-12 10:26:26 -07:00