Commit Graph
428 Commits
Author SHA1 Message Date
Jeff Mitchell 8615d21a1f Remove connection from worker if in terminated state and all conns are closed, not just in canceling state 2020-10-01 20:49:13 -04:00
Todd Knight d1d94c19c8 List sessions CLI reports correct target id and status (#511)
* Including some missing session fields and improving reporting of sessions of CLI.
2020-10-01 15:57:01 -07:00
Jeff Mitchell 9bd6045c46 If the exec'd command executed on its own, don't print a term reason out, just pass through the code 2020-10-01 17:13:47 -04:00
Jeff Mitchell 3400e20fb6 Use the host_id as the HostAlias for SSH (#523)
This tells SSH to use the (random, autogen'd) host ID when doing host
key checking. That way we avoid having an IP/port mismatch every time we
connect.
2020-10-01 17:07:34 -04:00
Jeff Mitchell bf30a735dc Clean up slash suffix on -host value 2020-10-01 12:19:06 -04:00
Jeff Mitchell c3b4337b91 Add -path to boundary connect http 2020-10-01 12:16:18 -04:00
Jeff Mitchell fa700dc002 Add account ID templating (#518)
* Remove default role and create via the same mechanism as other initial resources
2020-10-01 10:51:54 -04:00
Jim 19aecfefae terminate "completed" sessions (#477) 2020-10-01 10:13:57 -04:00
Jeff Mitchell d851ab07d8 Add ability to pull user/account/auth-method ID from stored token (#517) 2020-10-01 01:52:08 -04:00
Jeff Mitchell 6ddfe407a3 Update allowed formats of ACL strings (#508) 2020-10-01 01:49:20 -04:00
Jeff Mitchell 4854f2c35f Add boundary connect http (#516) 2020-10-01 00:27:13 -04:00
Jim 1e71c55920 deprecate access to underlying *sql.DB via internal/db.DB() (#506) 2020-09-30 18:11:59 -04:00
Michael Gaffney a9e806b673 Data warehouse (#475)
* Define initial warehouse schema

* Add session id as the primary key to the session accumulating fact table

* Insert a row to use instead of nulls in the time and date dimensions

* Add missing attributes and a partial index

* Rename files

* Refactor: move fact table to a separate migration

* Add domain types for the warehouse

* Add session connection transaction fact table

* Change columns to match ingress data types

* Add views for host dimension ingress

* Create source and target views for the host and user dimensions

* Generate random ID for dimension table primary key

* Formatting changes

* Add current dimension id to target views

* Implement upsert function for host dimension

* Use domain types for upsert function parameters

* Fix indentation

* Add wh_public_id domain type

* Fix value of type columns when the other columns are null

* Implement upsert function for user dimension

* Add warehouse domain types for timestamps and text fields

* Move fact table migrations to a higher number

* Add functions for getting the current date and current time IDs

* Rename backend to endpoint in column names

* Rename fact tables

The fact tables are actually accumulating fact tables not transactional
fact tables.

* Add default value to connection_authorized_time column

* Update session fact table

* Add session_max_seconds, session_connection_limit, and default_port to wh_host_dimension

* Move session table above connection table

* Add after insert trigger to session table for warehouse ingress

* Add fk from connection warehouse table to session warehouse table

* Implement insert trigger for session connections

* Update warehouse for a user having multiple auth accounts

* Rename warehouse columns to be consistent with operational tables

* Add connection specific columns to the connection fact table

* Update session calculations in warehouse

* Rename functions and formatting changes

* Rename session columns to match names of session states

* Implement warehouse triggers for session and connection state changes

* Run 'make migrations'

* Use a static start and end date for the warehouse date dimension

* Document warehouse functions

* Remove outdated TODO comments

* Add TODO comments for additional dimensions and fact table columns
2020-09-30 14:09:40 -04:00
Jeff Mitchell cefea936c3 Update ACLs to allow type=*. (#504) 2020-09-29 22:55:22 -04:00
Jeff Mitchell d479f307a4 Minor tweak to role output formatting 2020-09-29 20:41:32 -04:00
Jeff Mitchell a38f40606e Create default roles in scopes to allow authentication and listing scopes/auth methods (#502) 2020-09-29 20:38:16 -04:00
Todd Knight 0eb35f49d5 Correcting a bunch of incorrect documentation for the different API services and resources. (#494) 2020-09-29 13:17:59 -07:00
Jeff Mitchell 15fadd40f4 Return ScopeInfo for adding/setting/removing host set hosts (#491) 2020-09-29 12:24:54 -04:00
Jeff Mitchell c1a1f8bb1b Separate out docker dep into package (#482)
This also then removes support for docker-based containing starting (for
now) from platforms other than windows/darwin/linux as there are build
issues on several.
2020-09-28 16:05:15 -04:00
Jim fde96924af refactor user account repo function names (#476) 2020-09-28 15:39:10 -04:00
Todd Knight f1873d623d Attach account to auth token response. (#480) 2020-09-28 09:55:44 -07:00
Sam Salisbury 498a840862 Add packagespec CI (#479) 2020-09-28 17:15:28 +01:00
Jim acd28e5372 use CTE within transaction to calc SetGroupMembers changes (#454) 2020-09-26 17:46:21 -04:00
Jeff Mitchell cf3fa4522d Swap base58 libraries (#472)
* Swap base58 libraries

This doesn't reduce binary size but it removes a metric ton of
dependencies.
2020-09-26 14:01:49 -04:00
Jeff Mitchell c30fd5620e Add account add/set/remove to CLI (#473) 2020-09-26 13:58:48 -04:00
Jeff Mitchell b1fc9fd547 Sanitize protos (#471) 2020-09-26 08:30:27 -04:00
Jeff Mitchell 63224d094e Make gen 2020-09-26 06:49:45 -04:00
Todd Knight 0e5a849402 Adding Add|Set|Remove Accounts on the user resource (#461) 2020-09-25 20:44:55 -07:00
Jeff Mitchell 725abffebf Add some more text to dev flags 2020-09-25 17:40:10 -04:00
Jeff Mitchell bec3d702fb Add -database-url to dev mode (#459)
Create default dev mode login name of "admin" and password of "password"
2020-09-25 17:36:47 -04:00
Jeff Mitchell 446286e251 Bump deps (#435) 2020-09-25 17:09:07 -04:00
Jeff Mitchell 220ca253be Add boundary config get-token (#455) 2020-09-25 17:06:53 -04:00
Todd Knight 14f9fc9173 Removing status from all handlers, repo errors are passed on directly for the most part to be intercepted and translated by the API error handler. (#447) 2020-09-25 13:41:20 -07:00
Jim 978f7dc34c fix immutable columns for session_state and session_connnection_state (#449) 2020-09-25 16:04:43 -04:00
Jim 21ca0b6388 SetAssociatedAccounts, DisassociateAccounts, AssociateAccounts with support for multiple accounts. (#439) 2020-09-25 13:35:32 -04:00
Jeff Mitchell b60e356b6c Add username to SSH as well (#441) 2020-09-25 12:26:16 -04:00
Jeff Mitchell 61a0ae02c1 Bring go-alpnmux in house for now 2020-09-25 10:17:12 -04:00
Jeff Mitchell b650695e82 Add rdp/postgres subcommands (#437) 2020-09-24 21:16:12 -04:00
Todd Knight fd0da998e8 SDK error revamp (#432)
SDK methods now return 1 error.  To differentiate between Client errors and Server errors I've also implemented the AsServerError function which returns an *api.Error if it is an error originating from the remote server or nil otherwise.
2020-09-24 14:34:58 -07:00
Jeff Mitchell 94f9d952be Add connect -exec and ssh subcommand support (#434) 2020-09-24 17:29:12 -04:00
Jeff Mitchell e86c11db62 Add session lifecycle info to controller's INFO log. (#431)
This required some plumbing, but nothing major.
2020-09-24 14:12:34 -04:00
Jeff Mitchell 10a41c914e Force worker to use the local controller when running in combined mode (#429) 2020-09-24 13:14:45 -04:00
Christian Frichot 3940842c4d Remove legacy references to Vault's API (#426) 2020-09-24 12:55:06 -04:00
Jeff Mitchell 41a3c66ea1 Add names to init output (#428) 2020-09-24 12:54:40 -04:00
Jeff Mitchell 7fcbffbe88 Remove not-set value. (#427)
I don't think the conditions exist here that necessitated it being
introduced into Vault, but I do sometimes see a baffling condition where
the address coming from the flag is empty. I don't think we need this so
take it out.
2020-09-24 12:19:00 -04:00
Jeff Mitchell 31fe9292b3 Instantiate default resources (#425) 2020-09-24 03:31:26 -04:00
Jeff Mitchell 8d8a7358f8 Add AdditionalVerification function (#423) 2020-09-23 23:39:44 -04:00
Todd Knight 278902db1a Allow target type field to be included in an update. (#412) 2020-09-23 08:30:25 -07:00
Todd Knight 2f8d7f0a32 API Errors: Hide and log internal errors (#411) 2020-09-23 08:10:27 -07:00
Jeff Mitchell 03436a73de Update CLI output functions to show scope info and cleanup (#416) 2020-09-23 03:01:39 -04:00