mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
Add config value that gives users options to skip calculating role for each lease (#22651)
* Add config value that gives users options to skip calculating role for each lease * add changelog * change name * add config for testing * Update changelog/22651.txt Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com> * update tests, docs and reorder logic in conditional * fix comment * update comment * fix comment again * Update comments and change if order * change comment again * add other comment * fix tests * add documentation * edit docs * Update http/util.go Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com> * Update vault/core.go * Update vault/core.go * update var name * udpate docs * Update vault/request_handling.go Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com> * 1 more docs change --------- Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com> Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
This commit is contained in:
@@ -67,6 +67,8 @@ func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler
|
||||
NamespacePath: ns.Path,
|
||||
ClientAddress: parseRemoteIPAddress(r),
|
||||
}
|
||||
|
||||
// This checks if any role based quota is required (LCQ or RLQ).
|
||||
requiresResolveRole, err := core.ResolveRoleForQuotas(r.Context(), quotaReq)
|
||||
if err != nil {
|
||||
core.Logger().Error("failed to lookup quotas", "path", path, "error", err)
|
||||
|
||||
Reference in New Issue
Block a user