Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 808791
Collapse All | Expand All

(-)a/app-admin/vault/Manifest (-2 / +12 lines)
Lines 1-3 Link Here
1
AUX localhost.json.example 130 BLAKE2B c2af154a798286daae8a1804c698a8a8437bb4fbf2c9e928bd8ebd2cc846a7887058695f3715a4e3b9c82232529fe053b40d52fd98fd6b6c4018fbb2009a7da0 SHA512 9f9bc222f3716942b7423fa2ab14afd1d516bf3f3170b7418a75b970a33341426e13f89cf331a5e25bd3159dcbb435e20e75a0c9109e767e67bf777a7dbcd182
2
AUX vault-1.8.2-go-limiter.patch 10588 BLAKE2B 597b3edd7e98d36d34123ae5352bc8894df40962afc1721c87b53cd2baa459ae1a9545d5830ea31c46549a38e713157dd920292ede19c4a4e4b4c75e5a605038 SHA512 ae8134f2cd743188e4f7be06ee8f816456613c177cd56b311fd1ad0cae6106180b85c56381da866afd31ccf7e4d5b1c9239f148d2b18dae2dfcea3c08c74d0f7
3
AUX vault.confd 243 BLAKE2B 6598fa2138c4ca94fdd6b7a02048ee4a4eb2b37d17b8a065ae2f29ac183bd1473de37107b2e141b74933c1b14502cdaaaebe493ee71ad6c9141a889c6e73b977 SHA512 395d823dee49fed30d99fea1fcd1b0c1c3ae2bfd806fa0c169aa14d83a594d224f8966870799a3740a7e52f039616efe78834e0522e7a2802c7df4c56b3bbdd2
4
AUX vault.initd 573 BLAKE2B 444541b8912910cf6b5d038e466e18baebb7dfd2905d802217baf9e861bb7f2a3e032716545c74e269782aa420fbd052745322576b4bcb8c4cf53ba07471b261 SHA512 11124e6fc656977c20b55b578e30fd76b8f6905760c2f17f93b960a317975f1914c6bd8d4ffd3741ba405bfe5aa0cecb68067f8ce52b2df9015863d31f9a7aad
5
AUX vault.logrotated 83 BLAKE2B 63b106e949f8a2da0ca97f1d07732fdea4dafbe44cb97ea81074472b95489d179deccd14f4d4176043f488f2be68b96dc6bee20748fe68f650d70fd32078d2bd SHA512 83d73760d85dbb731652aa5936d2780208ac4643e975538652f53b49305d024df6d72a8a06d82f430982b07cf940b2fd69f9a6eedb39d380136c8e5bfda280e5
6
AUX vault.service 677 BLAKE2B 0d9c6636c841ff33fa38afca10f10c62d273dc1c6419e35e2fa844472de0c963e177c80a6db3e95230db6f641ab50148843085cb4f141fa2dd2765aecf8457d3 SHA512 15951d095181fb1b1a5f79e0f385bdb96812a517ea59e05017141a29ed880d0e6f29d377e7c4bc53d5b70175122785a39923297b8e3304fc46a63835d2d2ec50
1
DIST bazil.org%2Ffuse%2F@v%2Fv0.0.0-20160811212531-371fbbdaa898.mod 22 BLAKE2B c2b56c0b043a2c0225c3b4142f179a2d2e4938dad64b95c8662a6d641e69a455b50ed79c66a3bcc10982792d3b7742ac96a2d74eefa7fec40a7c3146e5c949cd SHA512 7b3ef87f98485bb9ec325680f57d43a9bd76e90bdcfb1e798458f28f7d3addf91dbb6a07b654749468860981413ad2267df2d5f3535c85579e9f79d9328d355c
7
DIST bazil.org%2Ffuse%2F@v%2Fv0.0.0-20160811212531-371fbbdaa898.mod 22 BLAKE2B c2b56c0b043a2c0225c3b4142f179a2d2e4938dad64b95c8662a6d641e69a455b50ed79c66a3bcc10982792d3b7742ac96a2d74eefa7fec40a7c3146e5c949cd SHA512 7b3ef87f98485bb9ec325680f57d43a9bd76e90bdcfb1e798458f28f7d3addf91dbb6a07b654749468860981413ad2267df2d5f3535c85579e9f79d9328d355c
2
DIST cloud.google.com%2Fgo%2F@v%2Fv0.26.0.mod 27 BLAKE2B 814b0fa8f12d5ce6171fa629b5a7eb34e0e882cc0c5430986896bb38c243e08dc83098f271227f4ba019e78f16dc97fbb381e833aff1819833d243b08add916b SHA512 5132f3438533427c0ab0fbb7a12112a7830ea9122662ed46019ff89c71d9cf80c02edc32dd5c892da572031b5a2cce100f2602fa6a19bea6be7c02781f701273
8
DIST cloud.google.com%2Fgo%2F@v%2Fv0.26.0.mod 27 BLAKE2B 814b0fa8f12d5ce6171fa629b5a7eb34e0e882cc0c5430986896bb38c243e08dc83098f271227f4ba019e78f16dc97fbb381e833aff1819833d243b08add916b SHA512 5132f3438533427c0ab0fbb7a12112a7830ea9122662ed46019ff89c71d9cf80c02edc32dd5c892da572031b5a2cce100f2602fa6a19bea6be7c02781f701273
3
DIST cloud.google.com%2Fgo%2F@v%2Fv0.34.0.mod 27 BLAKE2B 814b0fa8f12d5ce6171fa629b5a7eb34e0e882cc0c5430986896bb38c243e08dc83098f271227f4ba019e78f16dc97fbb381e833aff1819833d243b08add916b SHA512 5132f3438533427c0ab0fbb7a12112a7830ea9122662ed46019ff89c71d9cf80c02edc32dd5c892da572031b5a2cce100f2602fa6a19bea6be7c02781f701273
9
DIST cloud.google.com%2Fgo%2F@v%2Fv0.34.0.mod 27 BLAKE2B 814b0fa8f12d5ce6171fa629b5a7eb34e0e882cc0c5430986896bb38c243e08dc83098f271227f4ba019e78f16dc97fbb381e833aff1819833d243b08add916b SHA512 5132f3438533427c0ab0fbb7a12112a7830ea9122662ed46019ff89c71d9cf80c02edc32dd5c892da572031b5a2cce100f2602fa6a19bea6be7c02781f701273
Lines 1120-1127 DIST github.com%2Fsean-%2Fconswriter%2F@v%2Fv0.0.0-20180208195008-f5ae3917a627.m Link Here
1120
DIST github.com%2Fsean-%2Fpager%2F@v%2Fv0.0.0-20180208200047-666be9bf53b5.mod 30 BLAKE2B 77431281d4cec52a254453afe8c7438154b0ecae0116ba085401536adc1f71f6a7eea8b0e2181893b004d805e3ff8b3a7f212ac82e41877cd08c2cf0fc47af05 SHA512 5101454134688f96467dbbdf475b1d9bd9e446c29eb2cd04b85430ea0130c09dcbd8141d5ca0d63e63b74349c3dbf59d978ef2115a03c920ff2abfad10fe9a62
1126
DIST github.com%2Fsean-%2Fpager%2F@v%2Fv0.0.0-20180208200047-666be9bf53b5.mod 30 BLAKE2B 77431281d4cec52a254453afe8c7438154b0ecae0116ba085401536adc1f71f6a7eea8b0e2181893b004d805e3ff8b3a7f212ac82e41877cd08c2cf0fc47af05 SHA512 5101454134688f96467dbbdf475b1d9bd9e446c29eb2cd04b85430ea0130c09dcbd8141d5ca0d63e63b74349c3dbf59d978ef2115a03c920ff2abfad10fe9a62
1121
DIST github.com%2Fsean-%2Fseed%2F@v%2Fv0.0.0-20170313163322-e2103e2c3529.mod 29 BLAKE2B 8f509981164937fb0aab63b0344ddbf25c183b926a6e87400e745f6aee9dcc478f0ed455c62a9753722954acb3506be5f7810915a15d03647668e7bb707c09c0 SHA512 c7dc34c7a73c5899ca207c0cac88dd38ddebaffa04b5dd511a86dd10160e60be2806dfc6e079a5871b0cb6142f53d7d7dc87ddbe3fb19240bf894430feac5875
1127
DIST github.com%2Fsean-%2Fseed%2F@v%2Fv0.0.0-20170313163322-e2103e2c3529.mod 29 BLAKE2B 8f509981164937fb0aab63b0344ddbf25c183b926a6e87400e745f6aee9dcc478f0ed455c62a9753722954acb3506be5f7810915a15d03647668e7bb707c09c0 SHA512 c7dc34c7a73c5899ca207c0cac88dd38ddebaffa04b5dd511a86dd10160e60be2806dfc6e079a5871b0cb6142f53d7d7dc87ddbe3fb19240bf894430feac5875
1122
DIST github.com%2Fsean-%2Fseed%2F@v%2Fv0.0.0-20170313163322-e2103e2c3529.zip 4415 BLAKE2B f50a9fd1f74506625ae9460c6071bbbd1dd3ad3d83264fb7def028c757e8ad8f865fc7255db6e9b5cdb7a1744ac1f741bc6184f064eee7108f6fc0facc81f639 SHA512 acd19ece301ac146ae50dd784e3dc1c2cbc0c00a562fc5d2759b7b8a4acf0b5bf83d5bcd54122130877a1568a13709c28ab7e1cc7ba269ec91aa1b1a86c2065a
1128
DIST github.com%2Fsean-%2Fseed%2F@v%2Fv0.0.0-20170313163322-e2103e2c3529.zip 4415 BLAKE2B f50a9fd1f74506625ae9460c6071bbbd1dd3ad3d83264fb7def028c757e8ad8f865fc7255db6e9b5cdb7a1744ac1f741bc6184f064eee7108f6fc0facc81f639 SHA512 acd19ece301ac146ae50dd784e3dc1c2cbc0c00a562fc5d2759b7b8a4acf0b5bf83d5bcd54122130877a1568a13709c28ab7e1cc7ba269ec91aa1b1a86c2065a
1123
DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.3.0.mod 48 BLAKE2B 33ddfe8d645092d307c8b8acd8b1c0c8c0c91224a6b0eb3bac20d707be49acc3d437cf00d341d4d37857a9ac4b5303d1df717d2a46ce717941ab7eedbfd133bd SHA512 4266c966fbdba482455fdd13f37891847cff194d1a6d169be35167b729c6e36e9517d72c5a5fda048d8465ada31927b0f3d00fe455e5339c554829e7fb914d2a
1129
DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.7.1.mod 48 BLAKE2B 33ddfe8d645092d307c8b8acd8b1c0c8c0c91224a6b0eb3bac20d707be49acc3d437cf00d341d4d37857a9ac4b5303d1df717d2a46ce717941ab7eedbfd133bd SHA512 4266c966fbdba482455fdd13f37891847cff194d1a6d169be35167b729c6e36e9517d72c5a5fda048d8465ada31927b0f3d00fe455e5339c554829e7fb914d2a
1124
DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.3.0.zip 32198 BLAKE2B d779ed09d9e00d6ff18be20b48068a1877d623070d2f74bebb6816d3a139b311276caf8f3f3099a6b6940e8d5ddaaae07719fb86f117f9ec987483b1573561d5 SHA512 35f0ae21b2af7e125e4c18a36a0c6695b024f9f53facf6f025c71237cd12658cd507d05b6d8e8249c53477b56ed7c8e0a960232715e7243da2a3f00d6dcdcd68
1130
DIST github.com%2Fsethvargo%2Fgo-limiter%2F@v%2Fv0.7.1.zip 24454 BLAKE2B 4958546c0be405c760d03db84554b582ae770c08893c1dd77445f655d76714a93a5c1f2a9d5cc9590564002df9c6e81eafc2d44082c6da50a0f2ef18152e1d17 SHA512 e303b4042ed3f18743bc0d11700c40e5661a32472802dd1a5f9cd4131d520c774dd98cd62c056b6bf45739600cea5cb6052eb02a113fb091316cf1c11b5c819b
1125
DIST github.com%2Fshirou%2Fgopsutil%2F@v%2Fv3.21.5+incompatible.mod 34 BLAKE2B 790ec7277e4654961540dd09fcb7962328547009b0181183b7cb64972b872d30986d1e53ded5961588d89508c913b2b56dd7af3625d0e8d7be2253b6bcf59576 SHA512 a5f5d88a767a855b6ff24d7e2e0c4aeb81fb1365a7e81ed989b4c605a7a6c61dc52d7ce97fc672c21020ef56f597dce679184e5e8d3d199678487e6bebaa8127
1131
DIST github.com%2Fshirou%2Fgopsutil%2F@v%2Fv3.21.5+incompatible.mod 34 BLAKE2B 790ec7277e4654961540dd09fcb7962328547009b0181183b7cb64972b872d30986d1e53ded5961588d89508c913b2b56dd7af3625d0e8d7be2253b6bcf59576 SHA512 a5f5d88a767a855b6ff24d7e2e0c4aeb81fb1365a7e81ed989b4c605a7a6c61dc52d7ce97fc672c21020ef56f597dce679184e5e8d3d199678487e6bebaa8127
1126
DIST github.com%2Fshirou%2Fgopsutil%2F@v%2Fv3.21.5+incompatible.zip 257791 BLAKE2B d0c44078120582d20e3c3eb60d0ecfc2c8547323ea68eddaffee5614243b4410518eabaf0c17b24351cd269d85bfc5f32151bcb56680793682a17b61e8881204 SHA512 c2d405ad66b1e3d6860ef21dacb6b7f0a5daef57267c32773cb26ea9983ba75df39e6b3ab5bc97c4c0eb133e17eb587a565da30d89139982fd90102765d27ca9
1132
DIST github.com%2Fshirou%2Fgopsutil%2F@v%2Fv3.21.5+incompatible.zip 257791 BLAKE2B d0c44078120582d20e3c3eb60d0ecfc2c8547323ea68eddaffee5614243b4410518eabaf0c17b24351cd269d85bfc5f32151bcb56680793682a17b61e8881204 SHA512 c2d405ad66b1e3d6860ef21dacb6b7f0a5daef57267c32773cb26ea9983ba75df39e6b3ab5bc97c4c0eb133e17eb587a565da30d89139982fd90102765d27ca9
1127
DIST github.com%2Fshopspring%2Fdecimal%2F@v%2Fv0.0.0-20180709203117-cd690d0c9e24.mod 37 BLAKE2B 9945435440e0d3be57cdb12cab697382fe91c56329289bbde332bbd1fd15928a5101d7fcadd89064ecbd103130514a1cad383db097d02d596138fad0348c15d0 SHA512 7f46d39bc8f24a5c5c1ff513c0f0018d5341a008526a49bf0b3694008c272b3080b0386a44ba6c27f2894bef19dfbec5095c9189ed222ed5a55797788668315e
1133
DIST github.com%2Fshopspring%2Fdecimal%2F@v%2Fv0.0.0-20180709203117-cd690d0c9e24.mod 37 BLAKE2B 9945435440e0d3be57cdb12cab697382fe91c56329289bbde332bbd1fd15928a5101d7fcadd89064ecbd103130514a1cad383db097d02d596138fad0348c15d0 SHA512 7f46d39bc8f24a5c5c1ff513c0f0018d5341a008526a49bf0b3694008c272b3080b0386a44ba6c27f2894bef19dfbec5095c9189ed222ed5a55797788668315e
Lines 1750-1752 DIST vault-1.7.4-webui.tar.xz 1324720 BLAKE2B 822f4afd2dd2ede0741b597b66a89fa04d Link Here
1750
DIST vault-1.7.4.tar.gz 39607823 BLAKE2B 24b1c5473bac6fe0973a95a4c7ce30d5e8b4d3e78ec606cfe64ac3a1dcf84733aac4309496da0fd6b8bec5d98d951df29a4f1e1709f30856cc35e1d0464bdb25 SHA512 ec2f13741a182f1127424cd135ca1d5e9000e5e1cb3410135d805ff5cebb728091ffd67c7fea2134b1488ec13c8e298683adae23cb7ef87d8d35404ffddf9be3
1756
DIST vault-1.7.4.tar.gz 39607823 BLAKE2B 24b1c5473bac6fe0973a95a4c7ce30d5e8b4d3e78ec606cfe64ac3a1dcf84733aac4309496da0fd6b8bec5d98d951df29a4f1e1709f30856cc35e1d0464bdb25 SHA512 ec2f13741a182f1127424cd135ca1d5e9000e5e1cb3410135d805ff5cebb728091ffd67c7fea2134b1488ec13c8e298683adae23cb7ef87d8d35404ffddf9be3
1751
DIST vault-1.8.2-webui.tar.xz 1382592 BLAKE2B e7df79275f65b601de577f1197b89c03bd4e299fb4c5ee67f5e91439a79c15eeb4b58946d4cf2c837ca88883c2d655ae86388f2f194a06f159c6580d4e6b1e59 SHA512 35c738be79fd956f09595045d7616599cfd7948baf2b774d0585c4cc12f9cfbd8bf262eb3c9a3969b96184560f2b2f7eb203271100a4ce452347d1100a5884b8
1757
DIST vault-1.8.2-webui.tar.xz 1382592 BLAKE2B e7df79275f65b601de577f1197b89c03bd4e299fb4c5ee67f5e91439a79c15eeb4b58946d4cf2c837ca88883c2d655ae86388f2f194a06f159c6580d4e6b1e59 SHA512 35c738be79fd956f09595045d7616599cfd7948baf2b774d0585c4cc12f9cfbd8bf262eb3c9a3969b96184560f2b2f7eb203271100a4ce452347d1100a5884b8
1752
DIST vault-1.8.2.tar.gz 20974085 BLAKE2B dbef32b3b1881f61053fed410c80caca253af9fd27d525eaf7e8b471af15d62c16423d35905302ccd4c32d7f2bc983a09d4ccbf2f835b7c60e2ac5067b17348c SHA512 fe203f68a8b2f91356a59ee5a5e072aad232bfb9b037c7673297240ddd6270936f144c9a25bcba399053ef0fbc756146cc0e9e9f3642f0fd07008d8ee003d793
1758
DIST vault-1.8.2.tar.gz 20974085 BLAKE2B dbef32b3b1881f61053fed410c80caca253af9fd27d525eaf7e8b471af15d62c16423d35905302ccd4c32d7f2bc983a09d4ccbf2f835b7c60e2ac5067b17348c SHA512 fe203f68a8b2f91356a59ee5a5e072aad232bfb9b037c7673297240ddd6270936f144c9a25bcba399053ef0fbc756146cc0e9e9f3642f0fd07008d8ee003d793
1759
EBUILD vault-1.6.6.ebuild 1815 BLAKE2B 26b1ef44a8f7a7368e43f053589e55dbcf184f67c9d7bfa264f80d8a8de83b13568ee614d357ed75eb0464f53dfa8e58a97755229b283d026212761492264e64 SHA512 bd013a506908c251eeb581602e9f039361b33e3a8b13589c32228845cf830f66cb02960f0375a482fdae237a8c637145ab75bffd5d4f4e96d10046fdf32b6948
1760
EBUILD vault-1.7.4.ebuild 1816 BLAKE2B 64dfcfd1375b66458538b35647ddf2a373be16ba8ac27619db188dbaec020f54f045977033a33aa365846e2c9aaf13ec491591208bf67811a7ef871afb32cc2c SHA512 7d4c606e6ad9f6b82c8930580fb37de60b1ce5cb1d470f37fec833e8402ed967187f6884264d417c356f1a2f9f1f7389bd968bddaba4d9baa601771e536b86e3
1761
EBUILD vault-1.8.2.ebuild 95866 BLAKE2B 961521cff94023d3276bf1ebe9bb5b532c9658182fe700dbb70a6612709115ba8fcd690da09019aed77b6ed86971ef5e31f4bab97257b51c20d065f3361dd532 SHA512 4baeeaf13d6bb9132444d48494f2bd1444d92e8a5cf9c66b0f788aab2e9a59bb7362bfd6021048a43b5ee14fc23d6ad05d20a3ccb5b15b34d1657eece05fff96
1762
MISC metadata.xml 372 BLAKE2B 8e18e03d14e17a6a5d8c6b7bdb0d87ef6aec8530e203edc579a66b0c6ba0809bbddf4d68943281483ed841daa18a87ee13bed427162e40cd6c2fe3c45b0ec4fb SHA512 07bd140cd5152ccf7e9c39a0ad45a9361b56306b773176155fceaee3dbfa4645d74dba5a21a131f0221419aed5a9aeed4a5aef7c4eec2750c803e11c96621b02
(-)a/app-admin/vault/files/vault-1.8.2-go-limiter.patch (+264 lines)
Line 0 Link Here
1
This is a combination of upstream commits:
2
b368a675955707db4e940da29a1043871a3781b6
3
21ea03e0f874991086d2f1bcdc285216878bd566
4
5
Fixes https://bugs.gentoo.org/808791
6
Fixes https://bugs.gentoo.org/810317
7
8
diff --git a/go.mod b/go.mod
9
index 548c0590f..22a8833e2 100644
10
--- a/go.mod
11
+++ b/go.mod
12
@@ -150,7 +150,7 @@ require (
13
 	github.com/ryanuber/go-glob v1.0.0
14
 	github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da
15
 	github.com/sasha-s/go-deadlock v0.2.0
16
-	github.com/sethvargo/go-limiter v0.3.0
17
+	github.com/sethvargo/go-limiter v0.7.1
18
 	github.com/shirou/gopsutil v3.21.5+incompatible
19
 	github.com/stretchr/testify v1.7.0
20
 	github.com/tidwall/pretty v1.0.1 // indirect
21
diff --git a/go.sum b/go.sum
22
index c5b3b410d..98a5dd0a8 100644
23
--- a/go.sum
24
+++ b/go.sum
25
@@ -1120,8 +1120,8 @@ github.com/sean-/conswriter v0.0.0-20180208195008-f5ae3917a627/go.mod h1:7zjs06q
26
 github.com/sean-/pager v0.0.0-20180208200047-666be9bf53b5/go.mod h1:BeybITEsBEg6qbIiqJ6/Bqeq25bCLbL7YFmpaFfJDuM=
27
 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I=
28
 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
29
-github.com/sethvargo/go-limiter v0.3.0 h1:yRMc+Qs2yqw6YJp6UxrO2iUs6DOSq4zcnljbB7/rMns=
30
-github.com/sethvargo/go-limiter v0.3.0/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU=
31
+github.com/sethvargo/go-limiter v0.7.1 h1:wWNhTj0pxjyJ7wuJHpRJpYwJn+bUnjYfw2a85eu5w9U=
32
+github.com/sethvargo/go-limiter v0.7.1/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU=
33
 github.com/shirou/gopsutil v3.21.5+incompatible h1:OloQyEerMi7JUrXiNzy8wQ5XN+baemxSl12QgIzt0jc=
34
 github.com/shirou/gopsutil v3.21.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
35
 github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
36
diff --git a/http/util.go b/http/util.go
37
index 0550a93c7..cbb364843 100644
38
--- a/http/util.go
39
+++ b/http/util.go
40
@@ -48,7 +48,7 @@ func rateLimitQuotaWrapping(handler http.Handler, core *vault.Core) http.Handler
41
 			return
42
 		}
