Commit Graph
228 Commits
Author SHA1 Message Date
Jim f6c4e3c896 feature (worker): add worker events around authentication (#2157) 2022-06-09 11:28:12 -04:00
Jeff Mitchell d1b3b2441f Add node rotation (#2142) 2022-06-07 14:26:33 -04:00
Jeff Mitchell 4117841cf9 Use persistent storage for worker auth credentials (#2139) 2022-06-05 22:50:44 -04:00
Jeff Mitchell caf19f867e Rename some variables to remove Nodee 2022-06-03 17:47:44 -04:00
Jeff Mitchell cd9b10721f Pull in new nodeenrollment lib to fix some bugs 2022-06-03 11:05:07 -04:00
Jeff Mitchell 1ee2c0dde0 Switch nodeenrollment to staging branch 2022-06-02 13:20:37 -04:00
Jeff Mitchell 46e97a2b91 Update to new nodee lib bits (#2120) 2022-06-01 13:35:46 -04:00
Jim 70c5da1048 feature (workers): add repository CreateWorker(...) (#2105) 2022-05-26 13:32:21 -04:00
Jeff Mitchell f6ef708466 Update against new nodeenrollment registration cache 2022-05-20 10:25:54 -04:00
Jeff Mitchell 1f550722a2 Sync against current library state 2022-05-19 14:17:01 -04:00
Jeff Mitchell 0581e164f1 Update nodeenrollment dep 2022-05-16 09:02:09 -04:00
Jeff Mitchell 2f06513a3a Merge branch 'main' into llb-byow 2022-05-13 17:05:36 -04:00
Jeff Mitchell e84a2e639f Revert downgrade of go-kms-wrapping 2022-05-13 17:04:22 -04:00
Jim 785241237e refactor (kms): adopt the go-kms-wrapping/extras/kms package (#2027)
* feature (db): add Db.UnderlyingDB()

This is needed to allow for integration with bits that need a *dbw.DB

* feature (kms): add new go-kms-wrapping/extras/kms dependency

* refactor (kms): schema changes required to adopt extras/kms pkg

* refactor (kms/iam): rename to DeprecateCreateKeysTx(...)

* refactor (kms): remove deprecated test

* refactor (kms): refactor Kms type

This refactor includes renaming the existing type to DeprecatedKms
and then refactoring the Kms type to become a wrapper of
go-kms-wrapping/extras/kms

* refactor (kms): delete all the unneeded bits

All this stuff is not needed now that we're using
go-kms-wrapping/extras/kms

* refactor (db): fixup tests after kms refactor

* refactor (kms/tests): use testing.TB for test helpers

Our test helper packages were not possible to use
with benchmarks. This refactor switches to testing.TB
to allow both tests and benchmarks to use the helpers.

* tests (session benchmarks): refactor to use new Kms type

* refactor (schema): rm test which relies on deprecated Kms code

* refactor (kms): post rebase on main changes required

* chore (kms refactor): re-add unit test from main

* refactor (kms): uses migrations that don't include KMS schema changes
2022-05-13 13:53:22 -04:00
Jeff Mitchell 00e57db60f Adapt to library changes 2022-05-13 10:06:21 -04:00
Jeff Mitchell 837eb9e6f1 Update nodeenrollment dep against new dev branch 2022-05-10 16:33:47 -04:00
Jeff Mitchell ab4d542fad Add multihop auth support (#32) 2022-05-09 13:50:53 -04:00
Jeff Mitchell f748af7b02 Initial BYOW auth PoC (#29) 2022-05-09 13:28:17 -04:00
Jeff Mitchell 957fe19846 Bump to Go 1.18 (#2036) 2022-05-04 12:14:00 -04:00
Johan Brandhorst-Satzkorn f39553abb3 chore: Release prep for v0.8.0 2022-05-03 10:33:36 -04:00
Johan Brandhorst-Satzkorn e864652b33 feat(sessions): Add list benchmarks
The list benchmark tests uses pre-created database
dumps to run its benchmarks. This benchmark
will be used to guide optimizations around listing
of sessions.

Fixes https://hashicorp.atlassian.net/browse/ICU-4042
2022-04-29 16:33:44 -04:00
Johan Brandhorst-Satzkorn 6a37bd9710 Upgrade grpc-gateway version to v2.10.0 (#1954)
This new version will let us hide fields from the OpenAPI output
2022-04-20 13:32:29 -04:00
Jim addbfee593 chore: upgrade gofumpt to v0.3.1 (#2028) 2022-04-19 11:42:54 -04:00
Johan Brandhorst-Satzkorn b1d6a1da9a Switch to buf for protobuf generation (#1944)
* Install buf with go install

This reduces the impact of using buf on our dependency
closure, which was significant. It also avoids potential
issues with building buf given our own internal dependency
constraints. This has caused issues (including crashes!)
in the past.

See https://github.com/cockroachdb/cockroach/issues/67216#issuecomment-874176186
for more discussion on using tool dependencies generally, and
https://github.com/bufbuild/buf/issues/52
for an example of where this sort of thing caused an issue for a user.

* Upgrade buf version

We should migrate to v1 sooner rather than later, as it has some
breaking changes from v0.

* Change buf lint/breaking commands

These commands were moved up one level for v1

* Migrate to buf.yaml to v1

* Remove unused imports

These were uncovered by using "buf lint".

* Use buf v1.3.1

* Depend on googleapis and grpc-gateway via BSR

* Switch to buf for proto generation

* Remove third party dependency

* Remove unused tools and scripts

* Move local protos up one level

* Temporarily don't fail on breaking changes

* Generate CI config

* Fix generation of controller.json

* Replace use of deprecated flag

* Remove unused import, regenerate files

* Remove temporary skipping over breaking check
2022-04-04 13:55:42 -04:00
Jeff Mitchell 58a448fc6a Put session ID in ALPN (#1966)
This allows us to use SNI for actual host (e.g. routing) information. We
don't have the client cert yet so we can't look at that, so this
provides a way for us to convey the information needed to look up that
session's TLS stack.

Using SNI for hosts means we also run into the fact that we don't have
automatic agreement in terms of SANs. So when generating the certs we
now also pass worker address information to the function to be encoded
in the cert.

Finally, there is a change in how the websocket dialing happens, because
http.RoundTripper tries to be too clever for its own good and overwrites
NextProtos on a whim.
2022-04-01 16:32:20 -04:00
ToddandHugo Vieira 3eb22b073a Defines the controller api metrics and registers them at controller startup (#1917)
Co-authored-by: Hugo Vieira <hugoamvieira@users.noreply.github.com>
2022-03-31 08:48:50 -07:00
Johan Brandhorst-Satzkorn 803d916279 Update zalando/go-keyring with freebsd fix (#1938) 2022-03-22 09:52:42 -04:00
Johan Brandhorst-Satzkorn 9dc8c45634 Revert version upgrade of dbus and go-keyring (#1936)
* Revert version upgrade of dbus and go-keyring

The combination of these versions were causing build errors on freebsd

* Only revert zalando/go-keyring
2022-03-18 16:32:43 -04:00
Jeff Mitchell c99907c6c5 Update keyring deps to remove deprecation warnings (#1924) 2022-03-18 13:52:38 -04:00
Jeff Mitchell 20011021ee Update against tagged sdk/api versions 2022-03-16 17:28:17 -04:00
Jeff Mitchell 7eb29261b2 Update to go-kms-wrapping version 2, and plugin-based KMS (#1901) 2022-03-16 17:04:07 -04:00
Louis Ruch 64fd93e088 chore(release): Bump API version and changelog for 0.7.5 2022-02-16 15:35:03 -08:00
Louis Ruch ecbeab9035 chore(release): bump api/sdk versions 2022-01-13 14:22:37 -08:00
Jim 591ec476e7 refactor: Update internal/db and oplog to use go-dbw package for database operations. (#1785)
* chore: Add new dbw dependency

* refactor: Convert to use dbw.DB

* refactor (db): Change GetTicket(...) signature

* feature (db tests): Added TestDeleteWhere(...)
Adding this allows us to eliminate a leak of the gorm library

* refactor: Add ctx to ScanRows(...) signature
This is required to refactor all the deprecated errors pkg calls.
This refactor required adding a context to quite a few call chains
and in particular the job scheduler bits

* feature (db/tests): Add support for test opt: WithTestLogLevel(...)
This test only option allows callers to specify a log level for the
underlying db package (where supported/applicable) when calling
TestSetup(...)

* refactor (db): Simplify Db type
Only store the underlying *DB and create the *RW on demand when
needed.

* refactor (oplog): Port to using dbw pkg for db operations

* refactor (db): Remove gormDB(...) func

* tests (db): Add unit tests for TestDeleteWhere(...)

* chore: make fmt changes to formatting
2022-01-05 14:38:38 -05:00
Jim baa1d88f1f feature: Add client ip to inbound request information (#1678)
* feature: Add client ip to inbound request information
* feature (workers): Add the user's client IP to a session's connection information (#1749)
2021-12-09 20:41:08 -05:00
Hugo Vieira f1063a62a0 feature(config): add sockaddr template support 2021-11-30 14:07:12 +00:00
Jim dba5bc88a0 chore: Upgrade gorm deps (#1747) 2021-11-27 18:38:46 -05:00
Louis Ruch bc0e23bdf1 chore: bump api/sdk versions 2021-11-16 17:28:10 -08:00
Jeff Mitchell 4bf86e6394 Update SDK/API versions to main branches after merge 2021-11-12 19:50:16 -05:00
Todd Knight 884e1f2d18 Merge branch 'main' into plugin-hostcatalogs
# Conflicts:
#	go.mod
#	sdk/go.mod
2021-11-12 08:55:17 -07:00
Jeff Mitchell 962c9463fd Update SDK/API modules 2021-11-10 15:11:57 -05:00
Jim b96f57ec4e fix (events): Only "sign" audit events (#1677)
* chore: Update eventlogger dependency.

We need the latest version, so we can limit the type of events
that are signed.

* fix (events): Only "sign" audit events
2021-11-08 13:29:16 -05:00
Jeff Mitchell 48ac8b8f0b Merge branch 'main' into plugin-hostcatalogs 2021-11-07 18:47:28 -05:00
Jim eecd878b36 feature: Add signing (hmac-sha256) of audit entries (#1666) 2021-11-05 20:44:33 -04:00
Jeff Mitchell 80d41b9044 Merge branch 'main' into plugin-hostcatalogs 2021-11-04 09:02:39 -04:00
Todd ec36528e97 Updating dependencies since the host plugins were updated. (#1649) 2021-11-02 20:49:04 -04:00
Todd 1312628a1e Add plugin set sync and orphaned host cleanup jobs (#1647) 2021-11-01 09:07:56 -07:00
Jim 8ae6e9892f feature (events/audit): Add auth info to audit events (#1644) 2021-10-28 21:14:39 -04:00
Jeff MitchellandTodd b64761f38f Add repository and functions around plugin host set membership (#1629)
Co-authored-by: Todd <T.Alan.Knight@gmail.com>
2021-10-28 10:09:43 -04:00
Jeff Mitchell b1a72bd445 Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs 2021-10-27 21:57:30 -04:00