Commit Graph
2163 Commits
Author SHA1 Message Date
c05fa66096 Hashiconf docs changes (#2178)
Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com>

Co-authored-by: XingLu Wang <95828202+xingluw@users.noreply.github.com>

Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com>

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>

Co-authored-by: irenarindos <irena.rindos@gmail.com>

Co-authored-by: Irena Rindos <irenarindos@users.noreply.github.com>

Co-authored-by: Louis Ruch <louisruch@gmail.com>

Co-authored-by: XingLu Wang <xinglu.wang@hashicorp.com>

Co-authored-by: XingLu Wang <95828202+xingluw@users.noreply.github.com>
2022-06-22 02:37:49 -04:00
Timothy Messier 5c83182cc7 Merge pull request #2184 from hashicorp/tmessi-reduce-test-output-noise
This introduces two changes to reduce the output of tests in CI and for
local developers:

- Silences gorm db logs
- Silences log indicating the lack of an eventer
2022-06-21 10:51:04 -04:00
Timothy Messier 21c0509a82 chore(event): Reduce log noise for tests
This silences error messages when:
- There is no eventer in the context.Context
- There is no SysEventer
- And a new env var is set

Previously when the first two conditions where met, the error was logged
to a default hclog.Logger with the error being wrapped in a message to
note the lack of an eventer. In production this is a very important
message to help operators fix a likely misconfiguration.  However, in
tests it is common to not have an eventer setup, meaning this generates
a lot of noise. This uses the CI environment variable which is an
environment variable set by most common CI environments. Developers can
set this variable locally to reduce the log noise:

    export CI=true

See:
    https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
    https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables
    https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
2022-06-21 14:28:02 +00:00
Timothy Messier f3c90df300 chore(db): Silence db logs by default for tests
This removes a lot of log clutter from normal test execution with `go
test -v`. There are a number of test that expect no results from the
database or other error cases from the database. The previous default
log level of dbw.Error would cause these cases to generate logs in the
success case, creating noise in the test output.

The new default for tests is dbw.Silent. This can be overriden in two
ways. A test can be updated to pass in the db.WithTestLogLevel option,
which allows for targeting specific tests to include additional output.
This may make sense for tests that normally should not cause errors, but
would report an error if it fails.

Alternatively a new environment variable can be set,
DEFAULT_TEST_LOG_LEVEL. This allows for adjusting the log level without
changing any test file. The environment variable should be set to the
string value of the log level, and is treated as case insensitive, ie:

    export DEFAULT_TEST_LOG_LEVEL="error"
2022-06-21 14:28:02 +00:00
Timothy Messier 07a9789abc chore(release): Format hcl 2022-06-21 14:17:48 +00:00
Sam Salisbury cb9bdbe7e4 fix actions-docker-build invocation (#2223) 2022-06-21 14:26:27 +01:00
Todd 19b549c44a Rename package servers to server (#2222) 2022-06-20 18:20:17 -07:00
Michele Degges fb0e5ea1ce [CI-only] Notarize darwin arm (#2221)
Currently, darwin arm binaries are not being notarized (called out by Louis!) This adds that in.
2022-06-20 17:34:45 -07:00
Louis Ruch 07406c2d18 chore(release): prep for next release 2022-06-20 12:26:22 -07:00
Jeff Mitchell ffa7dea4f6 A bit more changelog wordsmithing 2022-06-20 12:51:01 -05:00
Jeff Mitchell 093af978fa Minor wordsmithing on changelog 2022-06-20 12:50:33 -05:00
Cameron Perera bebe4f5c37 update ui version to latest commit on main (#2220) 2022-06-20 13:08:10 -04:00
Jim aaf669a044 fix (API): check attributes missing appropriately. (#2219)
* fix (API): check attributes missing appropriately.
2022-06-19 10:55:37 -04:00
Louis Ruch 08c2e71272 chore(release): prep changelog for release 2022-06-18 13:49:28 -07:00
Jim 4114917d27 chore (changelog): add pki workers (#2218) 2022-06-18 16:46:33 -04:00
Dharini Jeeva f3e234cc16 bump up ui version which includes static cred updates (#2217) 2022-06-18 15:17:04 -04:00
Jeff Mitchell f5bf3b2c0c Add events on session activation and connection authz/close (#2215)
* Add events on session activation and connection authz/close

* Only send success event on actual success
2022-06-17 16:20:01 -04:00
Jeff Mitchell c31b8a4383 Fix harmless but nasty-looking error (#2214)
If a worker starts up and tries to connect to a controller before the
controller has a chance for its rotate roots job to run, it'll spit out
a nasty-looking error. It's harmless (things just retry and then work)
but scary (`tls: internal error`).

Rotating at creation time ensures that it's ready by the time a worker
is able to perform any connection against the cluster port.
2022-06-17 16:08:01 -04:00
Jeff Mitchell 77c3ce1cd2 Update nodeenrollment to v0.1.4 2022-06-17 15:07:15 -05:00
Jeff Mitchell 90c6b1bad8 Update nodeenrollment dep to 0.1.3 2022-06-17 13:03:07 -05:00
Johan Brandhorst-Satzkorn 77bc45ae62 chore: Split proto breaking change detection config (#2212)
We generally care about preserving JSON compatibility for protobuf
files, but for some files, where we only use pure gRPC, we only
care about preserving wire compatibility.

Split our buf breaking invocation into two invocations, one that checks
for WIRE_JSON compatibility, and one that checks only for WIRE
compatibility. The former check ignores protos in controller/servers,
since they do not need to adhere to this stricter definition.
2022-06-17 11:58:37 -04:00
Jeff Mitchell 6ffef1e4b5 Update nodeenrollment dep 2022-06-17 10:56:30 -05:00
Louis Ruch 26bc992f38 chore(release): Update API and SDK deps 2022-06-16 17:27:17 -07:00
Cameron Perera caf3896205 bump ui commit hash for 0.9.0 (#2213) 2022-06-16 20:19:23 -04:00
Irena Rindos 227103c906 Merge pull request #2209 from hashicorp/irindos-fix-kms-version-update
bug(workers): KMS workers cannot be updated
2022-06-16 18:30:00 -04:00
irenarindos b7120bf88e bug(workers): Do not update description for status update 2022-06-16 18:15:44 -04:00
Todd eb37fc8d07 Quote tags before printing them out. (#2211) 2022-06-16 14:13:13 -07:00
Louis Ruch 9671daf6e0 Revert "refactor(user_passsword) change all references of user_password into username_password (#2189)"
This reverts commit ab58b24142.
2022-06-16 11:11:39 -07:00
Damian Debkowski ab58b24142 refactor(user_passsword) change all references of user_password into username_password (#2189)
* (refactor) change all sql references of user_password to username_password

* refactor(pkg) renamed pkg userpassword to usernamepassword

* refactor(proto) updated protocol buffers to use UsernamePassword

* refactor(code) updated references from UserPassword to UsernamePassword in golang files

* refactor(test) updated unit tests to reference UsernamePassword changes

* refactor(ddtest) updated references in dbtests to use UsernamePassword

* chore(sql-test) fixed spelling issue

* chore(sql) added and updated comments in migartion & tables. fixed indentations

* chore(proto) updated comments to reflect username_password changes

* refactor(tests) updated unit tests to replace user-password with username-password

* refactor(cmd) updated cmd help text to use username

* chore(tests) update test name & comments

* fix(cmd) fixed cmd usage definition for credentials update

* refactor(tests) removed out of scope changes

* fix(sql) incremented sql migration id & updated migration comments
2022-06-16 10:56:46 -07:00
Jeff Mitchell a589c32269 Minor capitalization change 2022-06-16 09:21:11 -05:00
JimandJeff Mitchell bd167da7d1 fix (worker): send workerId when authorizing session (#2207)
* fix (worker): send workerId when authorizing session

Send the workerId returned from the last success worker status
when authorizing a session.

* fixup! fix (worker): send workerId when authorizing session

* fixup! fix (worker): send workerId when authorizing session

* refactor (worker): deprecate workerId in ActivateSessionRequest

It wasn't being used anywho

* fixup! fix (worker): send workerId when authorizing session

* Update LookupSessionRequest

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2022-06-16 09:30:04 -04:00
Timothy Messier 66a3fe6106 chore(version): Bump to 0.9.0 (#2208) 2022-06-16 09:11:30 -04:00
Jeff Mitchell 32d04b9ce7 Allow a worker to use KMS auth but accept PKI for proxy (#2206)
This essentially worked for non-dev mode before but would create storage
directories that weren't actually used or needed, and it didn't work in
dev mode because it made assumptions about the presence of a worker auth
kms or not. This fixes those behaviors.
2022-06-15 22:39:52 -04:00
Jeff Mitchell 9a4545e59e Fix eventing and worker name setup (#2204)
* Don't automatically create worker names, as this is now invalid for
  PKI workers
* Fix a check in dev that clears out name/description in exactly the
  wrong cases
* Change eventing setup to use a hostname-based ID instead of the name
  (which could change on every start anyways)
2022-06-15 20:01:03 -04:00
Todd 214ca9a668 Check that WorkerAuthKms is not nil before trying to decrypt with it (#2205) 2022-06-15 16:26:08 -07:00
Cameron Perera 60332b1847 bump ui version for 0.9.0 release (#2203) 2022-06-15 17:33:11 -05:00
irenarindos be0f07cc65 Merge remote-tracking branch 'origin/llb-byow' 2022-06-15 18:04:08 -04:00
Jeff Mitchell 704d68848c Merge remote-tracking branch 'origin/main' into llb-byow 2022-06-15 16:45:00 -05:00
Louis Ruch 618bcb451e fix(target): fix type check (#2202) 2022-06-15 14:14:24 -07:00
Jeff Mitchell bfd9565010 Merge remote-tracking branch 'origin/byow-attrib-consolidation' into llb-byow 2022-06-15 16:04:16 -05:00
Todd 2ed18da214 TestPkiWorker always tries to create valid globally scoped root certificates (#2201) 2022-06-15 14:02:11 -07:00
Jeff Mitchell b0480eb7b3 Move migrations to 32 2022-06-15 16:01:08 -05:00
Jeff Mitchell 3d42737789 Don't display active connection count if it's not authorized (#2200) 2022-06-15 16:50:55 -04:00
Todd 72d122ef5c TestUpdate for PKI and KMS workers fixed for worker service. (#2199) 2022-06-15 13:47:02 -07:00
Johan Brandhorst-Satzkorn d06ac0d370 Propagate plugin execution dir to CreatePlugin (#2183)
* fix: Propagate plugin options to CreatePlugin

Plugin options were previously only applied to the
BuildPluginMap call, resulting in the plugin
execution_dir variable being ineffective.

Also add a test to verify functionality

* fix: Support plugin execution_dir for all plugins

Previously, only external host plugins would respect
the plugin execution dir. Now, all uses of the embedded
plugins respect the configuration.
2022-06-15 16:16:18 -04:00
Jeff Mitchell 4efbce3112 Add description updating via worker status (#2197) 2022-06-15 15:50:36 -04:00
Jeff Mitchell a83a4112ce Fix hcpb URL suffix 2022-06-15 14:47:32 -05:00
Todd b3efe0eb3a Allow TestPkiWorker to be created in an authorized state. (#2198)
* Allow TestPkiWorker to be created in an authorized state.
2022-06-15 12:42:50 -07:00
Todd e379234259 Remove CanonicalAddress, GetApiTags(), and NewWorkerForStatus. (#2196)
Minor testing tweaks are also included.
2022-06-15 11:47:38 -07:00
Jim d7aaa9f7e2 fix (byow): minor updates to UpsertWorkerStatus(...) on conflict (#2194) 2022-06-15 14:43:39 -04:00