diff --git a/changelog/15735.txt b/changelog/15735.txt new file mode 100644 index 000000000..3dd6600e3 --- /dev/null +++ b/changelog/15735.txt @@ -0,0 +1,3 @@ +```release-note:bug +quotas/lease-count: Fix lease-count quotas on mounts not properly being enforced when the lease generating request is a read +``` diff --git a/vault/request_handling.go b/vault/request_handling.go index e7f679231..7494403ed 100644 --- a/vault/request_handling.go +++ b/vault/request_handling.go @@ -493,6 +493,10 @@ func (c *Core) handleCancelableRequest(ctx context.Context, req *logical.Request return nil, err } + // MountPoint will not always be set at this point, so we ensure the req contains it + // as it is depended on by some functionality (e.g. quotas) + req.MountPoint = c.router.MatchingMount(ctx, req.Path) + // Decrement the wait group when our request is done if waitGroup != nil { defer waitGroup.Done()