Commit Graph
1321 Commits
Author SHA1 Message Date
Jim 00cb18efbe use parseutil.ParseDurationSecond(...) which allows a value without a suffix to be treated as seconds instead of nanoseconds (#1447) 2021-08-04 19:11:00 -04:00
Jim acc3dda2df parse the duration string specified in an event file config into a time.Duration (#1446) 2021-08-04 17:57:36 -04:00
Todd Knight 8496093874 make fmt. 2021-08-04 13:56:54 -07:00
Jeff MitchellandJim c75c97a872 Normalize event configuration (#1444)
* Normalize event configuration

This updates event configuration stanzas to more closely match behavior
for listeners and kmses:

* Singular "sink" instead of "sinks" (probably not the most correct
  option, but a consistent option, and one that makes sense for HCL)
* Allows sinks to have the type defined at the start of the block
* Moves type-specific configuration to a specific named block

Co-authored-by: Jim <jlambert@hashicorp.com>
2021-08-04 14:01:58 -04:00
s-christoff 00ada3c578 update op (#1442) 2021-08-03 17:56:18 -06:00
Jim 3a3f956615 support new event formats of: hclog-text and hclog-json (#1440) 2021-08-03 15:06:19 -04:00
Jeff Mitchell e3012afb4f Add primary auth method ID to default output fields, fix display bug (#1441) 2021-08-03 14:16:02 -04:00
Todd Knight 6b578c0e30 Update to versions 0.5.0 2021-08-02 13:36:07 -07:00
Todd Knight 39cc245966 Make gen after make tools. Includes make fmt of existing non generated files. (#1438) 2021-08-02 10:46:09 -07:00
Todd Knight 03b4c095c4 Fix syntax error in profiling_on.go (#1437) 2021-08-02 09:58:58 -07:00
Chris MarchesiandJeff Mitchell 947dc96b30 server: Add back controller shutdown on worker startup failure (#1432)
* server: Add back controller shutdown on worker startup failure

This adds back the controller shutdown call on worker failure.

This was added in a15961e4 to address a panic discovered in testing, and
was mistakenly thought to be unnecessary. This, however, covers
multi-role scenarios where we have already started the controller, which
needs to be shut down gracefully if possible if we can't start the
worker.

A nil check has been added to ensure the panic does not resurface.

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-08-02 12:35:57 -04:00
Bryce Kalow 8599b55f7a web: migrate to web platform- packages (#1405)
* migrate usages of nextjs-scripts to platform packages

* upgrade hashi packages

* use new downloads page component

* adds missing dep

* remove redundant head component

* remove styles

* remove unused prop
2021-08-02 12:34:03 -04:00
Jim 6785055a4d update to latest tagged version (#1436) 2021-08-02 09:01:46 -04:00
Jim 137729b0c0 Event log adpaters (#1434) 2021-08-02 07:47:17 -04:00
Jim 68dd2a66ba Remove unneeded hclog dependencies as we move forward with events (#1433) 2021-08-01 14:41:13 -04:00
Jim df42c71881 add events feature to changelog (#1431) 2021-07-30 15:20:18 -04:00
Chris MarchesiandJim 29ea10c6f8 Add session cleanup changes to CHANGELOG.md (#1426)
* Add session cleanup changes to CHANGELOG.md

* Shorten controller-side connection cleanup entry

* Update CHANGELOG.md

Co-authored-by: Jim <jlambert@hashicorp.com>

Co-authored-by: Jim <jlambert@hashicorp.com>
2021-07-30 08:55:01 -07:00
Jeff Mitchell f8a51b987c Migrate target host sets -> host sources (#1424)
This follows the same model as https://github.com/hashicorp/boundary/pull/1413

See there and CHANGELOG for more details.
2021-07-30 08:48:03 -04:00
s-christoffandJim 6b78108ecf Update primary error functions to take a context, deprecate old functions (#1358)
* add new error funcs which take a ctx and deprecate existing funcs

* use context where available when writing error events

* remove circular internal/errors pkg dep

* suppress some chatty errors using errors.WithoutEvent()

* convert auth oidc funcs to take context where needed to write events

Co-authored-by: Jim <jlambert@hashicorp.com>
2021-07-29 20:52:56 -04:00
Randall Morey 02ff2db66e docs: add credential doc redirects and fix session redirect (#1425)
* docs:  add credential doc redirects and fix session redirect

* fix: source -> library
2021-07-29 19:28:02 -04:00
Susmitha Girumala 868a165a86 Bump admin UI version for credential brokering feature (#1429) 2021-07-29 19:01:36 -04:00
Chris Marchesi bf679c2f05 Fix Makefile target (docker-multiarch-build) (#1427) 2021-07-29 11:00:03 -04:00
Louis Ruch 76a7ce93e8 Fix race with base context cancel and final run update in scheduler (#1422)
* Fix race with base contedt cancel and final run update

* Use scheduler waitgroup to wait for all running jobs to exit:
2021-07-28 23:48:11 +02:00
Chris Marchesi a15961e461 Close connections on worker on shutdown, add force shutdown (#1354)
This adds functionality to ensure that connections are closed on a
worker when the server is shut down or reloaded.

Connections are closed, and then the shutdown process waits for the next
report to the controller to go through, waiting the grace period that
was added in #1330. The rest of shutdown is then proceeded with.
Listener shutdown has been moved to the start of the process to ensure
that new connections can't be made while we are shutting down.

Additionally, functionality has been added to force shut down servers
after a second interrupt has been received after the first one. This
takes the form of code in both the server and dev mode code paths that
just performs an os.Exit if another shutdown is received during the
normal shutdown process.

Additionally, the commit also includes some refactoring to tests so that
we could use some of the new E2E testing code to test session
connections during shutdown and reload.

Additionally, this fixes a panic in worker startup when there are no
controllers defined. Looks like the shutdown call was attempting to call
into the controller, not the worker.

Finally, this also removes the extra shutdown within the outer worker
startup.

Shutdown is actually handled within the inner StartWorker(), attempting
shutdown on errors was actually leading to potential use of an
uninitialized worker, which is leading to panics in testing.
2021-07-28 14:35:58 -07:00
Jacob Mammoliti fc998b7034 Adding support to build multi-arch Boundary images (#1395)
* updated dockerfile to support multi-arch; added new section in Make for multi-arch

* adding a line to changelog

* switching base image to hashicorp mirror
2021-07-28 11:52:15 -07:00
Nico Vibert 05869a6f74 Update manage-targets.mdx (#1376)
Fixed typo (equivalient -> equivalent)
2021-07-28 11:50:27 -07:00
Jim be8c3cb1ea prevent panics when waitgroup == nil (#1423) 2021-07-28 11:46:41 -04:00
Jim 70ad081e39 Events: convert from hclog to events (#1409) 2021-07-28 06:31:16 -04:00
xuwhao ade67e6bb5 fixed typo: specifc -> specific, varibles -> variables, idomatic -> idiomatic. (#1421) 2021-07-27 19:36:42 -04:00
Mike Wickett acede17909 changes desktop CTA language (#1412) 2021-07-27 14:43:39 -07:00
Todd Knight 10e8aeae4b Subtype Id registration moved to its own package (#1416)
* Allow repo packages to register subtypes and id prefixes. 
* Refactor out request authentication logic to a new package as a sibling to handler.
2021-07-27 09:59:52 -07:00
ab6f3eaeb4 Migrate credential-library nomenclature around targets to credential-source (#1413)
See the CHANGELOG entry for more information.

Co-authored-by: Jim <jlambert@hashicorp.com>

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-07-27 12:48:36 -04:00
Jeff Mitchell 528d54b4ad Add token/userinfo claims to account read output (#1419)
This is very useful when trying to write managed groups filters as you
can directly look at the structure of the claims for the accounts you're
trying to filter.

The output of the claims in text format on the CLI currently leaves
something to be desired. I started revamping some of the formatting
functions and it quickly got very fragile. Fundamentally at this point
we're likely better off -- now that we have a good idea what our output
format/standards are like -- rewriting the formatting code. I'll take
that as a tasker as I have a lot of ideas...
2021-07-26 17:52:18 -04:00
Michael Gaffney d4fc2efa53 Move base interfaces of the domain into a boundary package (#1415) 2021-07-26 14:03:15 -04:00
Jim 11124794bf Events: add node for formatting/filtering cloudevents (#1390) 2021-07-25 17:40:54 -04:00
Chris MarchesiandMichael Gaffney 1ebb8efab6 Apply extra review feedback from #1340 (#1400)
* internal/servers/controller: refactor WaitForNextWorkerStatusUpdate

* internal/servers/worker: use connId instead of conn.GetConnectionId()

* internal/servers/worker: remove Worker.logClose

* internal/session: complement versus inclusive state search

* internal/session: use ScanRows instead of Scan

* internal/session: make closeConnectionsForDeadServersCte results gormable

* internal/tests/cluster: rename TestWorkerSessionCleanup to TestSessionCleanup

* Simplify SQL query for CloseConnectionsForDeadWorkers (#1410)

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-07-23 15:02:15 -07:00
Jim cab3dd6986 update eventlogger dep which should eliminate a possible panic with the gated.Broker is nil (#1411) 2021-07-22 14:05:28 -04:00
Jeff MitchellandSam Salisbury 324f4d5532 Bump to Go 1.16.6, which fixes some important issues (#1407)
* Bump to Go 1.16.6, which fixes some important issues

* use linux/arm64 golang base image

- Discovered the correct digest using:
  'docker manifest inspect golang:1.16.6 | jq -r '.manifests[] | select(.platform.os == "linux" and .platform.architecture == "amd64") | .digest'

Co-authored-by: Sam Salisbury <samsalisbury@gmail.com>
2021-07-22 09:17:22 -04:00
Chris Marchesi aae0c29f88 internal/servers/worker: fix TestWorkerWaitForNextSuccessfulStatusUpdate (#1402)
This fixes this test which was failing intermittently.

* Ups the grace period timeout to 2s.
* Re-positions the testify require.New() so that incorrect code path
  warnings are not given.
2021-07-19 10:58:48 -07:00
Louis Ruch 2dae498123 Ensure job progress is always reported (#1396)
* Update completed and total when job finishes

* Remove unused option in test

* Add comment

* Use writer for updates and inserts
2021-07-16 18:39:43 -04:00
Louis Ruch 74aba58c73 Remove Telemetry from config tests (#1401) 2021-07-16 13:45:28 -04:00
Jeff Mitchell ed6c59a053 Update the rest of the shared libs locations 2021-07-14 17:50:15 -07:00
Jeff Mitchell fccdf80161 Update API import 2021-07-14 17:41:32 -07:00
Jeff Mitchell 4900f249e6 Update parseutil import location 2021-07-14 17:40:39 -07:00
Jeff Mitchell b533e12c1a Update password import 2021-07-14 17:38:52 -07:00
Jeff Mitchell ce52acb968 Update strutil import 2021-07-14 17:37:40 -07:00
Jeff Mitchell 44329d4ff9 Repoint mlock import 2021-07-14 17:33:23 -07:00
Jeff Mitchell 140c54e319 Repoint base62 import 2021-07-14 17:31:58 -07:00
Jeff Mitchell 5b7544c81f Update API against shared libs and sdk 2021-07-14 17:24:06 -07:00
Jeff Mitchell b80607ff46 Update against updated go-secure-stdlib 2021-07-14 17:21:48 -07:00