@@ -159,6 +159,7 @@ You can enable the following middleware using the "middlewares" config parameter
159
159
- "sanitation": Apply input sanitation on create and update
160
160
- "multiTenancy": Restricts tenants access in a multi-tenant scenario
161
161
- "pageLimits": Restricts list operations to prevent database scraping
162
+ - "joinLimits": Restricts join parameters to prevent database scraping
162
163
- "customization": Provides handlers for request and response customization
163
164
164
165
The "middlewares" config parameter is a comma separated list of enabled middlewares.
@@ -197,6 +198,9 @@ You can tune the middleware behavior using middleware specific configuration par
197
198
- "multiTenancy.handler": Handler to implement simple multi-tenancy rules ("")
198
199
- "pageLimits.pages": The maximum page number that a list operation allows ("100")
199
200
- "pageLimits.records": The maximum number of records returned by a list operation ("1000")
201
+ - "joinLimits.depth": The maximum depth (length) that is allowed in a join path ("3")
202
+ - "joinLimits.tables": The maximum number of tables that you are allowed to join ("10")
203
+ - "joinLimits.records": The maximum number of records returned for a joined entity ("1000")
200
204
- "customization.beforeHandler": Handler to implement request customization ("")
201
205
- "customization.afterHandler": Handler to implement response customization ("")
202
206
@@ -751,7 +755,14 @@ It also sets the column "customer_id" on "create" to "12" and removes the column
751
755
752
756
### Prevent database scraping
753
757
754
- You may use the "pageLimits" middleware to limit the page number and the number records returned from a list operation.
758
+ You may use the "joinLimits" and "pageLimits" middleware to prevent database scraping.
759
+ The "joinLimits" middleware limits the table depth, number of tables and number of records returned in a join operation.
760
+
761
+ 'joinLimits.depth' => 2,
762
+ 'joinLimits.tables' => 3,
763
+ 'joinLimits.records' => 25,
764
+
765
+ The "pageLimits" middleware limits the page number and the number records returned from a list operation.
755
766
If you want to allow no more than 10 pages with a maximum of 25 records each, you can specify:
756
767
757
768
'pageLimits.pages' => 10,
0 commit comments