Commit Graph
66 Commits
Author SHA1 Message Date
Andrew Gaffney d24ad6c2e2 feat(cli): Support RDP target 2025-09-02 15:13:19 -04:00
582efa2fd2 feat(cli): Support creating/updating a Username-Password-Domain static credential (#1525)
Co-authored-by: Andrew Gaffney <andrew@gaffney.cc>
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2025-09-02 15:12:38 -04:00
dillanb-hashi e0c130a938 test(bats): Added bats tests for generic commands (#5677)
* test(bats): Added bats tests for generic commands
2025-04-24 08:29:49 -07:00
Johan Brandhorst-SatzkornandJeff Mitchell c6f3c375f3 api: remove deprecated grant_scope_id field (#4886)
* api: remove deprecated grant_scope_id field

The grant_scope_id field was deprecated in 0.15.0, so we can remove
it for 0.17.0.

* Fix tests

* Fix more tests

* Remove an option and some related code that stuck around

* Fix bats tests

---------

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2024-06-17 12:09:33 -07:00
Stan Ryzhov 99f7e470f2 test(bats): Verify alias can be created with host id 2024-05-02 10:59:08 -04:00
Stan Ryzhov 60706a49e5 test(bats): Verify invalid inputs for aliases 2024-05-02 10:58:30 -04:00
Todd cb1e9b570b Add CLI flags for creating an alias with a target (#4512)
* Add CLI flags for creating an alias with a target

* Add bats tests
2024-03-15 09:36:34 -07:00
ToddandIrena Rindos c8ca773f9f Add boundary connect alias bats tests (#4441)
* Add boundary connect alias bats tests

Adding tests that validate the authorize-session requests when a host-id is provided when an alias is used, both configured and not configured with a host id already.

Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>
2024-02-29 15:52:27 -08:00
Irena Rindos 0429ac678f fix(bats): use different target name in alias tests (#4430) 2024-02-29 15:52:27 -08:00
Irena Rindos ba21e076bb cli(aliases): Support aliases for connect and targets in the CLI (#4356)
* cli(aliases): Support aliases for boundary connect and boundary targets CLI
2024-02-29 15:52:27 -08:00
Michael Milton 2e69d59dd2 feat(billing): Add cli subcommand for monthly active user counts 2024-02-23 15:44:10 +00:00
f5dd457b34 Multiple grant scope IDs (#4251)
Co-authored-by: Timothy Messier <tim.messier@gmail.com>
Co-authored-by: Todd <github@quaddi.com>
2024-01-23 14:33:09 -05:00
Michael Li 4f262e7de5 test(bats): Use correct attribute for the test (#4033) 2023-11-10 16:45:19 -05:00
dani c89777de41 Expose Valid Principals for Vault SSH Signed Certs (#3791)
* allow additional valid principals when creating vault ssh signed cert cred lib

* add additional_valid_principals field to credential libraries documentation page
2023-10-24 12:44:51 -04:00
Michael Li e089aa219d test(bats): Add list tests for other resource types (#3869) 2023-10-20 12:09:32 -04:00
Michael Li 7f596bafa9 test(bats): Fix grant due to deprecation (#3853) 2023-10-17 13:42:11 -04:00
Michael Li dc912e2a86 test: Update tests to account for deprecated features in 0.14.0 (#3776)
* chore: Fix comment typo

* test(e2e): Update to use new credential library type

* test(e2e): Update to use new field name

* test(bats): Remove tests that use deprecated subcommand

* chore: Update to 0.14.0

* test(credentiallibraries): Update to use new credential library type

* doc: Add deprecation notices for 0.14.0

* fixup! doc: Add deprecation notices for 0.14.0
2023-09-26 10:33:53 -04:00
hashicorp-copywrite[bot]andJohan Brandhorst-Satzkorn 29da0bcb92 [COMPLIANCE] License changes (#3567)
* Adding explicit MPL license for sub-package.

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Adding explicit MPL license for sub-package

This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository.

* Updating the license from MPL to Business Source License

Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at https://hashi.co/bsl-blog, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl.

* Update copyright file headers to BUS-1.1

* Rerun make gen

This will pick up the last of the license changes

* Revert "Rerun make gen"

This reverts commit dbe0968bffd92745d8663c6940debae098395a6b.

* Remove copywrite from generation script

The current version of copywrite is not sophisticated enough
to only apply the copywrite changes to certain subdirectories,
so to avoid accidentally relicensing our api and sdk modules,
we will stop running the copywrite script until such time
that it can do the right thing.

* License protobuf API as MPL

The protobuf API files are used to generate the SDK,
since we want the SDK to be MPL, the protobuf files
must also be MPL. This extends to all protobuf files
whose sources end up in the SDK directory, including:

- internal/proto/controller/api
- internal/proto/controller/custom_options
- internal/proto/plugin

It also includes the generated service directory in
internal/gen/controller/api/services, since they are
generated from the protobuf sources used for the SDK.

* Change website license file name

This makes the naming scheme consistent with the rest
of the repository.

* Add note on licensing to README

* Set copywrite license to BUSL

* Revert "Add note on licensing to README"

This reverts commit 4d865a91a7a4f11605f0dc4609355d7e3c3cfffe.

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2023-08-11 10:31:53 -07:00
Jim 723dbdfedf fix (boundary dev): make the LDAP auth method active-public (#3344) 2023-06-20 13:56:20 -04:00
Timothy Messier cdf18b6369 test(cli/targets): Add test case for default client port 2023-05-31 12:18:24 +00:00
Danielle Miu b4137a14c3 update test.sh to use loopback flag 2023-05-31 12:18:24 +00:00
Elim Tsiagbey b2376356dd Bats Tests: Target Host Sources (#3107)
* Bats Tests: Target Host Sources

- Add bats test coverage for adding a Host Source to a Target
- Create `target_host_sources.bash` file with helper functions for bats test file

## Considerations
Created new resources like a target & host catalog instead of using already created resources because the changes could affect existing tests and it made it easy to change the newly created resources
2023-03-24 17:38:39 -04:00
Damian Debkowski bbbd6b1e51 backport 0.12.1 release (#3079)
* chore: update version

* fix(tests): break out of infinite loop for bats tests

* chore: update changelog

* fix: make-gen-delta check
2023-03-14 10:19:11 -07:00
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Timothy Messier 718e183a1e fix(credentiallibraries): Correctly populate attrs for vault-generic (#2901) 2023-02-03 14:21:08 -05:00
Timothy Messier f9a2f44f5b test(cli): Add tests for vault-ssh-certificate credential library
This adds tests for updating specific fields of the credential library.
2023-02-03 17:00:34 +00:00
Timothy Messier e66ea15fef fix(cli): Status code on api error
When using the json output of the cli (`-format=json`), a successful
call to the controller API would place the HTTP status code in the JSON
as `status_code`. However, if there was an error from the API the status
code would be placed in the JSON as `status`. In order to be consistent,
this adds a `status_code` field to the error response case. For
backwards compatibility it still populates `status` in the error case.

This inconsistency was missed partially due to a bug in the CLI tests.
The assertion on status code was not valid and would always be
successful. Thus this also fixes the assertions and tests.
2023-02-03 17:00:34 +00:00
Timothy Messier 89a55632ba feat(cli): Add vault ssh certificate credential library 2023-02-02 17:43:17 +00:00
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