Commit Graph
1302 Commits
Author SHA1 Message Date
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
Jeff Mitchell 9ba1948298 Remove telemetry calls as we aren't using them 2021-07-14 16:53:42 -07:00
Jeff Mitchell 051fe60718 Duplicate logging instead of using from shared secure libs, as it's going out of there and we'll be moving away from hclog anyways 2021-07-14 16:48:33 -07:00
Chris Marchesi 5a70875726 internal/servers/controller: Worker failure connection cleanup (#1340)
This commit adds the support to do the following:

* Mark connections for non-reporting workers as closed. This is the
controller counterpart to the worker functionality (see #1330). This is
written as a scheduled job that does the work DB-side in a single atomic
query.

* Works to reconcile states if such a broken controller-worker
connection resumes and a worker reports a connection as connected that
should be disconnected. In this case, the controller will send an update
request, and the worker will honor it and terminate the connection.

* Further refinement of the grace period setting has been added here.
We have converged on the current server "liveness" setting as our
default here, which is half of the previous 30s (15 seconds, in other
words). Additionally, this is now configurable on the controller and
worker side, with the caveat that it's currently impossible to do so in
config as the setting has been untagged in HCL. This is exposed so that
we can run some sophisticated testing scenarios where we skew the grace
period to either the controller or worker to ensure the aforementioned
reconciliation works.

* Some repository functions have been added to support the new
functionality, in addition to some test code to the worker to allow
querying of session state while testing.

* Finally, we've added some add timestamp subtraction functions
as well, basically serving as the opposite of the addition functions.
2021-07-14 09:14:24 -07:00
Mike Green 462306fea5 Remove tls_disable from cluster listener (#1389)
Per https://www.boundaryproject.io/docs/configuration/listener/tcp#tls - having this here is invalid.
All tls parameters are valid only for the api listener. cluster and proxy connections use their own ephemeral TLS stacks
2021-07-13 12:41:04 -04:00
Jeff Mitchell 2cbcf9a563 Update usage of shared-secure-libs (#1393) 2021-07-12 21:06:22 -04:00
Noel Quiles a0c0d17c1d Bump hashi-stack-menu (#1392) 2021-07-12 15:49:26 -04:00
Chris Marchesi 895de869ab internal/db: add enumeration constraints for the server table (#1386)
This adds enumeration constraints to the server table, ensuring that no
servers can be added other than the types "controller" and "worker".

This should already be impossible to do in code, but this adds a check
on the database level to ensure it's the case as well.
2021-07-09 08:19:16 -07:00
Michael Gaffney 8890b97b6f Update docs for minimum value of max_open_connections (#1387)
Closes #1374
2021-07-08 15:41:01 -07:00
Michael Gaffney a9c2674395 Document dependency on pgcrypto (#1385)
Closes #823
2021-07-08 16:57:05 -04:00
Jim 1daa3ebefe integrate events into the servers (#1355) 2021-07-08 15:50:25 -04:00
Carlos Alcaide Corvo ec7577c5fe Bump types/react dependency version (#1307) 2021-07-08 10:16:21 -07:00
Jeff Mitchell c9e4c877b8 Update shared-secure-libs for kms block fix (#1384)
Fixes #1305
2021-07-07 22:54:57 -04:00
Joe Thompson e41ffb0b28 Add additional logic to entrypoint to handle more subcommands. (#1350) 2021-07-07 19:22:15 -07:00
Mike Green d474cc6e29 Clarify default Postgres behavior (#1382) 2021-07-07 16:38:11 -04:00
Carlos Alcaide Corvo 8e8a802f21 Bump desktop client version (#1373) 2021-06-30 20:15:58 -04:00
Pete Pacent fc4fcbda7c [Do not Merge] Adding release notes for 0.3 and 0.4 (#1370)
* Adding release notes for 0.3 and 0.4
2021-06-30 16:24:57 -07:00
Jim 0b66464a3a fix typo in changelog 2021-06-30 18:08:47 -04:00
Jim a68f131089 update api dep 2021-06-30 18:07:14 -04:00
Jeff Mitchell 7c3d5be4f6 Update format of secret to return both raw and decoded when possible (#1372) 2021-06-30 18:02:03 -04:00