Commit Graph
2724 Commits
Author SHA1 Message Date
Johan Brandhorst-Satzkorn cf412b95a2 fix: Support streaming HTTP responses (#2956)
* all: Upgrade listenerutil dependency

The new listenerutil implements http.Flusher, which is necessary
for streaming responses from the grpc-gateway to work.

* daemon/controller: Remove newline delimiter in streaming responses

The default gRPC-Gateway HTTPBody marshaler uses newlines
as a delimiter. This introduces newlines in our streamed responses.
Wrapping the default marshaler lets us define a nil delimiter, which
ensures our streaming responses are unaffected by the server side
chunking.
2023-02-13 14:56:53 -05:00
Michael Li bb6d1cad58 chore(enos): Reset status on job retry (#2954) 2023-02-13 14:00:23 -05:00
Michael Li 96918f0ab6 test(e2e/migration): Add additional resources to database before migrating (#2948) 2023-02-13 10:36:05 -05:00
Mark Collao 115b8fd5cb fix: update sec-scanner sha 2023-02-10 21:16:41 -06:00
Todd 1e89be1b1a Downstream worker connections are tracked by worker id (#2949)
When possible downstream workers will include their worker id information in
the connections they establish with the upstream using the nodeenrollment
library.  The tracking listener now tracks connections that are connected in
this same way instead of just connections of type *tls.Conn.
2023-02-10 15:27:42 -08:00
Mark Collao 5e3244a2e5 add security-scan workflow (#2945)
* add security-scan workflow

* remove uneeded branch; adopt .go-version

* fix bad yaml

* fix random newlines

* add copy
2023-02-10 11:12:56 -06:00
Johan Brandhorst-Satzkorn 4146c0c55d Upgrade Go version to 1.20 (#2898)
* chore: Upgrade Go version

* fix: Upgrade golangci-lint to support 1.20

* fix: Don't use t.SetEnv in parallel tests

This is a panic in Go 1.20 and it sounds like a recipe
for distaster in general.
2023-02-10 11:16:03 -05:00
Michael Li 9dcf605251 chore: Add slack notifications when e2e or bats tests fail (#2946) 2023-02-10 09:27:26 -05:00
Michael Li 62e7335c54 chore: Update deprecated set-output command (#2879)
GitHub is deprecating `set-output`. Updating these commands to their new recommended approach.
2023-02-09 17:08:40 -05:00
claire labry d611ce8fd6 add changelog update for vendor label for linux packaging (#2921) 2023-02-09 15:46:09 -06:00
Jeff Mitchell d15af1d5f3 Remove incorrect assertion that public_addr can be a go-sockaddr template 2023-02-09 14:19:06 -05:00
Mike Baum 0dc140045a [QT-400] Fix doormat hc-service-uri for ci bootstrap ci doormat role (#2944) 2023-02-09 11:23:52 -05:00
Todd f7030513c1 Update documentation to encourage using "hcp_boundary_cluster_id" (#2940) 2023-02-08 13:38:13 -08:00
Irena Rindos ffd59fa87a chore: update sdk/api deps (#2938)
* chore: update sdk/api deps
2023-02-08 15:23:25 -05:00
Michael Li fcddd972bf test(e2e): Add test for boundary version (#2933)
During testing, there was an issue observed where some additional characters were added to the version output. This test validates that output.
2023-02-08 14:03:02 -05:00
Robin Beck d7b2239bb8 adds cve link (#2934) 2023-02-08 11:45:07 -07:00
3dce39decf docs: Create 0.12.0 release notes (#2926)
* docs: Create 0.12.0 release notes

* docs: add job run table enhancement

* Update website/content/docs/release-notes/v0_12_0.mdx

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

* Apply batch of suggestions from code review

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

* Update website/content/docs/release-notes/v0_12_0.mdx

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

* docs: adding HCP content

* Update website/content/docs/release-notes/v0_12_0.mdx

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

* docs: fix typo

---------

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
2023-02-07 17:37:27 -05:00
Michael Li d1429a40df chore(enos): Remove bats test from running in enos (#2929)
* chore(enos): Remove bats tests from enos

* chore(enos): Update cache name to match vault version
2023-02-07 16:30:38 -05:00
Eng Zer Jun 6403b0f389 test: use t.TempDir to create temporary test directory (#2922)
This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests [complete.

Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-02-07 16:23:30 -05:00
Mike Baum 9116755a9c [QT-400] Update ci boundary-enterprise hc-service-uri to include the schedule workflow trigger (#2925) 2023-02-07 14:00:51 -05:00
Michael Li 8ad861f426 test(e2e): Update migration test to use vault docker container (#2909)
* fix(enos): Make sure enos reports test as failure

After updating this command to save off the output from running `go test`, enos would not report when tests failed. This was due to the extra pipe hiding the exit status of the prior commands. Adding this option should return the status of the last command to exit with a non-zero status.

* doc(e2e): Fix comments

* refact(e2e): Update AuthenticateCli to accept auth method id

* refact(e2e/migration): Use docker to set up vault instead of enos

* refact(e2e/migration): Adjust where environment variables are set
2023-02-07 14:00:05 -05:00
Damian Debkowski cabe362534 fix(handler): return targetId as hostId for cli edge case support (#2920) 2023-02-07 10:14:01 -08:00
Haotian f88547bbf5 fix(cli): update plural resource mentions in generated help texts (#2918) 2023-02-07 09:28:18 -08:00
eea5e80fa2 Update documentation with new authenticate usage on the CLI (#2865)
* docs: update deploy-and-login getting started guide with new authenticate usage

* docs: update api-clients/cli.mdx to remove login-name flag when using authenticate

* docs: update common-workflows/manage-users-groups.mdx to remove login-name flag when using authenticate

* docs: update common-workflows/workflow-ssh-proxycommand.mdx with new short form usage of authenticate command when using the primary auth method in the global scope

* docs: update oss/installing/no-gen-resources.mdx to remove login-name usage in authenticate command

* docs: update oss/installing/run-and-login.mdx with short form usage of boundary authenticate

* docs: fix tabs

* docs: fix numbering

* Apply batch of suggestions from code review

Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

* docs: fix code blocks

* fixes code blocks

---------

Co-authored-by: Dan Heath <76443935+Dan-Heath@users.noreply.github.com>
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>
Co-authored-by: stellarsquall <stellarsquall@protonmail.ch>
2023-02-07 10:40:31 -05:00
Jeff Mitchell 1e9057d8a3 Update KMS references 2023-02-06 18:23:54 -05:00
Dan Heath 0a28dab9d0 docs: Add JSON credentials blob example (#2915) 2023-02-06 12:37:38 -05:00
Damian Debkowski 84b410974b fix(handlers): return error when updating json cred w/ empty obj (#2903)
* fix(handlers): return error when updating json cred w/ empty obj

* chore(handlers): split cond stmt & refactor func name
2023-02-06 08:20:12 -08:00
Timothy Messier e25b0e7888 fix(credentiallibraries): Fallback logic to support 0.11.x cli (#2910) 2023-02-06 11:00:34 -05:00
Cameron Perera 42858c4c0d chore: bump ui commit (#2913) 2023-02-06 09:40:29 -06:00
Johan Brandhorst-Satzkorn 48e4fcce25 fix: remove file number dependency from test
This was failing because of the added comments.
This isn't a crucial part of the test, so remove it.
2023-02-03 15:55:38 -08:00
Johan Brandhorst-Satzkorn 430e372333 chore: Ignore license headers from blame history 2023-02-03 15:55:35 -08:00
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Johan Brandhorst-Satzkorn dcb499ed4f chore: Add copywrite Makefile target
The new copywrite target can be used to add any
missing license headers.
2023-02-03 15:54:27 -08:00
Dan HeathandTimothy Messier 51f2876265 docs: Update credentials docs for 0.12.0 (#2871)
* docs: Update credentials docs for 0.12.0

* Update website/content/docs/concepts/domain-model/credential-libraries.mdx

Co-authored-by: Timothy Messier <tim.messier@gmail.com>

* docs: updates from review

* docs: fix capitalizationi

---------

Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2023-02-03 16:25:08 -05:00
Cameron Perera 80774077d6 chore: bump ui commit for 0.12.x release (#2904) 2023-02-03 14:32:35 -06:00
Johan Brandhorst-Satzkorn 501761a564 chore: Add changelog entry for job_run fix (#2897) 2023-02-03 14:57:33 -05:00
Timothy Messier 718e183a1e fix(credentiallibraries): Correctly populate attrs for vault-generic (#2901) 2023-02-03 14:21:08 -05:00
Timothy Messier ded39259e3 Merge pull request #2887 from hashicorp/tmessi-fix-cli-ui-tests
fix(cli): Status code on api error
2023-02-03 12:21:18 -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 99a8875d3e feat(version): Determine binary version during initalization
This ensures that checks for features should work, and bails early if
that is not the case, since if this fails the binary is essentially
broken. This also simplifies code that performs these checks, ie instead
of:

    binaryVersion, err := version.GetReleaseVersion()
    if err != nil {
      // handle error? panic?
    }
    if version.SupportsFeature(binaryVersion, version.FeatureA) {
      // code for FeatureA
    } else {
      // without FeatureA
    }

Implementations can do:

    if version.SupportsFeature(version.Binary, version.FeatureA) {
      // code for FeatureA
    } else {
      // without FeatureA
    }
2023-02-03 17:00:33 +00:00
Irena Rindos 4114b41527 Filter managed workers from egress workers when the host address is unsafe (#2899) 2023-02-03 11:40:41 -05:00
Hugo e455e31f9e fix(target): Incorrectly allowing whitespace on Target's address field (#2862) 2023-02-02 10:51:39 -08:00
Timothy Messier db42eafd7a Merge pull request #2860 from hashicorp/llb-vault-ssh-cert-injection
Add vault ssh certificate credential library

This adds a new credential library type, `vault-ssh-certificate`, which
can be used with vault's ssh secret engine to generate certificates to
use as credentials for ssh. This new credential library can be created
using:

    boundary credential-libraries create vault-ssh-certificate

See the help output for a full list of the options supported.

This also renames the `vault` credential library subtype to
`vault-generic`. The previous subtype of `vault` will continue to work,
thus the following commands are equivalent:

    boundary credential-libraries create vault-generic
    boundary credential-libraries create vault

See: https://developer.hashicorp.com/vault/docs/secrets/ssh
2023-02-02 12:44:20 -05:00
Timothy Messier 862481960d chore(CHANGELOG): Add items for vault ssh certificate cred library 2023-02-02 17:43:17 +00:00
Timothy Messier 32dd7f07d0 fix(vault): Only persist revokable credentials
When issuing credentials from vault credential libraries, only persist
the vault credential if it is revokable. A credential that is revokable
has a valid lease id that can be used to revoke the lease in vault. If
the credential is not revokable it is also not renewable since renewing
also requires a lease id.

See: https://developer.hashicorp.com/vault/docs/concepts/lease
2023-02-02 17:43:17 +00:00
Timothy Messier 12a53bbfa9 feat(target): Allow vault ssh cert library as credential source
This allows the new vault ssh certificate credential library to be used
as an injected application credential source.
2023-02-02 17:43:17 +00:00
Timothy Messier 1aaaf4af1d feat(controller): Translate ssh certificate credentials for worker 2023-02-02 17:43:17 +00:00
Timothy Messier 6a41bf1237 feat(wh): Support vault ssh certificate credentials
This expands the wh_credential_dimension to include fields for the new
vault ssh certificate credential library.
2023-02-02 17:43:17 +00:00
Timothy Messier 45b15fab8c ci: Start vault for cli ui tests 2023-02-02 17:43:17 +00:00