VAULT-6371 Fix issue with lease quotas on read requests that generate leases (#15735)

* VAULT-6371 Fix issue with lease quotas on non-auth mounts

* VAULT-6371 Add changelog

* VAULT-6371 Amend changelog given new understanding
This commit is contained in:
Violet Hynes 2022-06-03 15:45:21 -04:00 committed by GitHub
parent 76bc7a25b8
commit d62b140b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

3
changelog/15735.txt Normal file
View File

@ -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
```

View File

@ -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()