Jeff Mitchell
ca55573d38
Strip empty strings from database revocation stmts ( #5955 )
...
* Strip empty strings from database revocation stmts
It's technically valid to give empty strings as statements to run on
most databases. However, in the case of revocation statements, it's not
only generally inadvisable but can lead to lack of revocations when you
expect them. This strips empty strings from the array of revocation
statements.
It also makes two other changes:
* Return statements on read as empty but valid arrays rather than nulls,
so that typing information is inferred (this is more in line with the
rest of Vault these days)
* Changes field data for TypeStringSlice and TypeCommaStringSlice such
that a client-supplied value of `""` doesn't turn into `[]string{""}`
but rather `[]string{}`.
The latter and the explicit revocation statement changes are related,
and defense in depth.
2018-12-14 09:12:26 -05:00
Calvin Leung Huang
334e43a646
Update field data behavior ( #5489 )
...
* Update Get and getPrimitive to correctly handle nil and error values
* Return empty slice on zero length decode result
2018-10-15 10:36:13 -07:00
Becca Petrin
13a2bb152e
Add a header type field ( #4993 )
2018-08-13 11:02:44 -07:00
Becca Petrin
d78934de05
Disallow negative TypeDurationSecond
( #4910 )
...
* add mount ttl helper
* disallow negative TypeDurationSecond values
2018-07-17 17:46:03 -07:00
Becca Petrin
b3a711d717
Add bound cidrs to tokens in AppRole ( #4680 )
2018-06-19 22:57:11 -04:00
Jim Kalafut
5d973885b4
Add TypeLowerCaseString ( #4683 )
2018-06-01 18:30:59 -07:00
Vishal Nayak
e2bb2ec3b9
Errwrap everywhere ( #4252 )
...
* package api
* package builtin/credential
* package builtin/logical
* package command
* package helper
* package http and logical
* package physical
* package shamir
* package vault
* package vault
* address feedback
* more fixes
2018-04-05 11:49:21 -04:00
Brian Kassouf
83a7d20b81
logical/framework: add a field data type for parsing integer arrays ( #4064 )
...
* logical/framework: add a field data type for parsing integer arrays
* Fix comment
* Add zero value
2018-03-02 15:01:13 -08:00
Jeff Mitchell
a43a854740
Support other names in SANs ( #3889 )
2018-02-16 17:19:34 -05:00
Chris Hoffman
92650358d6
Add TypeKVPairs field type ( #3535 )
2017-11-07 11:11:49 -05:00
Jeff Mitchell
d6fc971726
Add more TypeDurationSecond conversions
2017-08-02 18:12:02 -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
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
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
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
40d6be9b66
Added json.Number as recognized type for FieldData
2016-07-06 18:54:18 -04:00
vishalnayak
583c968971
Added GetDefaultOrZero method to FieldData
2016-06-10 10:42:01 -04:00
Jeff Mitchell
c2f74828a4
Fix up per-backend timing logic; also fix error in TypeDurationSecond in
...
GetOkErr.
2015-09-21 09:55:03 -04:00
Jeff Mitchell
aadf039368
Add DynamicSystemView. This uses a pointer to a pointer to always have
...
up-to-date information. This allows remount to be implemented with the
same source and dest, allowing mount options to be changed on the fly.
If/when Vault gains the ability to HUP its configuration, this should
just work for the global values as well.
Need specific unit tests for this functionality.
2015-09-10 15:09:54 -04:00
Caleb Tennis
d8d76a5304
Add a validation step in field data to error more quickly vs. allowing panics to happen when we go to get the data and convert it
2015-08-11 12:34:14 -04:00
Armon Dadgar
9515bf32de
logical/framework: handle nil duration value. Fixes #408
2015-07-08 16:55:52 -06:00
Armon Dadgar
dcb45874bf
logical/framework: adding a new duration type to convert to seconds
2015-06-17 15:56:26 -07:00
Armon Dadgar
2ab45f5787
logical/framework: Adding TypeMap
2015-03-31 16:45:08 -07:00
Mitchell Hashimoto
12566c645c
logical/framework, logical/testing
2015-03-15 16:39:49 -07:00