Commit Graph
1694 Commits
Author SHA1 Message Date
Louis Ruch 59734e97fa Merge pull request #1798 from hashicorp/louis-panic
bug(credential): Fix panic in credential Issue
2021-12-15 18:42:54 -08:00
Louis Ruch 9b39345c7f bug(credential): Fix panic in credential Issue
Vault KV backend returns a nil secret and no error if the secret does not
exist. This caused a panic in during Issue:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1388279]

goroutine 2639 [running]:
github.com/hashicorp/boundary/internal/credential/vault.(*Repository).Issue(0xc001222200, {0x3b932d0, 0xc001203350}, {0xc000dc6e90, 0xc}, {0xc0010e5e40, 0x0, 0x0})
        /home/louis/boundary/internal/credential/vault/repository_credentials.go:67 +0x2d9
github.com/hashicorp/boundary/internal/servers/controller/handlers/targets.Service.AuthorizeSession({{}, 0xc000cd4a38, 0xc000cd4840, 0xc000cd48d0, 0xc000cd4a50, 0xc000cd4870, 0xc000cd4858, 0xc000cd48b8, 0xc0001a8880}, {0x3b932d0, ...}, ...)
        /home/louis/boundary/internal/servers/controller/handlers/targets/target_service.go:1059 +0x1525
github.com/hashicorp/boundary/internal/gen/controller/api/services._TargetService_AuthorizeSession_Handler.func1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880})
        /home/louis/boundary/internal/gen/controller/api/services/target_service_grpc.pb.go:631 +0x78
github.com/hashicorp/boundary/internal/servers/controller.auditResponseInterceptor.func1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880}, 0x461279, 0x40d234)
        /home/louis/boundary/internal/servers/controller/interceptor.go:262 +0x4e
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880})
        /home/louis/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a
github.com/hashicorp/boundary/internal/servers/controller.statusCodeInterceptor.func1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880}, 0x203000, 0x203000)
        /home/louis/boundary/internal/servers/controller/interceptor.go:207 +0x34
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880})
        /home/louis/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a
github.com/hashicorp/boundary/internal/servers/controller.errorInterceptor.func1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880}, 0x18e2b40, 0x0)
        /home/louis/boundary/internal/servers/controller/interceptor.go:156 +0x4e
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880})
        /home/louis/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a
github.com/hashicorp/boundary/internal/servers/controller.auditRequestInterceptor.func1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880}, 0x1a1c860, 0xc0010e5280)
        /home/louis/boundary/internal/servers/controller/interceptor.go:248 +0x198
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x3b932d0, 0xc001203350}, {0x1a0dd40, 0xc000dc8880})
        /home/louis/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a
github.com/hashicorp/boundary/internal/servers/controller.requestCtxInterceptor.func1({0x3b932d0, 0xc001203260}, {0x1a0dd40, 0xc000dc8880}, 0x18, 0xc0010e52a0)
        /home/louis/boundary/internal/servers/controller/interceptor.go:140 +0x5de
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x3b932d0, 0xc001203260}, {0x1a0dd40, 0xc000dc8880})
        /home/louis/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25 +0x3a
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x3b932d0, 0xc001203260}, {0x1a0dd40, 0xc000dc8880}, 0xc00331abb8, 0x18675e0)
        /home/louis/go/pkg/mod/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34 +0xbf
github.com/hashicorp/boundary/internal/gen/controller/api/services._TargetService_AuthorizeSession_Handler({0x1ada420, 0xc00093a180}, {0x3b932d0, 0xc001203260}, 0xc001200840, 0xc000465260)
        /home/louis/boundary/internal/gen/controller/api/services/target_service_grpc.pb.go:633 +0x138
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000cca540, {0x3bb4c58, 0xc0005a9c80}, 0xc001208480, 0xc0004a7440, 0x499e2b8, 0x0)
        /home/louis/go/pkg/mod/google.golang.org/grpc@v1.40.0/server.go:1297 +0xccf
google.golang.org/grpc.(*Server).handleStream(0xc000cca540, {0x3bb4c58, 0xc0005a9c80}, 0xc001208480, 0x0)
        /home/louis/go/pkg/mod/google.golang.org/grpc@v1.40.0/server.go:1626 +0xa2a
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        /home/louis/go/pkg/mod/google.golang.org/grpc@v1.40.0/server.go:941 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
        /home/louis/go/pkg/mod/google.golang.org/grpc@v1.40.0/server.go:939 +0x294
