Pass effective paths through configuration loading
This commit is contained in:
@@ -53,7 +53,7 @@ func secretProviderPath(path configkit.Path) bool {
|
||||
return false
|
||||
}
|
||||
parts := strings.Split(strings.TrimPrefix(pointer, "/"), "/")
|
||||
if len(parts) < 4 || (parts[0] != "backends" && parts[0] != "profiles") || parts[2] != "extra_params" {
|
||||
if !providerExtraParamsPath(parts) {
|
||||
return false
|
||||
}
|
||||
key := strings.ToLower(strings.ReplaceAll(strings.ReplaceAll(parts[len(parts)-1], "~1", "/"), "~0", "~"))
|
||||
@@ -64,3 +64,8 @@ func secretProviderPath(path configkit.Path) bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func providerExtraParamsPath(parts []string) bool {
|
||||
return len(parts) >= 4 && parts[1] != "" &&
|
||||
(parts[0] == "backends" || parts[0] == "profiles") && parts[2] == "extra_params"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user