Commit Graph
2181 Commits
Author SHA1 Message Date
Danielle Miu 15f8f63b2d chore: Prep for 0.9.1 release 2022-07-06 12:25:30 -04:00
Jeff Malnick 1f66685864 feat: set default connection limit to unlimited (-1) instead of 1 (#2234)
This avoids the confusion behavior of a session terminating as soon
as a single connection using that session is closed.
2022-07-06 12:02:56 -04:00
Haotian 83bf38f030 feat(worker): add/set/delete repo worker tags (#2236)
implements repo changes for add/set/delete worker tag operations
2022-07-05 15:49:21 -07:00
Timothy Messier fd5d15af27 feat(config): Add database config options for idle connection management (#2176)
This adds two new config options for the `database` stanza:

- `max_idle_connections`
- `max_idle_time`

These correspond to settings for the underlying `sql.DB` instance. They
can be used to have finer control over the controller's database
connection pool. For example this can be used to mitigate the high
connection overhead when connecting to postgres by setting a high
`max_idle_connections` and either setting `max_idle_time` to zero or to
a high duration.

Alternatively, if using a connection pool like pgpool-II or pgbouncer,
`max_idle_connections` can be set to 0.

See:
    https://pkg.go.dev/database/sql#DB.SetMaxIdleConns
    https://pkg.go.dev/database/sql#DB.SetConnMaxIdleTime
    https://www.pgpool.net/mediawiki/index.php/Main_Page
    https://www.pgbouncer.org/
2022-07-05 15:25:55 -04:00
Carlos Alcaide Corvo d33c4f7f6d Bump UI version (#2242) 2022-07-05 11:10:09 -07:00
Jeff Mitchell 0d2422aad8 Add Azure dep fix into changelog 2022-07-05 11:41:06 -04:00
Jeff Mitchell 79440c5d82 Add worker resource to perms table (#2241) 2022-07-05 11:34:01 -04:00
Johan Brandhorst-Satzkorn a537491cbc chore: Update changelog with plugin fix (#2240) 2022-06-29 13:23:31 -04:00
Jeff Mitchell d2ce2a81c7 Update azurekeyvault kms plugin 2022-06-29 11:56:32 -04:00
Jeff Mitchell b8eb87561c Update configutil dependency in sdk 2022-06-28 19:55:39 -04:00
Johan Brandhorst-Satzkorn ed406e2853 fix: Upgrade configutil dependency (#2239)
Fixes https://discuss.hashicorp.com/t/latest-boundary-versions-ignoring-plugins-execution-dir/41281

See: https://github.com/hashicorp/go-secure-stdlib/commit/bf6d78ef5b727b83b2f8f41b473eb9764b446df4
2022-06-28 15:12:36 -04:00
Damian Debkowski 3e9c99c217 refactor(user_password) rename all references of user_password to username_password (#2232) 2022-06-27 14:03:12 -07:00
Damian Debkowski afd4437492 fix(error) validate credential store id when creating username/password credentials (#2231) 2022-06-24 09:16:11 -07:00
Todd 9af6c09c36 Move generated pb.go file in to the internal/gen directory (#2225) 2022-06-23 12:16:16 -07:00
Robin Beck 0ff4be119e updates learn links (#2230) 2022-06-23 12:06:39 -06:00
Jeff Mitchell 396edfca80 Add an extra cleanup task for sessions stuck in canceling state (#2229)
* Add an extra cleanup task for sessions stuck in canceling state

See the comment on the migrations file for details.
2022-06-23 12:25:55 -04:00
Louis Ruch 4cacd0a605 bug(scheduler): Fix controller id length check (#2226)
* bug(scheduler): Fix controller id length check

The job_run table has a foreign key to the server_controller private_id.
While this column is called a prviate_id it does not implement the wt_private_id
postgres domain type, and therefore does not have a minimum length of 10 characters.
2022-06-22 13:20:27 -07:00
Jeff Mitchell 86141ffb65 Add some OSS/HCP Boundary distinctions in docs (#2227) 2022-06-22 03:31:16 -04:00
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