open-vault/sdk/logical
John-Michael Faircloth 2abf916ddb
Add support to parameterize unauthenticated paths (#12668)
* store unauthenticated path wildcards in map

* working unauthenticated paths with basic unit tests

* refactor wildcard logic

* add parseUnauthenticatedPaths unit tests

* use parseUnauthenticatedPaths when reloading backend

* add more wildcard test cases

* update special paths doc; add changelog

* remove buggy prefix check; add test cases

* prevent false positives for prefix matches

If we ever encounter a mismatched segment, break and set a flag to
prevent false positives for prefix matches.

If it is a match we need to do a prefix check. But we should not return
unless HasPrefix also evaluates to true. Otherwise we should let the for
loop continue to check other possibilities and only return false once
all wildcard paths have been evaluated.

* refactor switch and add more test cases

* remove comment leftover from debug session

* add more wildcard path validation and test cases

* update changelong; feature -> improvement

* simplify wildcard segment matching logic

* refactor wildcard matching into func

* fix glob matching, add more wildcard validation, refactor

* refactor common wildcard errors to func

* move doc comment to logical.Paths

* optimize wildcard paths storage with pre-split slices

* fix comment typo

* fix test case after changing wildcard paths storage type

* move prefix check to parseUnauthenticatedPaths

* tweak regex, remove unneeded array copy, refactor

* add test case around wildcard and glob matching
2021-10-13 11:51:20 -05:00
..
audit.go Allow plugins to submit audit requests/responses via extended SystemView (#6777) 2019-05-22 18:52:53 -04:00
auth.go Tokenhelper v2 (#6662) 2019-06-14 10:17:04 -04:00
connection.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
controlgroup.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
error.go [VAULT-2852] deprecate req counters in oss (#12197) 2021-07-29 10:21:40 -07:00
identity.pb.go Update protobuf & grpc libraries and protoc plugins (#12679) 2021-09-29 18:25:15 -07:00
identity.proto Add Custom metadata field to alias (#12502) 2021-09-17 11:03:47 -07:00
lease.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
lease_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
logical.go Add support to parameterize unauthenticated paths (#12668) 2021-10-13 11:51:20 -05:00
logical_storage.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
plugin.pb.go Add Custom metadata field to alias (#12502) 2021-09-17 11:03:47 -07:00
plugin.proto Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
request.go Reorganize request handling code so that we don't touch storage until we have the stateLock. (#11835) 2021-06-11 13:18:16 -04:00
response.go Add a new "vault monitor" command (#8477) 2020-05-21 13:07:50 -07:00
response_util.go [VAULT-2852] deprecate req counters in oss (#12197) 2021-07-29 10:21:40 -07:00
response_util_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
secret.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
storage.go Exit ScanView if context has been cancelled (#7419) 2019-09-04 09:18:19 -04:00
storage_inmem.go Add user configurable password policies available to secret engines (#8637) 2020-05-27 12:28:00 -06:00
storage_inmem_test.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
storage_test.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
storage_view.go Run a more strict formatter over the code (#11312) 2021-04-08 09:43:39 -07:00
system_view.go Move sdk/helper/random -> helper/random (#9226) 2020-06-17 14:24:38 -06:00
testing.go Revert "Vault Dependency Upgrades [VAULT-871] (#10903)" (#10939) 2021-02-18 15:40:18 -05:00
token.go Adds ability to define an inline policy and internal metadata on tokens (#12682) 2021-10-07 10:36:22 -07:00
token_test.go sdk/logical: handle empty token type string values as TokenTypeDefault (#7273) 2019-08-14 09:45:40 -04:00
translate_response.go Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00