open-vault/logical/framework
Jeff Mitchell cb1a686e3b
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
..
testdata Framework and API changes to support OpenAPI (#5546) 2018-11-05 12:24:39 -08:00
backend.go Framework and API changes to support OpenAPI (#5546) 2018-11-05 12:24:39 -08:00
backend_test.go Framework and API changes to support OpenAPI (#5546) 2018-11-05 12:24:39 -08:00
field_data.go Strip empty strings from database revocation stmts (#5955) 2018-12-14 09:12:26 -05:00
field_data_test.go Strip empty strings from database revocation stmts (#5955) 2018-12-14 09:12:26 -05:00
field_type.go Add a header type field (#4993) 2018-08-13 11:02:44 -07:00
lease.go Core handling of TTLs (#4230) 2018-04-03 12:20:20 -04:00
lease_test.go Core handling of TTLs (#4230) 2018-04-03 12:20:20 -04:00
openapi.go Add operationId field to OpenAPI output (#5876) 2018-12-12 13:59:23 -08:00
openapi_test.go Update OpenAPI path parsing of alternation parameters (#5710) 2018-11-06 15:04:30 -08:00
path.go Framework and API changes to support OpenAPI (#5546) 2018-11-05 12:24:39 -08:00
path_map.go
path_map_test.go
path_struct.go
path_struct_test.go
path_test.go Framework and API changes to support OpenAPI (#5546) 2018-11-05 12:24:39 -08:00
policy_map.go
policy_map_test.go
secret.go
secret_test.go
template.go Errwrap everywhere (#4252) 2018-04-05 11:49:21 -04:00
testing.go
wal.go
wal_test.go