diff --git a/vault/acl_test.go b/vault/acl_test.go index 1a19f077f6..827bda355f 100644 --- a/vault/acl_test.go +++ b/vault/acl_test.go @@ -238,6 +238,7 @@ func TestACL_PolicyMerge(t *testing.T) { {"deny/all", nil, map[string][]interface{}{"*": []interface{}{}, "test": []interface{}{}}}, {"deny/all1", nil, map[string][]interface{}{"*": []interface{}{}, "test": []interface{}{}}}, {"value/merge", map[string][]interface{}{"test": []interface{}{1, 2, 3, 4}}, map[string][]interface{}{"test": []interface{}{1, 2, 3, 4}}}, + {"value/empty", map[string][]interface{}{"empty": []interface{}{}}, map[string][]interface{}{"empty": []interface{}{}}}, } for _, tc := range tcases { @@ -528,6 +529,24 @@ path "value/merge" { "test" = [3, 4] } } +path "value/empty" { + policy = "write" + allowed_parameters = { + "empty" = [] + } + denied_parameters = { + "empty" = [1] + } +} +path "value/empty" { + policy = "write" + allowed_parameters = { + "empty" = [1] + } + denied_parameters = { + "empty" = [] + } +} ` //allow operation testing