Commit Graph
379 Commits
Author SHA1 Message Date
Jeff Mitchell 03436a73de Update CLI output functions to show scope info and cleanup (#416) 2020-09-23 03:01:39 -04:00
Jeff Mitchell 38ce9d9eac Combine controller and worker commands (#415) 2020-09-23 01:23:10 -04:00
Jeff Mitchell 0a4669e96d Remove dev mode from controller/worker, and streamline flags on dev command (#413) 2020-09-22 21:37:37 -04:00
Michael Gaffney 36d465476c Name all the check constraints in the database (#410)
* Name all of the check constraints

* Run 'make migrations'
2020-09-22 14:44:21 -04:00
Jim 57da9f918e cancel a session when one of its FKs is set to null (#406) 2020-09-22 14:36:20 -04:00
Michael Gaffney f0c84de49c Disambiguate auth_account scope_id by adding iam_user_scope_id column (#407) 2020-09-22 13:30:11 -04:00
Jim cfc76eb88f add support for WithSessionIds in ListSesions (#395) 2020-09-22 10:41:42 -04:00
Jeff Mitchell 262ff06042 Add public address config option (#405) 2020-09-22 08:28:10 -04:00
Christian Frichot 475c6cdebe Fix updated help text for the authenticate base command so it aligns with the password subcommand (#401) 2020-09-22 07:51:14 -04:00
Christian Frichot 9e6c016223 Add JSON formatted output for authenticate password cli command (#402) 2020-09-22 07:50:40 -04:00
Christian Frichot 874a7180ea Fix segfault with boundary sessions help output (#403) 2020-09-22 07:50:04 -04:00
Jeff Mitchell e9b91f323f Allow port to not be specified in listener address (#404) 2020-09-22 07:49:19 -04:00
Jeff Mitchell dd06615c2e Add database initialization command (#400) 2020-09-21 20:25:16 -04:00
Jeff Mitchell 7e3c174b70 Disallow deletion of r_default (#398)
If it's a useful named resource and people accidentally delete it e.g.
with TF, they can't get it back. This doesn't affect TF's ability to
manage it, just delete.
2020-09-21 16:50:39 -04:00
Jeff Mitchell f25186f78a Standardize on one spelling of "canceled" (#399) 2020-09-21 16:33:28 -04:00
Jeff Mitchell 35c3f5b717 Use 'at' for auth token prefix (#397) 2020-09-21 16:04:13 -04:00
Jeff Mitchell 6a09e0966e Fix some broken tests that were expecting nil but are now getting an empty struct 2020-09-21 16:03:47 -04:00
Todd Knight 21f5cc274f Don't return nil, nil for API service methods. Add tests for updating w/ wrong version. (#396) 2020-09-21 15:09:30 -04:00
Jeff Mitchell 1adbe64160 Update some tests that are failing due to 300 nano difference in time comparisons between create and lookup (#393) 2020-09-21 15:08:15 -04:00
Jeff Mitchell d3606e14b6 Set wrapper on client, not token, so it doesn't fail KMS recovery on update calls 2020-09-21 12:20:44 -04:00
Michael Gaffney d52fb81e68 Change the default max session for a target to 8 hours (#392)
* Change the default max session for a target to 8 hours

* Run 'make migrations'
2020-09-21 12:12:18 -04:00
Jeff Mitchell 27d728875c Cleanup session state enum (#394)
It's up to the worker to understand what a change in state means, so
there was no functional difference between simply sending a state change
request and a cancel request.
2020-09-21 11:36:38 -04:00
Jim b334aeff41 refactor CancelSession and updateStates to be idempotent (#390) 2020-09-21 11:14:30 -04:00
Christian Frichot 72de1a6916 Fix WATCHTWER ENV variable names (#389) 2020-09-21 11:09:40 -04:00
Jeff Mitchell 9b2646eaf9 Fix retry behavior with KMS recovery and misleading error message (#391) 2020-09-21 11:05:44 -04:00
Jeff Mitchell 5747ea603e Fix nil pointer with revamped chosen host ID logic 2020-09-21 10:21:40 -04:00
Jeff Mitchell fcdaf129a3 Add missing continue in close function 2020-09-21 02:44:53 -04:00
Jeff Mitchell 33b0021547 Add Sessions CLI command and add session cleanup to worker (#388) 2020-09-21 02:22:59 -04:00
Jeff Mitchell bb6ece69b6 Remove unused struct member 2020-09-21 00:11:37 -04:00
Jeff Mitchell 9cbc7b5c3d Add connection close call from worker to controller (#387) 2020-09-21 00:09:50 -04:00
Jeff Mitchell 7ff4b7f106 Send connected RPC to controller (#386) 2020-09-20 23:09:42 -04:00
Jeff Mitchell 4669c95999 Pass more session info around, make proxy UX nicer (#385) 2020-09-20 21:18:07 -04:00
Todd Knight e937b0ea27 Sessions Read/List/Cancel API and SDK (#369) 2020-09-20 20:22:57 -04:00
Jeff Mitchell f7e48ec836 Plumb connection limit to proxy and output it (#384) 2020-09-20 16:28:00 -04:00
Jeff Mitchell 7db0e2a5ed Fix database check 2020-09-20 16:09:11 -04:00
Jeff Mitchell 697ea561e0 Fix breakage from dual merges 2020-09-20 16:04:05 -04:00
Jim 5764b2c70a return States as a field of Connection repo operations. (#382) 2020-09-20 15:54:39 -04:00
Jeff Mitchell edffc7863d Change connection limit to -1 for unlimited so it works with TF (#383)
* Migrate connection limit unlimited value to -1

* Fix authorization check
2020-09-20 15:53:49 -04:00
Jeff Mitchell 5214f14105 Work on connection authorization (#381) 2020-09-20 12:51:08 -04:00
Jim 223591d835 return connection authz info from session.AuthorizeConnection (#380) 2020-09-19 21:05:56 -04:00
Jim 66400c9cff changes needed for sessions.AuthorizeConnection (#377) 2020-09-19 14:21:09 -04:00
Jeff Mitchell ee7cdde7de Add trace code for when we add port to controller address 2020-09-19 14:08:33 -04:00
Jeff Mitchell 5bf555cca2 Remove connection idle timeout seconds for now (#379) 2020-09-19 14:01:49 -04:00
Jeff Mitchell e002326293 Plumb timeouts to worker and set appropriate deadlines (#378) 2020-09-19 13:51:50 -04:00
Jeff Mitchell 0a3f9b8357 Rename connection idle timeout duration -> seconds and sessions max duration -> seconds (#376) 2020-09-19 11:32:38 -04:00
Jeff MitchellandJim Lambert 62baef1b7e Add multi connection parameters through targets and into session creation (#375)
* Update protos and gen

* Add new values to targets CLI command

* Lots more plumbing of new parameters through everything

* allow fields to be set to zero value.

* Disallow set but empty name/description strings in create/update verifiers

Co-authored-by: Jim Lambert <jlambert@hashicorp.com>
2020-09-19 10:31:49 -04:00
Jeff Mitchell 07a7e9750a Tie together the database-driven session handling with the worker and add relevant CLI comands (#370) 2020-09-19 00:18:17 -04:00
Jim e7e70b1b94 new domain functions for the session repo (#368) 2020-09-18 18:12:41 -04:00
Jim 7e927203e8 schema changes to support multi-connections (#372) 2020-09-18 17:41:45 -04:00
Jeff Mitchell ff8ce053e1 Don't try to recreate resources when adding test cluster members 2020-09-17 16:06:27 -04:00