Commit d2fbd27
# Backport
This will backport the following commits from `main` to `9.4`:
- [Bound and memoize Kibana privilege validation in role schema
(#282111)](#282111)
Manual conflict resolution: the generated OAS files
(`oas_docs/output/kibana.yaml`, `kibana.serverless.yaml`) did not apply
cleanly because the request-body layout differs from `main`. Took the
9.4 versions and added `maxItems: 1000` on the PUT and bulk role-schema
Kibana privilege request arrays only (not response schemas).
`role_schema.ts` applied cleanly: memoize `getBasePrivilegeNames` with
`_.once`, bound the Kibana privileges array to `maxSize: 1000`, and
replace the O(n²) space-overlap check with a `Set`. Existing 9.4
`maxSize` bounds on base privilege arrays were left in place.
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
Made with [Cursor](https://cursor.com)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
1 parent b084eae commit d2fbd27
7 files changed
Lines changed: 132 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56733 | 56733 | | |
56734 | 56734 | | |
56735 | 56735 | | |
| 56736 | + | |
56736 | 56737 | | |
56737 | 56738 | | |
56738 | 56739 | | |
| |||
56970 | 56971 | | |
56971 | 56972 | | |
56972 | 56973 | | |
| 56974 | + | |
56973 | 56975 | | |
56974 | 56976 | | |
56975 | 56977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60738 | 60738 | | |
60739 | 60739 | | |
60740 | 60740 | | |
| 60741 | + | |
60741 | 60742 | | |
60742 | 60743 | | |
60743 | 60744 | | |
| |||
60975 | 60976 | | |
60976 | 60977 | | |
60977 | 60978 | | |
| 60979 | + | |
60978 | 60980 | | |
60979 | 60981 | | |
60980 | 60982 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
x-pack/platform/packages/shared/security/plugin_types_server/src/authorization/role_schema.test.ts
Lines changed: 96 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
290 | 293 | | |
291 | 294 | | |
292 | 295 | | |
| |||
309 | 312 | | |
310 | 313 | | |
311 | 314 | | |
312 | | - | |
| 315 | + | |
313 | 316 | | |
314 | 317 | | |
315 | 318 | | |
| |||
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
324 | | - | |
| 327 | + | |
325 | 328 | | |
326 | 329 | | |
327 | 330 | | |
| |||
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| 389 | + | |
386 | 390 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
392 | 396 | | |
| 397 | + | |
393 | 398 | | |
394 | 399 | | |
395 | 400 | | |
396 | 401 | | |
397 | 402 | | |
| 403 | + | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
0 commit comments