Commit Graph

61 Commits

Author SHA1 Message Date
Vishal Nayak
93c5d288d2
avoid empty group alias names (#3567) 2017-11-10 16:51:37 -05:00
Vishal Nayak
66642a0935
External identity groups (#3447)
* external identity groups

* add local LDAP groups as well to group aliases

* add group aliases for okta credential backend

* Fix panic in tests

* fix build failure

* remove duplicated struct tag

* add test steps to test out removal of group member during renewals

* Add comment for having a prefix check in router

* fix tests

* s/parent_id/canonical_id

* s/parent/canonical in comments and errors
2017-11-02 16:05:48 -04:00
Jeff Mitchell
cd6d67d84b Final sync 2017-10-23 17:39:21 -04:00
Vishal Nayak
605182d0f4 add entity aliases from credential backends (#3457) 2017-10-15 15:13:12 -04:00
Jeff Mitchell
79b63deaf5 Change auth helper interface to api.Secret. (#3263)
This allows us to properly handle wrapped responses.

Fixes #3217
2017-08-31 16:57:00 -04:00
Calvin Leung Huang
dd72c96dc8 Add BackendType to existing backends (#3078) 2017-07-28 14:04:46 -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
Jeff Mitchell
a2a0b44d79 Use the oauth2 context ability to specify a clean http client. (#2808)
Hopefully fixes #2793
2017-06-05 12:27:01 -04:00
emily
38ffde5a9d add gofmt checks to Vault and format existing code (#2745) 2017-05-19 08:34:17 -04:00
Jeff Mitchell
4045c1791e Fix github compile breakage after dep upgrade 2017-02-24 15:32:05 -05:00
Brian Rodgers
2615412734 Added a nil check for config and renamed org field internally. 2017-01-11 11:04:15 -06:00
Brian Rodgers
5a6baeaca3 Added a 'read' for github config 2017-01-10 18:21:31 -06:00
Daniel Somerfield
c1d2dd5fb9 Added support for individual user policy mapping in github auth backend. (#2079) 2016-11-10 16:21:14 -05:00
Jeff Mitchell
e364221122 Fix GitHub tests 2016-11-08 07:13:42 -05:00
Jeff Mitchell
c748ff322f Change default TTL from 30 to 32 to accommodate monthly operations (#1942) 2016-09-28 18:32:49 -04:00
Jeff Mitchell
68345eb770 Convert to logxi 2016-08-21 18:13:37 -04:00
Jeff Mitchell
c3e38d4b29 Fix up breakage from bumping deps 2016-06-30 14:31:41 -04:00
vishalnayak
cfe0aa860e Backend() functions should return 'backend' objects.
If they return pointers to 'framework.Backend' objects, the receiver functions can't be tested.
2016-06-10 15:53:02 -04:00
vishalnayak
4e38509ac2 s/VAULT_GITHUB_AUTH_TOKEN/VAULT_AUTH_GITHUB_TOKEN 2016-06-09 14:00:56 -04:00
Jeff Mitchell
ed82efbccc Merge pull request #1510 from hashicorp/fix-gh-renew-panic
Fix panic when renewing a github token from a previous version of Vault
2016-06-09 13:54:20 -04:00
Jeff Mitchell
6c76bcd3b6 xInt->xRaw 2016-06-09 13:54:04 -04:00
vishalnayak
0bea4ff7ff Added VAULT_GITHUB_AUTH_TOKEN env var to receive GitHub auth token 2016-06-09 13:45:56 -04:00
Jeff Mitchell
99235e83c7 Fix panic when renewing a github token from a previous version of Vault 2016-06-09 13:37:09 -04:00
vishalnayak
80faa2f4ed s/logical.ErrorResponse/fmt.Errorf in renewal functions of credential backends 2016-05-26 10:21:03 -04:00
vishalnayak
0481976696 Split SanitizeTTL method to support time.Duration parameters as well 2016-05-05 09:45:48 -04:00
Jeff Mitchell
e198037788 Make GitHub org comparison case insensitive.
Fixes #1359
2016-05-02 00:18:31 -04:00
vishalnayak
5f1829af67 Utility Enhancements 2016-04-05 20:32:59 -04:00
vishalnayak
ac5ceae0bd Added AcceptanceTest boolean to logical.TestCase 2016-04-05 15:10:44 -04:00
Jeff Mitchell
7ce9701800 Properly check for policy equivalency during renewal.
This introduces a function that compares two string policy sets while
ignoring the presence of "default" (since it's added by core, not the
backend), and ensuring that ordering and/or duplication are not failure
conditions.

Fixes #1256
2016-03-24 09:41:51 -04:00
Nathan Grunzweig
3a98f99aa7 fix github tests to use the provided GITHUB_ORG environment variable
(tests fail for non hashicorp people)
2016-03-09 15:34:03 +02:00
Jeff Mitchell
6018c88708 Remove root token requirement from GitHub configuration 2016-02-25 08:51:53 -05:00
vishalnayak
3b6ea0c3cb Github renewal enhancement 2016-02-11 20:42:42 -05:00
Jeff Mitchell
2eb08d3bde Make backends much more consistent:
1) Use the new LeaseExtend
2) Use default values controlled by mount tuning/system defaults instead
of a random hard coded value
3) Remove grace periods
2016-01-29 20:03:37 -05:00
Jeff Mitchell
45e32756ea WriteOperation -> UpdateOperation 2016-01-08 13:03:03 -05:00
Jeff Mitchell
5c0a16b16a Use cleanhttp instead of bare http.Client 2015-10-22 14:37:12 -04:00
Jeff Mitchell
0dbbef1ac0 Don't use http.DefaultClient
This strips out http.DefaultClient everywhere I could immediately find
it. Too many things use it and then modify it in incompatible ways.

Fixes #700, I believe.
2015-10-15 17:54:00 -04:00
vishalnayak
e47b2838a0 Added a test case. Removed setting of defaultTTL in config. 2015-10-03 15:36:57 -04:00
vishalnayak
d30beea4db Added testcases for config writes 2015-10-02 22:10:51 -04:00
vishalnayak
e89cf4d4bc Use SanitizeTTL in credential request path instead of config 2015-10-02 15:41:35 -04:00
vishalnayak
bf017d28d1 Github backend: enable auth renewals 2015-10-02 13:33:19 -04:00
Jeff Mitchell
59a3f6b5d2 Add a static system view to github credential backend to fix acceptance tests 2015-09-29 18:55:59 -07:00
Jeff Mitchell
06f7fb5dc3 Add base_url option to GitHub auth provider to allow selecting a custom endpoint. Fixes #572. 2015-08-28 06:28:43 -07:00
Erik Kristensen
ce17751f4c reimplements #459 2015-08-09 11:25:45 -06:00
Erik Kristensen
5ca2816084 remove newline 2015-08-03 16:34:24 -06:00
Erik Kristensen
2c9f2d5673 fix bug #488 2015-08-03 15:47:30 -06:00
Raymond Pete
5b1db50733 name slug check 2015-07-26 22:21:16 -04:00
Armon Dadgar
6a9dc00e57 Remove SetLogger, and unify on framework.Setup 2015-06-30 17:45:20 -07:00
Armon Dadgar
22f543f837 Updating for backend API change 2015-06-30 17:36:12 -07:00
Mitchell Hashimoto
a98c07855b credential/github: get rid of stray tab 2015-06-16 10:05:51 -07:00
Mitchell Hashimoto
dcc84749d1 command/auth, github: improve cli docs
/cc @sethvargo
2015-06-16 10:05:11 -07:00