Commit 37343c0
Handle unauthorized fields in aggregation (#2790)
## Why make this change?
Closes #2776
Ensure authorization error thrown if fields in the groupBy argument or
in the aggregation function are not allowed for the current role.
## What is this change?
During groupBy argument parsing, check if the field is allowed access
for current role.
During aggregation function argument parsing, check if the field is
allowed access for current role
If no access, then throw authorization error
## How was this tested?
- [x] Integration Tests
## Sample Request(s)
Samples from development mode (stack traces will not be show in
production mode)
<img width="1385" height="463" alt="image"
src="https://github.com/user-attachments/assets/f412e127-74bb-4ca9-8d58-36c8a08281c3"
/>
<img width="1479" height="452" alt="image"
src="https://github.com/user-attachments/assets/14763f97-93ea-4ed0-85b9-8b001859d508"
/>
---------
Co-authored-by: Copilot <[email protected]>1 parent 7b6259b commit 37343c0
File tree
5 files changed
+114
-5
lines changed- config-generators
- src
- Config
- Core/Resolvers/Sql Query Structures
- Service.Tests
- Authorization/GraphQL
- Snapshots
5 files changed
+114
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
| 462 | + | |
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| |||
877 | 877 | | |
878 | 878 | | |
879 | 879 | | |
880 | | - | |
| 880 | + | |
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
| 886 | + | |
| 887 | + | |
886 | 888 | | |
887 | 889 | | |
888 | 890 | | |
889 | 891 | | |
890 | 892 | | |
891 | 893 | | |
892 | 894 | | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
893 | 907 | | |
894 | 908 | | |
895 | 909 | | |
| |||
913 | 927 | | |
914 | 928 | | |
915 | 929 | | |
916 | | - | |
| 930 | + | |
917 | 931 | | |
918 | 932 | | |
919 | 933 | | |
| |||
963 | 977 | | |
964 | 978 | | |
965 | 979 | | |
966 | | - | |
| 980 | + | |
967 | 981 | | |
968 | 982 | | |
969 | 983 | | |
| |||
1010 | 1024 | | |
1011 | 1025 | | |
1012 | 1026 | | |
1013 | | - | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
1014 | 1039 | | |
1015 | 1040 | | |
1016 | 1041 | | |
| |||
Lines changed: 68 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
74 | 142 | | |
75 | 143 | | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3442 | 3442 | | |
3443 | 3443 | | |
3444 | 3444 | | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
3445 | 3458 | | |
3446 | 3459 | | |
3447 | 3460 | | |
| |||
0 commit comments