Commit Graph
41 Commits
Author SHA1 Message Date
Jeff Malnick af2d9dfe90 fix: do not print info in output that could be JSON or YAML format (#799)
* fix: print err msg for no credentials found to stderr
2020-11-20 09:27:44 -08:00
Jeff Mitchell 813d21565f Allow authorize-session to be invoked with target name (#737) 2020-10-22 08:40:00 -04:00
Jeff Mitchell 09b865ab28 Add pass cred storage support (#731)
* Add `pass` cred storage support

Make it the default on non-Windows/macOS

Document the token storage behavior
2020-10-21 09:00:17 -04:00
Jeff Mitchell f454fa9ef2 Don't return error code 1 if saving the value to the keyring (#668) 2020-10-13 17:13:31 -04:00
Jeff Mitchell f8a2100603 Add various env vars to CLI (#528)
* Add auth method ID env var

* Add env var for host catalogs
2020-10-02 19:20:30 -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 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 220ca253be Add boundary config get-token (#455) 2020-09-25 17:06:53 -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 38ce9d9eac Combine controller and worker commands (#415) 2020-09-23 01:23:10 -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 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 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 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
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 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 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 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
Jeff Mitchell 1f3c52f495 Name and addr updates (#26)
* Rename FriendlyName to Name

* Standardize on connection parameters for the server being addr

This syncs up WATCHTOWER_ADDR and -addr (formerly -address) and frees up
-address to be used in resources (which it is).

* Add description fields
2020-05-05 11:19:42 -04:00
Jeff Mitchell e3c7ca3070 Add a hosts create command (#25) 2020-05-04 23:04:55 -04:00
Jeff Mitchell 6254e18698 Fix compilation of command 2020-05-04 12:41:36 -04:00
Michael Gaffney 5e5a56cac0 Refactor names to avoid stutter (#1)
Since client code uses the package name as a prefix when referring to
the package contents, the names for those contents need not repeat the
package name.

- Rename base.BaseCommand to base.Command
- Rename base.BaseServer to base.Server
- Rename config.DevConfig() to config.Dev()
- Rename config.LoadConfigFile() to config.LoadFile()
- Rename config.NewConfig() to config.New()
- Rename config.ParseConfig() to config.Parse()
- Rename controller.ControllerCommand to controller.Command
- Rename controller.NewController() to controller.New()
- Rename dev.DevCommand to dev.Command
- Rename listener.ListenerFactory to listener.Factory
- Rename listener.NewListener() to listener.New()
- Rename version.GetVersion() to version.Get()
- Rename version.VersionInfo to version.Info

See:
- https://golang.org/doc/effective_go.html#package-names
- https://blog.golang.org/package-names#TOC_3.
- https://github.com/golang/go/wiki/CodeReviewComments#package-names
2020-03-10 15:48:04 -04:00
Jeff Mitchell 482b4d56dd Initial commit 2020-03-04 12:51:46 -05:00