Commit Graph
220 Commits
Author SHA1 Message Date
Jeff Mitchell 72aa110f72 CLI JSON updates (#962)
See Changelog for details.
2021-02-25 12:43:17 -05:00
Jeff Mitchell 341e7aff0d CLI Generation (#953) 2021-02-23 19:06:39 -05:00
Jeff Mitchell 1ce09069a5 Move worker selection above session creation (#929)
This prevents a session being created when no workers are available to
handle it.
2021-02-12 11:05:33 -05:00
Jeff Mitchell 0993747702 Change server default allowed origin (#931) 2021-02-12 11:04:09 -05:00
Jeff Mitchell e9da3a871d Switch on CORS by default if not specified (#928) 2021-02-11 20:10:48 -05:00
Jeff Mitchell 22462cdd84 Add read:self and cancel:self to sessions; add dev unpriv user (#923)
* Sessions support for read:self and cancel:self permissions. This is automatic with fallback; no API change is needed.

* Strips out values from listing if only self actions are allowed on the resource and the user ID is different. This prevents a default ACL of id=*;type=session;actions=read:self,cancel:self from causing all values to be visible when listing.

* Adds an unprivileged user to development/testing instances. This user has only default permissions plus the ability to authorize sessions in the default target.
2021-02-11 13:14:18 -05:00
Jeff MitchellandJeff Malnick d279a906ce Allow public_cluster_addr to use an env var or file (#907)
Co-authored-by: Jeff Malnick <malnick@gmail.com>
2021-02-10 20:22:02 -05:00
Jeff Mitchell b61dd0ef36 Update schema version check text 2021-02-09 13:42:14 -05:00
Todd Knight 568594d1b3 Release the shared lock using a non cancelled context (#918) 2021-02-05 12:58:54 -07:00
Louis RuchandJeff Mitchell 628a02ad15 Scope role grants (#913)
* Add scope read grant to default roles

* Update CHANGELOG.md

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-02-05 09:41:48 -08:00
Jeff Mitchell 61ec5b47e4 When running single-server mode, use public_cluster_addr if given (#904)
When running single-server mode, use public_cluster_addr if given

Right now you don't need to specify a controller address and we use the
cluster listener address; this allows overriding it to the
public_cluster_addr if one is given.

If `controllers` is specified we allow it to be either the cluster
listener or the public cluster address if one is specified before trying
to parse and use it.
2021-02-03 08:58:42 -05:00
Jeff Mitchell 7cf74596bf Update info output key name 2021-02-02 18:42:52 -05:00
Todd Knight 57d4bf2bfd Removing dev migration feature and checks (#892) 2021-01-28 19:28:31 -07:00
Todd Knight 955ae41215 Support upgrading from old migration table name (#889) 2021-01-28 14:30:08 -07:00
Jeff Mitchell 6cd97a4a6e Add support for recursive listing (#885) 2021-01-25 19:37:40 -05:00
Todd Knight 1f9fcad1cd Adding Migrate Command (#872) 2021-01-25 14:43:50 -07:00
Jeff Mitchell 6b58a3317d Add recursive listing to roles (#881)
This also lays the framework for adding recursive listing to the rest of the resources.
2021-01-23 13:39:04 -05:00
Jeff Mitchell 526e24cd19 Goimports reordering 2021-01-21 17:04:01 -05:00
Jeff Mitchell 717a3b52ee Add worker tagging (#862)
This allows workers to have tags assigned to them, which can then be filtered to control which targets they are allowed to serve.
2021-01-21 16:27:20 -05:00
Todd Knight 595a86508e Fix lockup when initalizing database. (#875) 2021-01-20 18:10:45 -07:00
Jeff Mitchell 46644300d9 Switch to execabs for os/exec in connect cmd (#873)
* Switch to execabs for os/exec in connect cmd

This is more of an abundance-of-caution change (e.g. defense in depth)
but it doesn't seem like we should be using binaries from the current
directory for `boundary connect` executions (unless given an explicit
path).

* Update changelog
2021-01-20 12:09:55 -05:00
Jeff Mitchell dcb15cffbd Add authorized actions output on resources (#870) 2021-01-20 10:53:01 -05:00
Todd Knight ec6151d174 Organize DB Schema Migration Code and DB Init Checks (#842)
Create Schema Manager and propagate contexts into the DB calls downstream.
Add checks at controller startup and database init for correct schema version and schema migration dirty bit being set.
2021-01-19 10:40:41 -07:00
Jeff Mitchell 27919ab11b Groundwork for returning authorized actions (#860)
This returns authorized actions on targets to users when they perform an operation on a target, including listing. It also prevents users from seeing values in listing targets on which they have no permissions.
2021-01-13 14:42:37 -05:00
Michael GaffneyandJeff Mitchell 94cb79bbdd See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied

Results of running `gofumpt -w -s .`

* Update tools file and Makefile for gofumpt

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-01-07 10:02:32 -05:00
Louis Ruch dbc796759b ICU-934/Verify controller config block (#851)
* Verify controller config block

* update changelog
2021-01-06 10:41:38 -08:00
Jeff Mitchell 5b5602969f Update go-keyring to use forked version (#846)
This may help with #830.
2021-01-04 21:05:42 -05:00
Jeff Mitchell 6580d85388 Remove erronious IsGlobalUnicast check. (#845)
Fixes the issue raised at https://www.boundaryproject.io/docs/configuration/worker#complete-configuration-example
2021-01-02 19:49:39 -05:00
Jeff Mitchell e6c98f1454 Add logic to error on certain invalid listener configs (#838)
This adds logic to error on certain invalid listener config:

* If an address in the worker's "controller" set is unspecified or
multicast or global unicast, error
* If the controller's cluster address is unspecified, ensure
public_cluster_addr is set

This has been a source of some confusing behavior on some GitHub tickets
and even on the team, so preventing it is probably a good idea.

It also relaxes the restriction around controller address matching cluster address in single-server mode when using DNS names.
2020-12-18 12:12:25 -05:00
Jeff Mitchell 16f7dc1c96 Update connect unauthorized message to give a bit more detail 2020-12-17 11:06:01 -05:00
Jeff Mitchell a6cca576a3 Attempt canceling sessions by the client (#831)
* Attempt canceling sessions by the client

In some circumstances (like a Ctrl-C), the client knows it's shutting
down and the TOFU token will be lost. In this case it makes sense to
cancel the session rather than have it time out. This introduces a
command enum to the handshake message which can be used for the client
to send commands to the worker -- in this case the only specified
command is to cancel the session. It doesn't occur if the session is
already timed out or if we can't authorize connections as this generally
means the session is already invalid.
2020-12-16 17:14:47 -05:00
Jeff Mitchell b809d3f12a Add kube connect subcommand (#816) 2020-12-14 16:52:11 -05:00
Jeff Mitchell 9a84e50493 Minor linting 2020-12-09 17:05:16 -05:00
Jeff Mitchell 833f29e352 Switch connection limit for default target to -1 (#814)
This makes the initial testing workflow less confusing for users
2020-12-09 16:05:48 -05:00
Jeff Mitchell d4a6efb363 Pass endpoint to the client (#811)
This allows us to automatically set TLS parameters, useful for `boundary
connect http` and some other features to come.
2020-12-09 14:45:53 -05:00
Todd Knight aa4157639c Change Format of API Error (#784)
This is a wire breaking change for json errors since we have removed and renamed a few fields, and changed part of the structure of the returned json error.

* Remove redundant fields in Status, details.error_id, details.TraceId and details.request_id from API errors.

* Added wrapped errors and "ops" field to indicate the internal operation of the errors returned by the API.

* Added error cli error reporting of Op and wrapped errors.
2020-12-07 14:25:16 -07:00
Jeff Mitchell 589c79831f Create internal capability for json errors for connect (#809)
* Create internal capability for json errors for connect

* Update error codes
2020-12-07 09:02:02 -05:00
Todd Knight f6e50006fc Generate postgres.gen.go using schema version directory structure (#808)
* Reorganize the db migration .sql scripts into individual schema version directories and generate the sql httpfs fakeFile accordingly.

* Created a /dev schema version directory to hold db schema updates that have not been finalized.

* Add an 'allow-development-migrations' flag to allow `boundary database init` to be executed even when there are schema updates in /dev.
2020-12-04 21:32:27 -07:00
Jeff Malnick af2d9dfe90 fix: do not print info in output that could be JSON or YAML format (#799)
* fix: print err msg for no credentials found to stderr
2020-11-20 09:27:44 -08:00
Jeff MalnickandJeff Mitchell 11c7c8dbe8 feat: make auth token staleness and duration configurable (#777)
* feat: make auth token time to live and staleness configurable

* docs: add configuration docs for auth token TTL and staleness

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-11-16 10:39:18 -08:00
Jeff MalnickandJeff Mitchell a7fca44809 Fix authz flag (#787)
* Fix authz flag

* add changelog bug fix for authz flag

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2020-11-13 10:06:37 -05:00
Jim af6ef1b687 Refactor existing sentinel errors (#774) 2020-11-05 16:54:03 -05:00
Jeff Mitchell 6d59ac1eda Update synopsis for Connect command so it doesn't wrap on most terminals 2020-11-02 09:45:33 -05:00
Jeff Mitchell e2e4631929 Add ability to set public cluster address (#761) 2020-10-30 16:54:53 -04:00
Jeff Mitchell f063b8601c Fix IPv4-only check when no port is specified (#752)
We have behavior that causes "0.0.0.0" to only listen on IPv4, however,
it also assumed there was a port suffixed. This changes it so that it
also works with a port-less address.
2020-10-27 10:43:50 -04:00
Jeff Mitchell 813d21565f Allow authorize-session to be invoked with target name (#737) 2020-10-22 08:40:00 -04:00
Jeff Mitchell 09b865ab28 Add pass cred storage support (#731)
* Add `pass` cred storage support

Make it the default on non-Windows/macOS

Document the token storage behavior
2020-10-21 09:00:17 -04:00
Jim 547ae7c802 Fix database init when locale isn't english (#736)
* use IsMissingTableError(error)

* update changelog
2020-10-20 21:13:01 -04:00
Jeff Mitchell 1f48d97327 Support for Unix domain socket listeners (#705)
The client already supports protocol-agnostic transport so handles
unix:/// schemes.
2020-10-16 13:45:47 -04:00
Jeff Mitchell 97e8613eb7 Fix hyphenation of resource subcommand output (#689)
* Fix hyphenation of resource subcommand output

Fixes #686
2020-10-15 19:29:33 -04:00