Commit Graph
69 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 262ff06042 Add public address config option (#405) 2020-09-22 08:28:10 -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 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
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
Jeff Mitchell 37e9fed2e3 Allow not destroying dev databases (#366)
This also shifts some logic around to better prepare for non-dev-mode
workloads, although it does not actually call the KMS creation functions
and initial auth method creation from non-dev commands yet.
2020-09-16 10:10:06 -04:00
Jeff Mitchell c4e2b88022 Add database URL. (#365)
* Add database URL.

This allows specification of either a file://, env://, or other string.
If it starts with file:// or env:// the actual value will be read from
those resources.

* Tidy up the KMS output

* Also run migrations in test mode when specifying the URL
2020-09-16 09:28:39 -04:00
Jeff Mitchell 3c13e4765d Verbose isn't actually used right now so don't expose it; fix some wording for scope id flag 2020-09-16 08:50:43 -04:00
Jeff Mitchell 2914b4c14c Use base58 for a few more user-facing values (#356) 2020-09-12 21:43:08 -04:00
Jeff Mitchell ff0d49b6e4 Use previous method of getting recovery wrapper 2020-09-09 01:29:35 -04:00
Jeff Mitchell f8237fb945 Move some packages into SDK, out of internal 2020-09-09 01:24:25 -04:00
Jeff Mitchell 36f975a952 Add some recovery KMS functions needed for external clients (#339) 2020-09-09 01:15:29 -04:00
Todd Knight c3ecea172d Generate new version of SDK resources and Add Tests (#331) 2020-09-08 16:27:51 -04:00
Jeff Mitchell 23156afa11 Add in most of the proxy flow (#326) 2020-09-03 13:24:34 -04:00
Jeff Mitchell 1822c47ef5 Migrate KMS code to the new database DEKs (#324) 2020-09-03 13:23:46 -04:00
Jeff Mitchell 514856c020 Fix broken CLI output 2020-08-28 15:58:15 -04:00
Jeff Mitchell 1f065316ee Initial (#313) 2020-08-28 01:28:26 -04:00
Jeff Mitchell 28df6eb7b0 Update config encrypt/decrypt CLI command (#309)
This updates the command to our emergent standards. It also enables
using a separate config file for a config kms, which allows non-string
values to be encrypted.

This allowed some nice cleanup as well.
2020-08-27 16:38:44 -04:00
Jeff Mitchell b53812a5c1 Add ability to skip automatic auth method creation (#306)
This is useful if you, for instance, want Terraform to be 100%
responsible for creation of resources (outside of the static ones that
cannot be removed or modified, like u_anon). This will mean using the
recovery mechanism for initial setup, but that isn't an issue once TF
supports that :-)
2020-08-26 23:27:46 -04:00
Jeff Mitchell 8f579c75c3 paum -> ampw (#303) 2020-08-25 00:21:08 -04:00
Jeff Mitchell 74544f6324 Encrypt tokens on the way out and decrypt on the way in (#302)
* Encrypt tokens on the way out and decrypt on the way in

This isn't a security feature related to tokens specifically; it's so
that we can discard cryptographically bad tokens before we ever hit the
DB. This way we can't pass through a DDoS to the database due to
fetching obviously invalid token values.

I'm using base58 to encode the resulting value as there aren't great
base62 options, and allowing base64 / and + values can hamper usability
by creating copying/highlighting breaks.
2020-08-25 00:20:50 -04:00
Jeff Mitchell ac4d9fa311 Add nonce storage and replay prevention test (#293) 2020-08-24 13:22:10 -04:00
Jeff Mitchell 414a2ab2c3 Remove some dead, dead, dead, dead code 2020-08-20 17:58:29 -04:00
Jeff Mitchell b47cca0329 Add (non-db aspects of) the recovery key workflow (#286) 2020-08-20 13:34:03 -04:00
Jim 9570897032 basic keys mgmt repo (#264) 2020-08-19 16:47:18 -04:00
Jeff Mitchell adfc5681be Auth methods CLI (#277) 2020-08-18 17:46:34 -04:00
Jeff Mitchell 282177afc2 Remove the default org (#270) 2020-08-17 15:38:41 -04:00
Jeff Mitchell fff15bc9f3 Rename KMS purpose 'controller' to 'root' 2020-08-14 10:12:31 -04:00
Jeff Mitchell bb6b189513 Create a default role on new scope creation (#265) 2020-08-13 17:39:48 -04:00
Jeff Mitchell b75a6fc5e5 Update scopes CLI command in the model of the roles command (#262)
* Update scopes CLI command in the model of the roles command

* Pull help functions to helper methods
2020-08-13 11:20:22 -04:00
Jeff Mitchell 5d104a7a01 Migrate off Vault's internalshared folder to the separated-out repo 2020-08-12 16:12:45 -04:00
Todd Knight 245c7fbb44 Add Account Update handler (#257)
* Allow updating accounts (not username or pw).

* Updating new field names to LoginName.

* Adding creation with password test.

* Fixing documentation for WithLoginName
2020-08-12 08:20:35 -07:00
Jeff Mitchell 203e2b5dc2 Initial worker porting steps (#232) 2020-08-12 00:40:39 -04:00
Jeff Mitchell 4cfab04307 Migrate user name to login name (#255) 2020-08-11 17:25:00 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Jeff Mitchell d74e30d94a Minor, easy, linting fixes 2020-08-07 13:50:39 -04:00
Jeff Mitchell 8dd5de49b9 Minor update to default role description text 2020-08-07 13:42:04 -04:00
Todd Knight f84991c0f1 Use authenticate and Auth Method repo functions (#242) 2020-08-07 10:18:40 -07:00
Jeff Mitchell 908a299ea3 Convert SDK to the new options API (#238) 2020-08-07 12:55:02 -04:00
Jeff Mitchell 2bbc1163c4 Save the entire token, not just the ID (#211)
This allows us to use the token's scope to set the default scope for an
action in the client instead of relying on env vars.
2020-07-22 15:02:58 -04:00
Jeff Mitchell 388a13b10d Convert scopes to the new paradigm (#206) 2020-07-22 00:14:28 -04:00
Todd Knight 28dbcd84bd Authenticate Handler API and SDK, and much more (#183) 2020-07-14 17:32:47 -04:00
Jeff Mitchell acce195dcb Organizations -> orgs consistency (#189)
* Organizations -> orgs consistency

* Fix up some tests and some mistaken substitutions
2020-07-11 12:00:49 -04:00
Jeff Mitchell 16b56a37ed Rename base.New -> base.NewCommand for clarity 2020-06-24 15:10:12 -05:00
Jeff Malnick 8afcbd4c8e Add config CLI command and encrypt/decrypt sub-commands (#77) 2020-06-24 16:08:13 -04:00
Jim cc5114bdef refactor scopes to conform to public id usage and repo error msgs (#117) 2020-06-12 15:22:23 -04:00
Jeff Mitchell 5333482ff8 Fix gorm newlines issue (#108)
Even if you made a custom formatter for gorm, it would blithely println
anything returned, including nils, resulting in lots of new lines when
we were ignoring output. This also creates a custom logger that doesn't
do anything when newlines are found.
2020-06-08 21:12:00 -04:00
Jeff Mitchell c175fcde8d Add a gorm log formatter to adapt to hclog (#93)
This is also added in a test that otherwise output to stdout, which
validates functionality.
2020-06-01 17:32:48 -04:00