Commit Graph
243 Commits
Author SHA1 Message Date
Jeff Mitchell 4690225c1e Update delete action behavior and JSON format output (#1155)
This PR changes delete behavior:

* On success, a 204 is returned rather than a 200 with an empty JSON object
* The CLI now passes through the 404 error if encountered instead of swallowing it

It also updates formatting for JSON to use the response body, which means that the item (or items) in the JSON format are actually the format across the wire, instead of being reinterpreted by unmarshaling into the Go SDK and then remarshaling.
2021-04-26 20:38:55 -04:00
Jeff Mitchell e6af51943d Add read:self and delete:self to auth tokens and add logout command (#1162) 2021-04-23 13:45:08 -04:00
Jeff Mitchell 727d1c7085 Add "no-op" action and use it as default for scope permissions (#1138)
Because of listing visibility, if no actions are assigned to a user for
an individual resource, it's excluded from the list. This is fine and
good. However, when we made a change in 0.2.0 to restrict the
information returned from listing for the anonymous user for scopes and
auth methods, it exposed the fact that because of the way this
visibility works we had to add `read` to scopes by default -- thereby
rather defeating the purpose of restricting what goes back to `u_anon`
requests.

The purpose of "no-op" is to never be used for real actions within the
API, but as something that can be granted to specifically enable
visibility for the targeted user. This makes the controls over list
visibility much more granular.
2021-04-23 10:13:37 -04:00
Jim 75108cbc8b Ongoing OIDC: return the primary account info along with the user. (#1145) 2021-04-20 20:33:56 -04:00
Jeff Mitchell 46d7613e2d Remove extra s in item table output for auth methods and host catalogs 2021-04-20 09:04:07 -04:00
Jeff Mitchell c54aedcf1a By default, add Boundary Desktop's origin to allowed CORS origins (#1121)
This also adds support for a flag to disable this behavior.

Fixes #1093
2021-04-14 16:26:21 -04:00
Todd Knight dc881e65d4 Fix alignment for Is Primary For Scope field and values for listing. 2021-04-14 10:25:25 -07:00
Jim 6c003c94f7 add "Is Primary" to auth method CLI output (#1115) 2021-04-14 11:36:42 -04:00
Todd Knight 072b950540 Filter inactive and private oidc auth methods from unauthenticated list requests (#1110) 2021-04-13 16:42:25 -07:00
Todd Knight 53ec3c44bc Auth Method Listing matches other resources, remove repeated "Version" field. (#1107) 2021-04-13 10:34:13 -07:00
Jeff Mitchell 90b30bad25 Use 202 for token polling endpoint instead of 204 (#1103) 2021-04-12 14:57:14 -04:00
Todd Knight 71673ea161 Pass disable_discovered_config_validation in the API change-state call (#1100) 2021-04-12 08:49:22 -07:00
Jeff Mitchell f05f37d0fa Fix panic in non-generated API calls when printing as JSON (#1095)
Fixes #992
2021-04-09 13:09:51 -04:00
dd0f34bc35 Add new OIDC auth method. (#1090)
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2021-04-08 20:54:32 -04:00
Jeff Mitchell 6c48f6ea77 Use pointers for any Uber atomic values (#1044)
BK clued me into the fact that for some types, similar alignment
problems exist as with the normal atomic package (e.g. 64-bit types on
32-bit architectures) if they are not pointer values. So change the few
places they weren't pointers to pointers.

None of these are 64-bit, but it feels like best practice for using the
library and should just standardize on it.
2021-04-05 09:37:34 -04:00
Jeff Mitchell 17ad2410cd Add extra tags config test 2021-03-29 16:00:40 -04:00
Jeff Mitchell b05ed0bf65 If the database is already initialized, use 0 as the return value (#1033)
This matches the migrations code, which treats the operation as
idempotent.
2021-03-25 17:53:11 -04:00
Jeff Mitchell 6605b4c9f8 Revamp authenticate (#1025) 2021-03-24 16:07:43 -04:00
Todd Knight 48ef25433f Fix creation of initial Scope roles (#996)
* Fix the creation of initial roles and users so the admin has permission to list/read resources.

* Adding known permission issue to CHANGELOG.md.
2021-03-16 08:42:08 -07:00
Jeff Mitchell 3b452cb503 Fix initial user ID not being shown in some cases during init 2021-03-04 21:08:22 -05:00
Jeff Mitchell 9649a19d23 Update CLI error codes to be consistent with connect (#976) 2021-03-04 20:05:17 -05:00
Jeff Mitchell 519efa6dd1 Add -filter to CLI listing and website docs (#967)
* Add -filter to CLI listing.

This doesn't include docs/Changelog yet, that will come shortly.

* Add changelog

* Add website docs and fix a curl output bug
2021-03-01 09:23:17 -08:00
Jeff Mitchell 4738ceee5d Add TLS certificate and worker tag reloading on SIGHUP (ICU-1142) (ICU-1143) (#959) 2021-02-25 17:57:10 -05:00
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