Commit Graph
1285 Commits
Author SHA1 Message Date
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
Chris Marchesi 77bafcab71 internal/servers/worker: actually return when aborting closeConnections (#1371)
This adds a return when aborting from closeConnections, which should
have happened as a part of #1369.

Note that it's currently inconsequential that it's not happening right
now, save some misleading log entries. setCloseTimeForResponse will
effectively no-op on empty or nil input maps.
2021-06-30 14:57:28 -07:00
Chris Marchesi 48e55f156a worker: ensure connections are closed in local state on controller fail (#1369)
This backports some test work that is being added in #1340 to assert
that the worker is actually marking connections closed in its *local*
state on a failure to contact the controller. This was missed in #1357
during some late-stage refactoring.

Summary of the changes:

* If we can't actually contact the controller during connection closure
to mark the connections as closed, we actually construct a "fake"
response that just simply includes a closed state for all connections
requested. This is then used to update the local connection state.

* Added a 3 second timeout to the CloseConnection request to the
controller to ensure the call to close connections completed in a
timely manner and did not hang indefinitely.

Testing enhancements:

* Added a new helper in TestHelper called LookupSession that allows the
lookup of a session from the worker's internal session state.

* This is used in the new ExpectConnectionStateOnWorker check in the E2E
test, which is part of a larger amount of enhancements to the E2E test
that are coming in #1340.

* Added a ConnectionStatusFromProtoVal helper function to the session
package to allow the conversion of protobuf connection status values to
their higher-level counterparts; essentially it is a reverse of
ConnectionStatus.ProtoVal. This is used in some of our tests (with more
coming in #1340) to just help with keeping things more idiomatic.

Finally, there is some minor error refactoring, and we also change the
timeout on internal status and connection close requests to the
controller to 5 seconds.
2021-06-30 10:53:54 -07:00
Jim b3a74584ca Add WriteSysEvent to the events package. (#1360) 2021-06-30 13:34:49 -04:00
Jeff Mitchell db269c968d Use database time for liveness calculation (#1368) 2021-06-29 21:25:52 -04:00
Susmitha Girumala 7f9bc768a0 Bump admin ui version to latest (#1365) 2021-06-29 16:11:18 -04:00
Jeff Mitchell 96d11410c4 Actually use the right password 2021-06-29 12:39:55 -04:00
Jeff Mitchell 36036e5d9c Update help text from test 2021-06-29 12:35:53 -04:00
Jeff Mitchell 14c7993c2c Rework single-value set-credentials-library logic (#1364) 2021-06-29 11:55:02 -04:00
Jeff Mitchell 89dfbbe41e Update changelog (#1362) 2021-06-29 11:40:20 -04:00
Todd Knight 13a65052b4 Allow set-credential-library when a single library id is provided. (#1363) 2021-06-29 08:23:15 -07:00
Jim f483828286 update to 0.4.0 version 2021-06-29 07:19:00 -04:00
Jim 2ac5e0a6ad update sdk and api deps 2021-06-29 07:08:06 -04:00
Jim 4c0276b4af update sdk dep 2021-06-29 07:05:08 -04:00
Jim 3820503979 "make fmt" updates 2021-06-29 06:59:31 -04:00
Chris Marchesi 9f9acce972 [Merge to main] internal/servers/worker: Controller failure connection cleanup (#1330) (#1357)
This commit adds some rudimentary functionality for cleaning up
connections on controller failure, or more specifically, a failure to
communicate with the controllers.

In this scenario, when a status cannot be sent for any reason for longer
than 30 seconds, the worker will close all connections that are normally
not cleaned up (so for sessions that currently are *not* in the progress
of being canceled or terminated). Status requests now time out after 10
seconds if they are not made successfully.

Session status is not touched during this process, but natural cleanup
or connectionless sessions will still occur. This should be okay, as the
session should be added on re-connect if need be.

A few other changes are made to cancelConnections: first, error logging
has been moved to the function so that we can handle errors requesting
cancellation directly within the function; this entails simply just
locally marking these connections as closed with a warning. Second,
there was a minor logging bug where closed connections were not properly
being noted in the last trace log, this has been fixed.

Additional changes:

* Circle: Set acceptance test no_output_timeout to 30m
2021-06-28 17:32:13 -07:00
Randall Morey 2b4155d01e chore: bump UI version (#1361) 2021-06-28 17:48:39 -04:00
Kendall Strautman 44a3a47b48 website: upgrade react-head (#1352)
* chore: upgrade react-head and deps

* chore: upgrade to v3
2021-06-28 09:00:37 -07:00