Commit Graph
1290 Commits
Author SHA1 Message Date
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
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