Commit Graph

307 Commits

Author SHA1 Message Date
Jeff Mitchell
c2cef877f4 Port over some changes 2017-11-30 09:43:07 -05:00
Brian Kassouf
58ce26a6af Update the path for generating DR Operation tokens (#3578) 2017-11-13 20:28:34 -05:00
Chris Hoffman
def7b5c510
generate token functions to share common names (#3576) 2017-11-13 15:44:26 -05:00
Jeff Mitchell
c77196cea2
Port over bits (#3575) 2017-11-13 15:31:32 -05:00
Jeff Mitchell
82dcd8d076
Plumb more seal wrap stuff through and move to outside layer of mount options (#3572) 2017-11-13 11:22:22 -05:00
Jeff Mitchell
bf30fe7ccb Fix typo in test (and failure) 2017-11-13 10:35:36 -05:00
Jeff Mitchell
74d9a382c8 Fix client test 2017-11-12 12:34:56 -05:00
Jeff Mitchell
75d88abbb6
Make -client-cert and -client-key work when the server doesn't know (#3568)
about the CA used to sign the cert.

Stop swallowing an error in meta.

Fixes #2946
2017-11-10 18:16:50 -05:00
Jeff Mitchell
8171eedc25 Populate config error in three node test function 2017-11-10 17:44:25 -05:00
Brian Kassouf
6fc21d88e2
Add API methods for creating a DR Operation Token and make generate root accept strategy types (#3565)
* Add API and Command code for generating a DR Operation Token

* Update generate root to accept different token strategies
2017-11-10 10:19:42 -08:00
Jeff Mitchell
8ac7868aa9
Minor client refactoring (#3539) 2017-11-06 12:06:19 -05:00
Jeff Mitchell
41568317e0
Redo API locking (#3508)
* Redo the API client quite a bit to make the behavior of NewClient more
predictable and add locking to make it safer to use with Clone() and if
multiple goroutines for some reason decide to change things.

Along the way I discovered that currently, the x/net/http2 package is
broke with the built-in h2 support in released Go. For those using
DefaultConfig (the vast majority of cases) this will be a non-event.
Others can manually call http2.ConfigureTransport as needed. We should
keep an eye on commits on that repo and consider more updates before
release. Alternately we could go back revisions but miss out on bug
fixes; my theory is that this is not a purposeful break and I'll be
following up on this in the Go issue tracker.

In a few tests that don't use NewTestCluster, either for legacy or other
reasons, ensure that http2.ConfigureTransport is called.

* Use tls config cloning

* Don't http2.ConfigureServer anymore as current Go seems to work properly without requiring the http2 package

* Address feedback
2017-11-02 09:30:04 -05:00
Jeff Mitchell
962ef74cb2
Add seal type to seal-status output. (#3516) 2017-11-01 21:00:41 -05:00
Jeff Mitchell
2afbbb3400 Only call ConfigureTransport if "h2" is not already in NextProtos.
Fixes #3435
2017-10-27 14:08:30 -04:00
Jeff Mitchell
d9fa7636ac More syncing 2017-10-23 16:52:56 -04:00
Billie Cleek
022e93f627 do not panic when Client.Transport is not *http.Transport (#3440) 2017-10-10 08:46:54 -04:00
Jeff Mitchell
42953d6482 Fix panic when setting a client http client with no transport (#3437)
Fixes #3436
2017-10-09 08:49:20 -04:00
Marcus Söderberg
af3022b4f5 Add http headers to the api client (#3394) 2017-10-06 14:27:58 -04:00
Chris Hoffman
010575cb60 Rename "generic" secret backend to "kv" (#3292) 2017-09-15 09:02:29 -04:00
Calvin Leung Huang
d10075e0fd Normalize plugin_name option for mount and enable-auth (#3202) 2017-08-31 12:16:59 -04:00
Seth Vargo
f052e7fdf3
Add SignKey endpoint for SSH API client 2017-08-18 12:59:08 -04:00
Jeff Mitchell
4c7c181018 gofmt 2017-08-02 19:38:35 -04:00
nrhall-deshaw
52a18a1236 Add SRV record functionality for client side host/port discovery of Vault (#3035)
* added SRV record functionality for client side port discovery of Vault

* Add a check on returned address length
2017-08-02 19:19:06 -04:00
Calvin Leung Huang
15634f3b6e Store original request path in WrapInfo (#3100)
* Store original request path in WrapInfo as CreationPath

* Add wrapping_token_creation_path to CLI output

* Add CreationPath to AuditResponseWrapInfo

* Fix tests

* Add and fix tests, update API docs with new sample responses
2017-08-02 18:28:58 -04:00
Jeff Mitchell
b84701db02 Have sys health api always return even in an error case (#3087)
* Have sys health api always return even in an error case, which HTTP API docs say it should

* Use specific return codes to bypass automatic error handling
2017-08-02 10:01:40 -04:00
Jeff Mitchell
95ce578842 Add leader cluster address to status/leader output. (#3061)
* Add leader cluster address to status/leader output. This helps in
identifying a particular node when all share the same redirect address.

Fixes #3042
2017-07-31 18:25:27 -04:00
Jeff Mitchell
c6615e1b51 Add a -dev-three-node option for devs. (#3081) 2017-07-31 11:28:06 -04:00
Chris Hoffman
d4b9c17793 moving client calls to new endpoint (#2867) 2017-07-25 11:58:33 -04:00
Calvin Leung Huang
2b0f80b981 Backend plugin system (#2874)
* Add backend plugin changes

* Fix totp backend plugin tests

* Fix logical/plugin InvalidateKey test

* Fix plugin catalog CRUD test, fix NoopBackend

* Clean up commented code block

* Fix system backend mount test

* Set plugin_name to omitempty, fix handleMountTable config parsing

* Clean up comments, keep shim connections alive until cleanup

* Include pluginClient, disallow LookupPlugin call from within a plugin

* Add wrapper around backendPluginClient for proper cleanup

* Add logger shim tests

* Add logger, storage, and system shim tests

* Use pointer receivers for system view shim

* Use plugin name if no path is provided on mount

* Enable plugins for auth backends

* Add backend type attribute, move builtin/plugin/package

* Fix merge conflict

* Fix missing plugin name in mount config

* Add integration tests on enabling auth backend plugins

* Remove dependency cycle on mock-plugin

* Add passthrough backend plugin, use logical.BackendType to determine lease generation

* Remove vault package dependency on passthrough package

* Add basic impl test for passthrough plugin

* Incorporate feedback; set b.backend after shims creation on backendPluginServer

* Fix totp plugin test

* Add plugin backends docs

* Fix tests

* Fix builtin/plugin tests

* Remove flatten from PluginRunner fields

* Move mock plugin to logical/plugin, remove totp and passthrough plugins

* Move pluginMap into newPluginClient

* Do not create storage RPC connection on HandleRequest and HandleExistenceCheck

* Change shim logger's Fatal to no-op

* Change BackendType to uint32, match UX backend types

* Change framework.Backend Setup signature

* Add Setup func to logical.Backend interface

* Move OptionallyEnableMlock call into plugin.Serve, update docs and comments

* Remove commented var in plugin package

* RegisterLicense on logical.Backend interface (#3017)

* Add RegisterLicense to logical.Backend interface

* Update RegisterLicense to use callback func on framework.Backend

* Refactor framework.Backend.RegisterLicense

* plugin: Prevent plugin.SystemViewClient.ResponseWrapData from getting JWTs

* plugin: Revert BackendType to remove TypePassthrough and related references

* Fix typo in plugin backends docs
2017-07-20 13:28:40 -04:00
Gobin Sougrakpam
638ef2c9b8 Adding option to set custom vault client timeout using env variable VAULT_CLIENT_TIMEOUT (#3022) 2017-07-18 09:48:31 -04:00
Seth Vargo
77fccbdd68
Do not double-convert to seconds 2017-07-11 16:06:50 -07:00
Seth Vargo
2fbb19285b Fix typo 2017-07-10 22:26:42 -07:00
Chris Hoffman
6034c9adc8 updating for TestCluster changes 2017-07-10 20:47:03 -07:00
Seth Vargo
c29e85125d
Fix doc 2017-07-07 17:15:43 -04:00
Seth Vargo
21a17b69c3
Use the core client 2017-07-07 17:14:49 -04:00
Seth Vargo
8f97e9b04d
Fix failing test 2017-07-07 17:14:49 -04:00
Seth Vargo
da9d57f5f1
Buffer doneCh 2017-07-07 17:14:49 -04:00
Seth Vargo
dfb6166cd8
Add configurable buffer size 2017-07-07 17:14:48 -04:00
Seth Vargo
54224b06dc
Do not block writing to doneCh if stopped 2017-07-07 17:14:48 -04:00
Seth Vargo
ce43621894
Make lock private 2017-07-07 17:14:48 -04:00
Seth Vargo
b2b9cdfdeb
Remove init() seed 2017-07-07 17:14:47 -04:00
Seth Vargo
8cdc0372b7
Fix vet errors 2017-07-07 17:14:47 -04:00
Seth Vargo
c0b2d41d8f
Allow a custom randomizer 2017-07-07 17:14:47 -04:00
Seth Vargo
437b8e71ab
Use Fatalf 2017-07-07 17:14:47 -04:00
Seth Vargo
3d74752524
Use a more heurstic function for calculating sleep backoff 2017-07-07 17:14:46 -04:00
Seth Vargo
a8fe164694
Seed the random generator 2017-07-07 17:14:46 -04:00
Seth Vargo
47260ed024
Move renewer integration tests into separate package 2017-07-07 17:14:46 -04:00
Seth Vargo
91a255bd2f
Use a separate package for API integration tests
This removes the cyclic dependency
2017-07-07 17:14:45 -04:00
Seth Vargo
de0250a66f
Send a more useful struct for renewal 2017-07-07 17:14:45 -04:00
Seth Vargo
f9465a8a5b
Reorg 2017-07-07 17:14:45 -04:00