Commit Graph

129 Commits

Author SHA1 Message Date
Chris Hoffman
92650358d6
Add TypeKVPairs field type (#3535) 2017-11-07 11:11:49 -05:00
Vishal Nayak
2994b26194
Handle 'not supplied' case for field type TypeNameString (#3546)
* Fix panic if value is not supplied for variables of TypeNameString

* Add tests for 'not supplied' case of all field types
2017-11-07 10:59:57 -05:00
Jeff Mitchell
9cedc9aecc Fix some merge/update bugs 2017-10-23 16:49:46 -04:00
Jeff Mitchell
98168dc791 Sync over 2017-10-23 16:43:07 -04:00
Jeff Mitchell
d6fc971726 Add more TypeDurationSecond conversions 2017-08-02 18:12:02 -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
Chris Hoffman
fab73e1f7a fixing Validate() for field data on TypeNameString (#3030) 2017-07-17 13:44:47 -07:00
Chris Hoffman
508183a1b3 Add field type TypeNameString (#3028) 2017-07-17 11:39:58 -07:00
Jeff Mitchell
8a88e37f2b Add string slice with single value test function 2017-06-14 14:20:37 -04:00
Jeff Mitchell
e5e6f0fc52 Automatically upgrade values to salted on access if salt exists in PathMap (#2831) 2017-06-07 15:22:08 -04:00
Jeff Mitchell
eb0e7cd0d2 Don't write salts in initialization, look up on demand (#2702) 2017-05-09 17:51:09 -04:00
Jeff Mitchell
5815fc2627 Add salt mutex to app-id (#2690) 2017-05-08 16:15:24 -04:00
Chris Hoffman
8efdae67e5 List Handling in API and CLI (#2584) 2017-04-18 16:02:31 -04:00
Jeff Mitchell
df575f0b3a Rename helper 'duration' to 'parseutil'. (#2449)
Add a ParseBool function that accepts various kinds of ways of
specifying booleans.

Have config use ParseBool for UI and disabling mlock/cache.
2017-03-07 11:21:22 -05:00
Jeff Mitchell
de87216a04 Fix framework test on int64 with default durationsecond set 2017-02-18 13:53:23 -05:00
Jeff Mitchell
476446e24d Fix TypeDurationSecond to not panic at runtime if the given default is a string (#2396)
Fix TypeDurationSecond to not panic at runtime if the given default is a string.

Fixes #myownannoyance
2017-02-17 17:25:53 -05:00
Jeff Mitchell
9cbfd2976a Port over some work to make the system views a bit nicer 2017-01-13 14:51:27 -05:00
Brian Rodgers
edee04feb6 Support LIST on auth/github/map/teams and /users 2017-01-11 15:09:01 -06:00
Armon Dadgar
745df0a88c Adding interface methods to logical.Backend for parity (#2242) 2017-01-07 18:18:22 -05:00
Justin Carter
23be7d8ab4 Support for 1 and 2 char names in GenericNameRegex 2016-08-30 19:37:52 +02:00
Jeff Mitchell
68345eb770 Convert to logxi 2016-08-21 18:13:37 -04:00
vishalnayak
ddb6ae18a0 Fix invalid input getting marked as internal error 2016-07-28 16:23:11 -04:00
vishalnayak
5b458db104 Merge branch 'master-oss' into json-use-number
Conflicts:
	http/handler.go
	logical/framework/field_data.go
	logical/framework/wal.go
	vault/logical_passthrough.go
2016-07-15 19:21:55 -04:00
Vishal Nayak
e5a6a5e758 Merge pull request #1599 from hashicorp/use-go-uuid
Use go-uuid's GenerateUUID in PutWAL and discard logical.UUID()
2016-07-13 11:36:28 -06:00
Vishal Nayak
64bdeec926 Merge pull request #1607 from hashicorp/standardize-time
Remove redundant invocations of UTC() call on `time.Time` objects
2016-07-13 10:19:23 -06:00
vishalnayak
9f208ae8f2 Revert 'risky' changes 2016-07-12 16:38:07 -04:00
Jeff Mitchell
58efdcba47 Return a duration instead and port a few other places to use it 2016-07-11 18:19:35 +00:00
Jeff Mitchell
984641af21 Factor out parsing duration second type and use it for parsing tune values too 2016-07-11 17:53:39 +00:00
vishalnayak
f59a69bc52 Remove Unix() invocations on 'time.Time' objects and removed conversion of time to UTC 2016-07-08 18:30:18 -04:00
vishalnayak
35cbe22f56 Use go-uuid's GenerateUUID in PutWAL and discart logical.UUID() 2016-07-07 17:57:36 -04:00
vishalnayak
40d6be9b66 Added json.Number as recognized type for FieldData 2016-07-06 18:54:18 -04:00
vishalnayak
ef97199360 Added JSON Decode and Encode helpers.
Changed all the occurances of Unmarshal to use the helpers.
Fixed http/ package tests.
2016-07-06 12:25:40 -04:00
vishalnayak
583c968971 Added GetDefaultOrZero method to FieldData 2016-06-10 10:42:01 -04:00
Sean Chittenden
339c0a4127
Speling police 2016-05-15 09:58:36 -07:00
vishalnayak
116e2cf024 Fix framework rollback manager tests 2016-05-14 19:35:36 -04:00
Jeff Mitchell
50e3f7d40e Merge remote-tracking branch 'origin/master' into aws-auth-backend 2016-05-05 10:04:52 -04:00
vishalnayak
0481976696 Split SanitizeTTL method to support time.Duration parameters as well 2016-05-05 09:45:48 -04:00
vishalnayak
4f46bbaa32 Added cooldown period for periodic tidying operation 2016-04-26 10:22:29 -04:00
vishalnayak
81e4235fc0 Support periodic tidy callback and config endpoints. 2016-04-26 10:22:29 -04:00
Seth Vargo
ff0366f6fe Only show params if there are fields 2016-04-13 22:15:06 +01:00
vishalnayak
daab5d6777 Fix SanitizeTTL check 2016-03-16 14:27:01 -04:00
vishalnayak
5556b35d01 Accept params both as part of URL or as part of http body 2016-03-14 19:14:36 -04:00
Jeff Mitchell
ceeb47c9c9 Make SanitizeTTL treat an empty string the same as a "0" string.
This causes a 0 TTL to be returned for the value, which is a clue to
other parts of Vault to use appropriate defaults. However, this makes
the defaults be used at lease allocation or extension time instead of
when parsing parameters.
2016-02-18 16:51:36 -05:00
Jeff Mitchell
c60a9cd130 Remove grace periods 2016-01-31 19:33:16 -05:00
Jeff Mitchell
c4c170555a invert logic to prefer client increment 2016-01-29 20:02:15 -05:00
Jeff Mitchell
8a5bf09c49 Update proposed time 2016-01-29 19:31:37 -05:00
Jeff Mitchell
bde65134e6 Adjust framework unit tests for new LeaseExtend 2016-01-29 19:31:37 -05:00
Jeff Mitchell
0e15ac04c6 Update LeaseExtend 2016-01-29 19:31:37 -05:00
Jeff Mitchell
45b96ed140 Address some more review feedback 2016-01-12 15:09:16 -05:00
Jeff Mitchell
f3ef23318d Create more granular ACL capabilities.
This commit splits ACL policies into more fine-grained capabilities.
This both drastically simplifies the checking code and makes it possible
to support needed workflows that are not possible with the previous
method. It is backwards compatible; policies containing a "policy"
string are simply converted to a set of capabilities matching previous
behavior.

Fixes #724 (and others).
2016-01-08 13:05:14 -05:00