43
 
44
-		quotaResp, err := core.ApplyRateLimitQuota(&quotas.Request{
45
+		quotaResp, err := core.ApplyRateLimitQuota(r.Context(), &quotas.Request{
46
 			Type:          quotas.TypeRateLimit,
47
 			Path:          path,
48
 			MountPath:     strings.TrimPrefix(core.MatchingMount(r.Context(), path), ns.Path),
49
diff --git a/vault/core.go b/vault/core.go
50
index 3b6e461fd..27741e8c6 100644
51
--- a/vault/core.go
52
+++ b/vault/core.go
53
@@ -2744,7 +2744,7 @@ func (c *Core) setupQuotas(ctx context.Context, isPerfStandby bool) error {
54
 
55
 // ApplyRateLimitQuota checks the request against all the applicable quota rules.
56
 // If the given request's path is exempt, no rate limiting will be applied.
57
-func (c *Core) ApplyRateLimitQuota(req *quotas.Request) (quotas.Response, error) {
58
+func (c *Core) ApplyRateLimitQuota(ctx context.Context, req *quotas.Request) (quotas.Response, error) {
59
 	req.Type = quotas.TypeRateLimit
60
 
61
 	resp := quotas.Response{
62
@@ -2758,7 +2758,7 @@ func (c *Core) ApplyRateLimitQuota(req *quotas.Request) (quotas.Response, error)
63
 			return resp, nil
64
 		}
65
 
66
-		return c.quotaManager.ApplyQuota(req)
67
+		return c.quotaManager.ApplyQuota(ctx, req)
68
 	}
69
 
70
 	return resp, nil
71
diff --git a/vault/quotas/quotas.go b/vault/quotas/quotas.go
72
index 68cc72f9f..80ee59521 100644
73
--- a/vault/quotas/quotas.go
74
+++ b/vault/quotas/quotas.go
75
@@ -168,7 +168,7 @@ type Manager struct {
76
 // Quota represents the common properties of every quota type
77
 type Quota interface {
78
 	// allow checks the if the request is allowed by the quota type implementation.
79
-	allow(*Request) (Response, error)
80
+	allow(context.Context, *Request) (Response, error)
81
 
82
 	// quotaID is the identifier of the quota rule
83
 	quotaID() string
84
@@ -181,7 +181,7 @@ type Quota interface {
85
 
86
 	// close defines any cleanup behavior that needs to be executed when a quota
87
 	// rule is deleted.
88
-	close() error
89
+	close(context.Context) error
90
 
91
 	// handleRemount takes in the new mount path in the quota
92
 	handleRemount(string)
93
@@ -287,7 +287,7 @@ func (m *Manager) setQuotaLocked(ctx context.Context, qType string, quota Quota,
94
 	// If there already exists an entry in the db, remove that first.
95
 	if raw != nil {
96
 		quota := raw.(Quota)
97
-		if err := quota.close(); err != nil {
98
+		if err := quota.close(ctx); err != nil {
99
 			return err
100
 		}
101
 		err = txn.Delete(qType, raw)
102
@@ -518,7 +518,7 @@ func (m *Manager) DeleteQuota(ctx context.Context, qType string, name string) er
103
 	}
104
 
105
 	quota := raw.(Quota)
106
-	if err := quota.close(); err != nil {
107
+	if err := quota.close(ctx); err != nil {
108
 		return err
109
 	}
110
 
111
@@ -541,7 +541,7 @@ func (m *Manager) DeleteQuota(ctx context.Context, qType string, name string) er
112
 // ApplyQuota runs the request against any quota rule that is applicable to it. If
113
 // there are multiple quota rule that matches the request parameters, rule that
114
 // takes precedence will be used to allow/reject the request.
115
-func (m *Manager) ApplyQuota(req *Request) (Response, error) {
116
+func (m *Manager) ApplyQuota(ctx context.Context, req *Request) (Response, error) {
117
 	var resp Response
118
 
119
 	quota, err := m.QueryQuota(req)
120
@@ -562,7 +562,7 @@ func (m *Manager) ApplyQuota(req *Request) (Response, error) {
121
 		return resp, nil
122
 	}
123
 
124
-	return quota.allow(req)
125
+	return quota.allow(ctx, req)
126
 }
127
 
128
 // SetEnableRateLimitAuditLogging updates the operator preference regarding the
129
diff --git a/vault/quotas/quotas_rate_limit.go b/vault/quotas/quotas_rate_limit.go
130
index 64117b002..ad58b2af3 100644
131
--- a/vault/quotas/quotas_rate_limit.go
132
+++ b/vault/quotas/quotas_rate_limit.go
133
@@ -1,6 +1,7 @@
134
 package quotas
135
 
136
 import (
137
+	"context"
138
 	"encoding/hex"
139
 	"fmt"
140
 	"math"
141
@@ -264,7 +265,7 @@ func (rlq *RateLimitQuota) QuotaName() string {
142
 // returned if the request ID or address is empty. If the path is exempt, the
143
 // quota will not be evaluated. Otherwise, the client rate limiter is retrieved
144
 // by address and the rate limit quota is checked against that limiter.
145
-func (rlq *RateLimitQuota) allow(req *Request) (Response, error) {
146
+func (rlq *RateLimitQuota) allow(ctx context.Context, req *Request) (Response, error) {
147
 	resp := Response{
148
 		Headers: make(map[string]string),
149
 	}
150
@@ -300,7 +301,11 @@ func (rlq *RateLimitQuota) allow(req *Request) (Response, error) {
151
 		}
152
 	}
153
 
154
-	limit, remaining, reset, allow := rlq.store.Take(req.ClientAddress)
155
+	limit, remaining, reset, allow, err := rlq.store.Take(ctx, req.ClientAddress)
156
+	if err != nil {
157
+		return resp, err
158
+	}
159
+
160
 	resp.Allowed = allow
161
 	resp.Headers[httplimit.HeaderRateLimitLimit] = strconv.FormatUint(limit, 10)
162
 	resp.Headers[httplimit.HeaderRateLimitRemaining] = strconv.FormatUint(remaining, 10)
163
@@ -320,13 +325,13 @@ func (rlq *RateLimitQuota) allow(req *Request) (Response, error) {
164
 
165
 // close stops the current running client purge loop.
166
 // It should be called with the write lock held.
167
-func (rlq *RateLimitQuota) close() error {
168
+func (rlq *RateLimitQuota) close(ctx context.Context) error {
169
 	if rlq.purgeBlocked {
170
 		close(rlq.closePurgeBlockedCh)
171
 	}
172
 
173
 	if rlq.store != nil {
174
-		return rlq.store.Close()
175
+		return rlq.store.Close(ctx)
176
 	}
177
 
178
 	return nil
179
diff --git a/vault/quotas/quotas_rate_limit_test.go b/vault/quotas/quotas_rate_limit_test.go
180
index 27225e338..21f35dac3 100644
181
--- a/vault/quotas/quotas_rate_limit_test.go
182
+++ b/vault/quotas/quotas_rate_limit_test.go
183
@@ -37,7 +37,7 @@ func TestNewRateLimitQuota(t *testing.T) {
184
 			err := tc.rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink())
185
 			require.Equal(t, tc.expectErr, err != nil, err)
186
 			if err == nil {
187
-				require.Nil(t, tc.rlq.close())
188
+				require.Nil(t, tc.rlq.close(context.Background()))
189
 			}
190
 		})
191
 	}
192
@@ -46,7 +46,7 @@ func TestNewRateLimitQuota(t *testing.T) {
193
 func TestRateLimitQuota_Close(t *testing.T) {
194
 	rlq := NewRateLimitQuota("test-rate-limiter", "qa", "/foo/bar", 16.7, time.Second, time.Minute)
195
 	require.NoError(t, rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink()))
196
-	require.NoError(t, rlq.close())
197
+	require.NoError(t, rlq.close(context.Background()))
198
 
199
 	time.Sleep(time.Second) // allow enough time for purgeClientsLoop to receive on closeCh
200
 	require.False(t, rlq.getPurgeBlocked(), "expected blocked client purging to be disabled after explicit close")
201
@@ -66,14 +66,14 @@ func TestRateLimitQuota_Allow(t *testing.T) {
202
 	}
203
 
204
 	require.NoError(t, rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink()))
205
-	defer rlq.close()
206
+	defer rlq.close(context.Background())
207
 
208
 	var wg sync.WaitGroup
209
 
210
 	reqFunc := func(addr string, atomicNumAllow, atomicNumFail *atomic.Int32) {
211
 		defer wg.Done()
212
 
213
-		resp, err := rlq.allow(&Request{ClientAddress: addr})
214
+		resp, err := rlq.allow(context.Background(), &Request{ClientAddress: addr})
215
 		if err != nil {
216
 			return
217
 		}
218
@@ -141,7 +141,7 @@ func TestRateLimitQuota_Allow_WithBlock(t *testing.T) {
219
 	}
220
 
221
 	require.NoError(t, rlq.initialize(logging.NewVaultLogger(log.Trace), metricsutil.BlackholeSink()))
222
-	defer rlq.close()
223
+	defer rlq.close(context.Background())
224
 	require.True(t, rlq.getPurgeBlocked())
225
 
226
 	var wg sync.WaitGroup
227
@@ -149,7 +149,7 @@ func TestRateLimitQuota_Allow_WithBlock(t *testing.T) {
228
 	reqFunc := func(addr string, atomicNumAllow, atomicNumFail *atomic.Int32) {
229
 		defer wg.Done()
230
 
231
-		resp, err := rlq.allow(&Request{ClientAddress: addr})
232
+		resp, err := rlq.allow(context.Background(), &Request{ClientAddress: addr})
233
 		if err != nil {
234
 			return
235
 		}
236
@@ -221,5 +221,5 @@ func TestRateLimitQuota_Update(t *testing.T) {
237
 	require.NoError(t, qm.SetQuota(context.Background(), TypeRateLimit.String(), quota, true))
238
 	require.NoError(t, qm.SetQuota(context.Background(), TypeRateLimit.String(), quota, true))
239
 
240
-	require.Nil(t, quota.close())
241
+	require.Nil(t, quota.close(context.Background()))
242
 }
243
diff --git a/vault/quotas/quotas_util.go b/vault/quotas/quotas_util.go
244
index dc2fcdfac..7c0732f67 100644
245
--- a/vault/quotas/quotas_util.go
246
+++ b/vault/quotas/quotas_util.go
247
@@ -40,7 +40,7 @@ func (*entManager) Reset() error {
248
 
249
 type LeaseCountQuota struct{}
250
 
251
-func (l LeaseCountQuota) allow(request *Request) (Response, error) {
252
+func (l LeaseCountQuota) allow(_ context.Context, _ *Request) (Response, error) {
253
 	panic("implement me")
254
 }
255
 
256
@@ -56,7 +56,7 @@ func (l LeaseCountQuota) initialize(logger log.Logger, sink *metricsutil.Cluster
257
 	panic("implement me")
258
 }
259
 
260
-func (l LeaseCountQuota) close() error {
261
+func (l LeaseCountQuota) close(_ context.Context) error {
262
 	panic("implement me")
263
 }
264
 
(-)a/app-admin/vault/vault-1.8.2.ebuild (-3 / +4 lines)
Lines 1130-1137 EGO_SUM=( Link Here
1130
"github.com/sean-/pager v0.0.0-20180208200047-666be9bf53b5/go.mod"
1130
"github.com/sean-/pager v0.0.0-20180208200047-666be9bf53b5/go.mod"
1131
"github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529"
1131
"github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529"
1132
"github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod"
1132
"github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod"
1133
"github.com/sethvargo/go-limiter v0.3.0"
1133
"github.com/sethvargo/go-limiter v0.7.1"
1134
"github.com/sethvargo/go-limiter v0.3.0/go.mod"
1134
"github.com/sethvargo/go-limiter v0.7.1/go.mod"
1135
"github.com/shirou/gopsutil v3.21.5+incompatible"
1135
"github.com/shirou/gopsutil v3.21.5+incompatible"
1136
"github.com/shirou/gopsutil v3.21.5+incompatible/go.mod"
1136
"github.com/shirou/gopsutil v3.21.5+incompatible/go.mod"
1137
"github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24"
1137
"github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24"
Lines 1780-1785 FILECAPS=( Link Here
1780
	-m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
1780
	-m 755 'cap_ipc_lock=+ep' usr/bin/${PN}
1781
)
1781
)
1782
1782
1783
PATCHES=( "${FILESDIR}"/${P}-go-limiter.patch )
1784
1783
RESTRICT+=" test"
1785
RESTRICT+=" test"
1784
1786
1785
src_prepare() {
1787
src_prepare() {
1786
- 

Return to bug 808791