Commit Graph
206 Commits
Author SHA1 Message Date
Michael Gaffney 28f48df026 Add documentation for credentials to website (#1356) 2021-06-25 15:31:10 -04:00
df35699c4e Integrate with Vault to retrieve and manage per session credentials (#1308)
* Fix down migrations

* Udpates due to merge

* Sentinel values only have to be greater than 0

* Create credential related sdk structs and methods.

* Post merge interface updating.

* Removing scratch code that was not cleaned up.

* updates

* Convert client certificate and client certificate keys into pem blocks and validate.

* Add newline at end of file.

* Faster check for "s" at the end of a resource name when generating from templates.

* make fmt

* updates

* Add dynamic credentials to a session

* Refactor: move contents of file

* updates

* Updates

* Add InvalidDynamicCredential error

* Assign credentials

* Allow updating client certificates seperate from the client certificate key.

* Replace application purpose string with enum value

* PR feedback / fix go test .

* Delete dead code

* Use common view

* Refactor: extract interface and rename method

* Refactor: move code to eliminate privPurpLibrary

* Add comment to requestMap

* Refactor: do not export methods on an unexported struct

* Update internal/db/schema/migrations/postgres/10/03_vault_credential.up.sql

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* Add comments to credential Purpose constants

* Reorder switch statements to handle errors first

* PR feedback

* update

* fix merge

* Organizing the scheduler code and extract the individual store creation test helper function.

* Run 'make fmt'

* Create certificate when creating store.  Allow vault address to be passed in as option

* Refactor: rename database views and associated structs

This change renames two database views and associated go structs to use
a consistent naming pattern. Views ending in 'private' contain encrypted
credentials needed for connecting to Vault. Views ending in 'public'
mirror the 'private' views but do not include any encrypted values.

This change does not include any changes to functionality or behavior.

* Adding SAD target operations for credential libraries to the SDK.

* Add status field and enumeration table for credential status

* Refactor: rename Status to TokenStatus

* Add status to vault credentials

* Creating the template for the CLI and helper functions.

* Add private database view for vault credentials

* Add scope_id to view and cleanup TODO comment

* Reformat embedded sql queries

* Add vault client helpers

* updates

* white space

* Add LookupLease test

* CLI commands for Store work.  Renamed fields in proto w/ vault prefix.

* Test issue credentials with client TLS

* Add additional checks to vault ping

* Add an error for vault token capabilities and create a VaultToken error kind

* Add support for working with Vault policies

* Use Vault 1.7.2 for testing

* Add testing helper for creating a vault client with a non-root token

* Fix Vault renew lease test

The Vault renew lease endpoint accepts an optional duration parameter
for requesting the number of seconds to extend the lease by. However,
Vault is not required to honor this request.

* Add a var for the required capabilities of a boundary Vault token

* Enhance the test helper for adding a policy to Vault

* Allow the test role in postgresql to revoke credentials

* Remove out of date comments

* Enhance Vault test helpers for the database secrets engine

* Reformat comments

* Add a method for getting the capabilities of the current Vault token

* Add revoke lease to internal Vault client

* Reformat: combine err return line with check for nil line

* Remove redundant checks in test code

Remove checks in test code that are redundant with checks in the test
harness.

* Refactor CreateToken test helper to return the secret and the token

* Fix build failures caused by signature change in vault.CreateToken

* Fix Vault version and Vault API link in comments

* ran `make gen` after merging from mgaffney-vault.

* Remove Vault prefix from attribute fields in API, create a base CLI option for adding field prefixes. format now uses that prefix for error reporting.

* Template now allows attaching attribute field prefixes.

* Credential store uses PrefixAttributeFieldErrorsWithSubactionPrefix.

* Fixing naming of vault flags and helper flags.

* Updating more references to generated api methods.

* Make the capabilities String method more readable

* Add comment outlining PrintApiError usage of Options.

* Refactor test to move declarations closer to first use

* Fix comment

* Implement revoke method on vault repository

* Tests now verify certs, CA, and tokens, addresses can be updated in a store.

* Added test for creating store with pk/cert in same field.

* Allo updating certificates seperate from private key.  Only contact backing vault service when updating token.

* Fixing bad tests and removing unused code.

* Adding tests for various ways of updating tokens.

* Add private credential

* Add token revocation job and cred renewal/revocation job

* Regen after merge.

* Fixing field mask related merge error.

* Create Library CLI. Removes vault prefix from path. Adds a WithoutCleanup testOption for vault.

* Set all credentials to revoked when a token is revoked

* Fixing missed renaming update.

* fix copy/paste error.

* Fixing code generation errors after merge.

* make gen after merge.

* Update internal/cmd/commands/credentialstorescmd/vault_funcs.go

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* Update internal/cmd/commands/credentialstorescmd/vault_funcs.go

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* Update internal/cmd/commands/credentialstorescmd/vault_funcs.go

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

* Refactor: move migrations from 10 to 12

* Removing logic from transaction.

* wrapping client errors in the calling op for CredentialStore's client() method.

* Redact token

* redact client key

* updates

* Add trigger to revoke credentials when session is canceled or terminated

* Fixing some help text for some flags.

* Add ability to load values from files (file://) or environment variables (env://).

* Updating comments

* fix bad merge

* feedback

* Adding issued credentials to sessions.

* Error on capabilities

* updates

* Expose NewVaulTestServer

* Add godoc

* Adding generated SessionCredential struct for API.

* Progress on building handler test for Authorize Session.

* feedback

* Update policies

* Add 'revoke' as a status for Vault Tokens

* Add delete_time to vault credential store

* Create dynamic credentials at session creation time.

* Tests pass with credentials attached to AuthorizedSession result.

* Only call issue if there are credentials to issue.

* Fixing output only issues. Adding type to credential library.

* Fix test to clear un/pw generated.  confirm generated un/pw changes from 1 authorize session call to another.

* Update lookupTokenError

* Add delete_time to private credential store

* Refactor: move private store to separate file

* Fixing tests for AuthorizeSession and verifying error cases.

* Only create the credential repo if there are credentials to issue.

* Rename Library field to CredentialLibrary.

* Fixing missing change of Library to CredentialLibrary.

* Removing Default SDK functions for fields which are required and update CLI to match.

* Replace resource specific id variables with "id" and the input parmater for paths to be just a single string and the resource name as it should show up in the path.

* Soft delete vault credential stores

* Prevent new SQL functions from silently overwriting existing functions

* Rename "Hmac" to "HMAC" in the human readable cli response table.

* Fix tests

* Add vault database cleanup jobs

* Add ability to set the token period in the vault test harness

* updates

* Add not_null_columns func test

* remove unused struct

* Up no output timeout

* Validate current vault token on addr update

* Fix client cert change test

* add cert test

* Update revocation job where

* Fix comment

* Use Vault's default port in CLI help strings

* Remove down migrations

* Increase migration file numbers by 1

* Run make migrations

* Move migrations from 12 to 10

* Increase Circle CI timeout for acceptance tests

* Fix spelling mistake in error messages

* ASD cmds for Target and returning credentials to AuthSession request (#1338)

* Add Add/Set/Remove commands for libraries on Targets.  Return credentials on AuthorizeSession request.

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

Co-authored-by: Louis Ruch <louisruch@gmail.com>
Co-authored-by: Todd Knight <T.Alan.Knight@gmail.com>
Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-06-22 22:26:26 -04:00
Robin Beck e69ca4f0cb fixed roles and accounts link references (#1323) 2021-06-18 09:16:48 -06:00
Carlos Alcaide Corvo aea1da77b6 Bump @types/node to latest release of v15 (#1296)
* Bump @types/node to latest release of v14

* Bump major version to v15
2021-06-11 09:41:17 -07:00
Jeff Mitchell f50ed866ef Add resource/filtering docs for OIDC managed groups (#1297) 2021-06-09 08:55:02 -04:00
Jim Lambert aa41676dc9 make gen changes prior to staging release 2021-06-08 13:12:26 -04:00
Susmitha Girumala 0b819d248e Update desktop guide for Windows (#1292)
* Add Windows screenshots to desktop guide
2021-06-08 09:51:15 -07:00
Jeff Mitchell 054c0aa538 Update password generated account IDs (#1290) 2021-06-08 12:31:58 -04:00
Jeff Mitchell 9208d10936 Merge branch 'main' into ICU-1573 2021-06-02 14:09:02 -04:00
Jeff Mitchell 179a49657e Managed Groups service (#1262) 2021-06-02 14:01:37 -04:00
Daniel Kravetz f14d8ced2c Fix typo in docs/installing/no-gen-resources (#1260) 2021-06-02 07:10:47 -04:00
Jeff Mitchell 7ee8ddba6a True up some spelling 2021-05-14 16:26:25 -04:00
Jeff Mitchell 22d5c88a0b Add Output Fields support (#1192) 2021-05-04 20:57:35 -04:00
Theragus f493fd3252 Incorrect Grants when setting anonymous read permissions (#1185) 2021-05-04 09:39:41 -04:00
Jeff Mitchell f32e7f9144 Add ability for the controller/worker name to be read from env/file (#1181) 2021-05-04 09:37:56 -04:00
Dylan Scott 4ae5003763 PR #1001: Postgres Connection Pooling Control (#1015) 2021-05-03 18:42:18 -04:00
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
NoahMundahl 2455445d16 website: minor edits to "Installing" pages and "Go SDK" page (#1139) 2021-04-26 10:37:50 -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
Susmitha Girumala bdea6e16b3 docs:desktop: Remove beta notification in getting started guide (#1128) 2021-04-15 10:44:29 -04:00
Jeff Mitchell 59939e768c Re-add information about passing args and templated values in args 2021-04-14 17:35:07 -04:00
Jeff Mitchell 344880dafc Fix indentation in tags example 2021-04-14 16:27:37 -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
Pete Pacent 09326fa69e Update roadmap 2021-04-14 12:45:53 -07:00
Pete Pacent 4c370beed5 Fix typos 2021-04-14 12:43:59 -07:00
Pete Pacent 761e2766df Add nav and What's New Section 2021-04-14 12:32:41 -07:00
Pete Pacent 5cef23c9ac Adding preliminary release notes for 0.2.0 2021-04-14 12:18:05 -07:00
Jim 24dd92f3f9 update fmt formatting. (#1113) 2021-04-13 19:48:39 -04:00
Jeff Mitchell 941e74388a Fix curl string building (#1106)
I'm not sure why it was doing it the other way with assuming the string
being built would always have a space at the end, but, this way is
easier to understand and fixes a bug where there wasn't a space being
left between some fields.
2021-04-13 16:08:51 -04:00
Todd Knight 14c222709c Make oidc auth callback redirect on most errors (#1105) 2021-04-13 09:21:26 -07:00
Jeff Mitchell e8814e55f8 Copy missing text from TCP listener to Unix listener 2021-04-13 11:40:04 -04:00
Jeff Mitchell 90b30bad25 Use 202 for token polling endpoint instead of 204 (#1103) 2021-04-12 14:57:14 -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
John Reese c096157cf9 Fix spelling errors found in the documentation (#1073) 2021-04-08 12:14:36 -04:00
Bryce Kalow bd8cc5464e feat(website): migrates nav data format and updates docs pages (#1049)
* migrates nav data format and updates docs pages

* removes sidebar_title from content files

* updates api docs to work with new format
2021-04-05 13:04:57 -04:00
Jeff Mitchell 6605b4c9f8 Revamp authenticate (#1025) 2021-03-24 16:07:43 -04:00
Alex Harness 79283d93ac docs: Clarify note on VAULT_TOKEN env variable (#1026)
A slight update for clarity regarding the wording of the Note regarding the recommendation of using the 'VAULT_TOKEN' environment variable as opposed to using the token parameter in the configuration file.
2021-03-24 14:17:55 -04:00
Randall Morey e3c30defbe docs: clarify CORS configuration options (#1011)
* docs: clarify CORS configuration options

* docs: use double quotes
2021-03-18 08:48:37 -07:00
Jeff Mitchell af47d04002 Clarify that TLS parameters in listeners are valid only for api usage. 2021-03-17 12:22:51 -04:00
grantorchard a95d2ff83c Workers connect to controlles on 9201, not 9202 (#991) 2021-03-16 15:09:09 -07:00
Susmitha Girumala aa2054d684 Update desktop guide to beta release (#993) 2021-03-11 10:50:37 -05:00
Jeff Mitchell 9fbb552031 Update shared-secure-libs to support tls_max_version 2021-03-09 08:33:35 -05:00
Jeff MitchellandLouis Ruch bb4e0f5c01 Update getting started to clarify CLI usage (#975)
Co-authored-by: Louis Ruch <louisruch@gmail.com>
2021-03-03 13:29:17 -05:00
Jeff Mitchell 888e0c88a9 Slight website wordsmithing 2021-03-03 11:38:47 -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 Malnick 02fabe21c5 docs: add brew install instructions (#951) 2021-02-24 11:02:47 -08:00
Jeff Mitchell 341e7aff0d CLI Generation (#953) 2021-02-23 19:06:39 -05:00
Jeff Mitchell 1906a7311b Fix some documentation that was not correct
TLS listener docs were pulled from Vault but we don't actually have
SIGHUP enabled yet.
2021-02-22 15:44:40 -05:00