Commit Graph
387 Commits
Author SHA1 Message Date
Jeff Mitchell 07dc3db974 Remove ALPN Muxer (#1965)
We never ended up using this and it makes it much harder to reason about the listeners.

An explanation: for the moment I separated out all of the listeners in the struct, even though one should suffice, because when I did it that way first I was hitting some really weird and hard to find intermittent behavior where it seemed like the listeners were getting crossed. So I re-did it this way with each listener very explicitly referenced. I'm happy to make a follow-up PR that attempts to combine them all into a single listener without hitting the issues I did, if desired, but at least doing it via a separate PR means that it won't be something with removing the ALPN muxer that is at fault.
2022-04-01 12:06:41 -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
Hugo Vieira 61e310998f refactor(worker): Decouple listeners/servers shutdown
This change is the Worker-side counterpart to the change in
eebdfb88dc.
2022-03-29 16:46:02 +01:00
Hugo 244237cd2f feat(controller): Add health endpoint (#1882)
* feat(controller): New health service and server

This change also implements a new listener purpose, `ops`.

`ops` (short for operations) is a new listener purpose that is
responsible for serving Boundary's operations endpoints, like health
and possibly metrics.

At Startup: `ops` listeners get configured as late as possible to catch
any errors with the startup process;

At Shutdown: If the health endpoint has been set-up, we introduce a
configurable delay in the process. This is to enable the health endpoint
to report unhealthy for that amount of time. `ops` listeners are also
the last listeners to be shutdown.
2022-03-28 17:16:39 +01:00
Hugo Vieira eebdfb88dc refact(controller): Decouple listeners/servers shutdown from Worker
In general, these changes were introduced in the same vein of the
changes to controller `startListeners`.

Specifically, these changes also decouple the Controller and the Worker
shutdown processes. Currently, a call to `stopListeners` on an instance
that is running as both a Controller and a Worker would stop the
listeners for both.

Lastly, we also add unit/integration tests to the shutdown code.
2022-03-25 15:04:23 +00:00
Jeff Mitchell c99907c6c5 Update keyring deps to remove deprecation warnings (#1924) 2022-03-18 13:52:38 -04:00
Jeff Mitchell e596daf34d Add hclog adapter and gating to eventer (#1915)
This contains to related things:

1. An adapter allowing an hclog interface to take in information and send them to the eventer
2. A gate on the eventer, which is the analogue to the behavior prior to eventing where we'd ensure logs were not printed prior to the startup information. Without this, plugin logs using the hclog adapter will start showing up too early.
2022-03-16 17:25:34 -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
Irena Rindos 5a2c0db586 fix(session connections): Create session connection repository 2022-03-15 12:11:31 -04:00
Justen Walker 8279397dbb fix(connect): do not panic on multiple -- args (#1858)
Passthrough args looks for the an instance of -- and re-slices the arg
list to pass through those args to the underlying connect exec command.
However such commands may also need to parse their own '--', such as
kubectl exec.

This change updates the logic so that boundary arg parser only considers
the first instance of '--' when deciding which args to pass to the
-exec= commands.

Fixes: #1857
2022-02-28 10:39:09 -07:00
Jeff Mitchell 5743580ca5 Update authenticate command/subcommands help text (#1835)
* Make it clear in the subcommands that the given strings are examples
* Add an OIDC example to show that there are different types
* Remove password flag from examples
2022-01-31 11:50:45 -05:00
Irena Rindos 24ae5dfe94 bug(connect): Fix Session has expired messaging 2022-01-18 13:38:12 -05:00
Louis Ruch 61fe77572e chore: make tools & make gen 2022-01-13 14:03:46 -08:00
Louis Ruch a90f1f4eb1 feat(target): Decode based on credential type 2022-01-10 09:57:27 -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
A-440Hz 3afbfbf8c2 fix(cli): Remove duplication of target host sources (#1805)
fix(cli): Remove duplication of target host sources
2021-12-17 19:11:28 -08:00
Louis Ruch b8afd4f50c feat(cli): Display credential type in library list 2021-12-16 10:01:44 -05:00
Louis Ruch e75f1d2f73 feat(credential): Add mapping override update for API/SDK/CLI
This change adds support for updating a credential mapping override on a
credential library.
2021-12-16 10:01:43 -05:00
Louis Ruch 1cc35fb0df feat: Credential library mapping API/SDK/CLI on create path
* feat(sdk): Add fields to credential library proto

Adds CredentialType and CredentialMappingOverrides to credential
library SDK.

* feat(api): Add fields to credenttial library service

Adds support for CredentialType and CredentialMappingOverrides
to the credential library service (API)

* feat(cli): Add feilds for credential library cmd

Adds support for CredentialType and CredentialMappingOverrides to the
credential library cmd command.
2021-12-16 09:43:34 -05:00
Hugo Vieira 5f36057f65 feat(config): Env/file support for Worker description 2021-12-10 18:21:52 +00:00
Irena Rindos 7bf787ec40 feat(config): Add env and file support for database max connections 2021-12-09 13:02:42 -05:00
Hugo Vieira 8462a65637 feat(config): Add env/file support to Worker.Controllers field
This feature allows the user to set the `controllers` field to a string
that points to either an environment variable or file.
We then dynamically pull out the value and parse it into the config.
2021-12-08 17:10:41 +00:00
Hugo Vieira a097b6db8f fix(server): Duplicated Worker nil check inside Worker nil check stmt 2021-12-08 17:09:16 +00:00
Irena Rindos 5601f2bc5f feat(config) Add env and file support to Plugins execution dir 2021-12-08 10:48:24 -05:00
Irena Rindos 1f43ec174f Merge branch 'main' into irenarindos-env-file-controllerconfig 2021-12-08 04:58:46 -08:00
Irena Rindos 161916f6d3 feat(config): Add env and file support to Controller description 2021-12-07 15:08:21 -05:00
Hugo Vieira 1576af70cc feat(config): Add env and file support to Worker Tags
This feature allows the user to set the `tags` field to a string
that points to either an environment variable or file.
We then dynamically pull out the value and parse it into the config.

This can also be done at the keys level, where you set your keys
directly in Boundary's config file, but point the values to env/file.
2021-12-07 19:21:04 +00:00
Timothy Messier 533b434d1a refact(controller/targets): Move tcp functionality into subpackage
This follows a similar pattern as the target domain package, providing a
subpackage for the tcp target functionality, allowing this to be
pluggable.
2021-12-03 10:19:29 -05:00
Timothy Messier c9b99306e1 refact(target): Add NewFunc to registry
This adds a new requirement onto subtypes to register a NewFunc.
Previously the subtypes where implementing this function anyway, but the
target package was not including them in the registry. This resulted in
packages that use the target package needing to import the subtypes
directly, which we want to avoid.

This refactor will require the subtypes to register their NewFunc which
can then be used by `target.New` so packages that need to create targets
can do so by only using the target package.

This also updates the tcp subpackage to register a NewFunc.
2021-12-03 10:19:29 -05:00
Hugo Vieira f1063a62a0 feature(config): add sockaddr template support 2021-11-30 14:07:12 +00:00
Hugo Vieira 21a771b581 test(servers base): add tests ahead of functionality change
Adds tests to `SetupControllerPublicClusterAddress` and
`SetupWorkerPublicAddress` ahead of changes in these functions to
ensure functionality is preserved.
2021-11-29 18:19:10 +00:00
Jeff Mitchell dc2148496b Actually enable loopback plugin in dev (#1742) 2021-11-24 20:58:41 -05:00
Jeff Mitchell 95568ef07f Fix tests using multiple controllers (#1734)
The previous PR only initialized plugins if they were required, which
meant that there may not actually be a plugin manager running because a
second node would not actually create the dev database, which is where
the plugin was being added. The assumption that a plugin manager is
running is still a fine one at the moment, but we just need to make sure
it's running in _all_ cases.
2021-11-18 16:01:15 -05:00
Jeff Mitchell 5559cf54d3 Don't always assume plugins should be activated (#1732) 2021-11-18 11:53:45 -05:00
Todd 63bf60654e Add plugin info on the CLI when reading a host. (#1725) 2021-11-17 10:16:12 -07:00
Jeff MitchellandJim 866bfceefc Add secrets_hmac to host catalog output (#1712)
Co-authored-by: Jim <jlambert@hashicorp.com>
2021-11-16 18:54:38 -05:00
Jeff Mitchell 8cd8453113 Update dev loopback host plugin flag name 2021-11-15 14:45:48 -05:00
Jeff Mitchell b3fd23863f Add external ID to host output (#1705)
This also fixes a bug if no hosts were returned where the job would run
over and over in a loop, and some other cleanup.
2021-11-13 17:18:20 -05:00
Todd 46a1edcb3b Add DNS Names and IP Addresses to the CLI output. (#1701) 2021-11-12 18:51:28 -05:00
Jeff Mitchell 30e9f944a2 Add sync interval to host sets (#1680)
This adds a parameter to host sets allowing the sync interval to be
user-specified on a per-host-set basis. A value of -1 disables syncing;
a value of null uses the current default.
2021-11-11 11:28:08 -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
Jim f63ca1313c feature (kms/audit): Add base audit key type (#1651)
* feature (db): Add the ability to enable debug output for a connection

* refactor: Use scope.Global instead of "global"

* feature (db/migrations): Add kms audit keys

Add schema changes to support a new DEK for audit crypto operations.

* feature (kms/audit): Add audit key type

All the bits required to define a new DEK concrete type for
operating on audit entries.

* refactor (db): Remove deprecated migration unit tests.

We added a new audit DEK to kms.CreateKeysTx(...).  Unfortunately,
unit tests like TestMigrations_UserDimension,
Test_PrimaryAuthMethodChanges and TestMigrations_CredentialDimension
have an indirect dependency on a specific historical set of DEKs via
an indirect call kms.CreateKeysTx.  This of course fails because the
new DEK's tables is not a part of pinned migration versions that these
tests depend on.
2021-11-04 09:34:01 -04:00
Jeff Mitchell 80d41b9044 Merge branch 'main' into plugin-hostcatalogs 2021-11-04 09:02:39 -04:00
Jeff Mitchell b9269ce93c Update available actions for host resource (#1659) 2021-11-03 12:39:41 -04:00
Todd 808b986834 Read and List Plugin based Hosts (#1655)
* Add ability to read and list hosts.  Tests to follow.

* Add tests for reading and listing as well as validation checks to not modify hosts.

* Add IpAddress and DnsNames to the api resource.  Populate the plugin info.

* Adding go sdk tests for reading and listing hosts and ensuring update and deleting is disallowed.
2021-11-02 14:06:20 -07:00
Timothy Messier 7d7d8af694 feat(cli): Add support for egress credentials for targets command 2021-11-01 13:33:54 -04:00
Jeff Mitchell b1a72bd445 Merge remote-tracking branch 'origin/main' into plugin-hostcatalogs 2021-10-27 21:57:30 -04:00
Jeff Mitchell 3de16b6e21 Fix TLS 1.2 support (#1637) 2021-10-26 16:30:02 -04:00
Timothy Messier 24c6c329fe chore(target): Remove unused option support from repo Create
For the target Repository's Create method, the options of
WithHostSources and WithCredentialSources where never used by the
targets.Service. As such the repository does not need to support these
options.

See: 51812ff779
2021-10-26 08:20:15 -04:00