2021-12-15 16:13:30 -08:00
Louis Ruch 155d8e1cbd release: Bump website version number 2021-12-15 14:04:40 -08:00
Louis Ruch d74611b6f6 release: Update changelog for 0.7.2 2021-12-15 14:03:47 -08:00
Carlos Alcaide Corvo 86eead3a3e Bump UI version (#1795) 2021-12-15 13:11:19 -08:00
Louis Ruch 72a15b8d2d bug(target): Add *-host-sources actions to target service (#1794) 2021-12-15 10:06:35 -08:00
Michael Gaffney 67bad4cd6e Update Go version to 1.17.5 (#1789) 2021-12-14 11:58:34 -05:00
Kevin Wang a954d725b2 feat(website): versioned-docs (#1632)
feat: versioned docs
2021-12-13 13:28:52 -08:00
Chris Marchesi 115e22eab2 Update AWS host provider (#1784)
* Update AWS host provider

* Apply @talanknight's suggestion
2021-12-13 10:55:08 -08:00
Hugo 6c9bfc5bbc Merge pull request #1783 from hashicorp/hugoamvieira-envfile-workerdesc
feat(config): Env/file support for Worker description
2021-12-13 15:07:45 +00:00
Hugo Vieira 5f36057f65 feat(config): Env/file support for Worker description 2021-12-10 18:21:52 +00: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
Irena Rindos 2cfa027406 Merge pull request #1776 from hashicorp/irenarindos-env-file-database
feat(config): Add env and file support for database max connections
2021-12-09 10:40:51 -08:00
Irena Rindos 7bf787ec40 feat(config): Add env and file support for database max connections 2021-12-09 13:02:42 -05:00
Mike Wickett ae7e64b2f1 update alert banner content (#1778) 2021-12-09 12:10:18 -05:00
Hugo d1cadd2b3b Merge pull request #1765 from hashicorp/hugoamvieira-env-file-workercontrollers
feat(config): Add env and file support to Worker Controllers
2021-12-09 16:50:02 +00:00
Kevin Wang 52b80fbe18 feat: updated backport assistant (#1716) 2021-12-08 12:53:57 -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 e50541cfc7 Merge pull request #1772 from hashicorp/irenarindos-env-file-plugins
feat(config): Add env and file support to Plugins execution dir
2021-12-08 08:34:10 -08: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 ae4aff85ca Merge pull request #1766 from hashicorp/irenarindos-env-file-controllerconfig
feat(config): Add env and file support to Controller description
2021-12-08 05:28:47 -08:00
Irena Rindos 1f43ec174f Merge branch 'main' into irenarindos-env-file-controllerconfig 2021-12-08 04:58:46 -08:00
Hugo faabfc0002 Merge pull request #1758 from hashicorp/hugoamvieira-env-file-workertags
feat(config): Add env and file support to Worker Tags
2021-12-08 10:40:05 +00:00
Noel Quiles d3687153aa website: Upgrade <HashiStackMenu /> to latest (#1762) 2021-12-07 17:02:16 -05:00
Chris Marchesi bf18555d5e internal/host/plugin: remove custom queries for secrets (#1676)
* internal/host/plugin: remove custom queries for secrets

This removes the custom queries for host catalog secrets, now that #1658
has been merged.

It also does a lot of cleanup surrounding the related oplog entries,
using db.WithOplog natively.

* Simplify conflict actions by replacing SetColumnValues with SetColumns

* Remove unused oplog method
2021-12-07 12:38:34 -08:00
Irena Rindos 161916f6d3 feat(config): Add env and file support to Controller description 2021-12-07 15:08:21 -05:00
Thor 8c842df8a8 Remove public_id and session id from Connection api (#1767)
* removed public_id and session_id from Connection msg
2021-12-07 13:27:54 -06: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
Louis Ruch b692e0e54c api(session): Add connection to api input (#1763) 2021-12-07 09:33:05 -08:00
Timothy Messier cc3bd20d2c Merge pull request #1756 from hashicorp/tmessi-target-refactors
Additional refactors to target domain and controller service packages for subtype registration.
2021-12-03 10:46:23 -05:00
Timothy Messier 0cfd8279b0 fix(controller/targets): Fix creation of credential libraries
The arg order was incorrect for ingress/egress credentials.

Ref: 2cc58ff901
Blame: 36f1ae75f7
2021-12-03 10:19:29 -05: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
Timothy Messier 1ae388438f feat(subtypes): Add function to provide all known prefixes 2021-12-03 10:19:29 -05:00
Zachary Shilton c43fa3f214 website: bump deps to fix print styles (#1628)
* website: bump deps to fix print styles

* website: fix up print styles

* fix: hashi-stack-menu print selector
2021-12-03 10:12:32 -05:00
Timothy Messier 34d9842f85 fix(testing/docker): Correctly reset IFS (#1754) 2021-12-02 12:13:07 -05:00
Timothy Messier a404b5e365 Merge pull request #1753 from hashicorp/tmessi-sdk-api-test-ci
ci: Run sdk and api tests in ci
2021-12-02 07:52:37 -05:00
Timothy Messier 0a4df95fdd ci: Run sdk and api tests in ci
This adds new makefile targets and configuration to run the tests in the
api and sdk modules. These do not run by default since `go test ./...`
does not cross module boundaries.
2021-12-02 07:27:54 -05:00
Timothy Messier 0bc9e30aa6 chore(makefile): Mark all phony targets as PHONY
Some phony targets where not included in the single .PHONY line, this
switches to marking targets as PHONY just before the target is defined,
which makes it easier to ensure the targets are correctly marked as
phony.
2021-12-01 16:49:42 -05:00
Thor 9f7c650101 api: Returns connections as part of sessions (#1714)
* session.proto: added connections to Session message

* make proto

* handler: convert connections on toProto

* updated unit test to check connections
2021-12-01 14:02:04 -06:00
Michael Gaffney 72d4d6d205 fix(sql): Remove warning from create_time trigger (#1751)
Raising a warning in the default trigger used for setting the value in
create_time columns creates unnecessary noise in the PostgreSQL log
files.

Closes #1744
2021-12-01 11:05:19 -05:00
Chris MarchesiandTodd 1c3d7a7faa Update CHANGELOG.md for #1736 (#1750)
* Update CHANGELOG.md for #1736

For #1736.

* Update CHANGELOG.md

Co-authored-by: Todd <T.Alan.Knight@gmail.com>

Co-authored-by: Todd <T.Alan.Knight@gmail.com>
2021-11-30 15:45:42 -08:00
Jim 983f7b019c refactor (db): Remove unused gorm formatter (#1738) 2021-11-30 18:20:44 -05:00
Chris MarchesiandTodd 84febd9983 internal/host/plugin: ensure UpdateCatalog triggers updates for sets (#1736)
* internal/host/plugin: ensure UpdateCatalog triggers updates for sets

This ensures that attribute updates to a host catalog triggers an update
to any of its downstream host sets. This ensures that updates to
elements that affect a host set, such as the region a host catalog is
configured for, take effect immediately instead of requiring a wait of
long as 10m after an update.

* Add WithNextRunIn to test sync job

This is to ensure it doesn't run right away when added. This ensures
that we can accurately test *when* the job is set to run immediately.

* Update internal/host/plugin/repository_host_catalog.go

Co-authored-by: Todd <T.Alan.Knight@gmail.com>

* Change TestRepository_UpdateCatalog_SyncSets to check next run time, not wait for run

* Remove explicit version increment and instead rely on implicit increment

* Fix lanuage for rows updated check when flagging host sets for sync

* remove errant non-zero check when looping over the thing we're checking

* remove scheduler start line from TestRepository_UpdateCatalog_SyncSets

Co-authored-by: Todd <T.Alan.Knight@gmail.com>
2021-11-30 14:37:06 -08:00
Louis Ruch 9b6d7d8105 chore: fmt changelog entry 2021-11-30 11:20:11 -08:00
Hugo 29bdc22b41 Merge pull request #1731 from hashicorp/hugoamvieira-gosockaddr-template-support
feature(config): Add go-sockaddr templating support to Controller and Worker Addresses
2021-11-30 17:57:55 +00: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 5417cc5cb0 Fix setting nil attributes on host sets (#1746)
This is the analogue of #1743 but for host sets
2021-11-28 15:20:46 -05:00