Commit aa367a4
authored
fix(sap_concur): HMAC the token cache key and wire the sendback comment (#6794)
* fix(sap_concur): key the token cache with an HMAC and document rate casing
The cache key hashed a user-chosen password with a bare SHA-256. The key
never leaves the process, but a password is low-entropy enough to
brute-force out of a plain digest if one ever reached a heap dump or a
debug log, which is what CodeQL flags. Keying the digest with a
server-side secret makes it useless without that secret. A
password-hashing KDF would be the wrong tool here: this runs on every
token fetch, and the goal is collision-free partitioning rather than
verification of a stored credential.
The body wand prompt also claimed every payload family is camelCase.
Exchange rate uploads are the exception — they take a snake_case
currency_sets array of from_crn_code, to_crn_code, start_date and rate —
and that operation is in BODY_OPS, so the blanket claim produced bodies
Concur rejects.
* fix(sap_concur): wire the travel request sendback comment through the block
move_travel_request accepts a documented query comment that Concur
applies to the sendback action, but the params branch never passed it
and the block's only comment field is gated to create_report_comment, so
the value was unreachable from the UI.
Uses a dedicated sendbackComment subblock rather than widening the
existing comment field: that one is required for create_report_comment
while this is optional, so sharing an id would both clash on
required-ness and let a value bleed between the two operations.
* fix(sap_concur): gate the sendback comment and merge duplicate TSDoc
The sendbackComment field was conditioned only on the operation, so it
rendered for submit, approve, cancel and every other workflow action
even though Concur applies the comment to sendback alone. It is now
gated on the action as well, and the params branch only forwards it for
sendback so a value retained from an earlier sendback cannot ride along
once the field is hidden.
Also folds the two consecutive TSDoc blocks left above tokenCacheKey
into one. Only the nearest block binds to the declaration, so the
separator and collision reasoning in the earlier block was detached.1 parent 0c34e69 commit aa367a4
2 files changed
Lines changed: 33 additions & 5 deletions
| 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 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | | - | |
230 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
231 | 238 | | |
232 | 239 | | |
233 | | - | |
| 240 | + | |
234 | 241 | | |
235 | 242 | | |
236 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1007 | 1007 | | |
1008 | 1008 | | |
1009 | 1009 | | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1010 | 1022 | | |
1011 | 1023 | | |
1012 | 1024 | | |
| |||
1893 | 1905 | | |
1894 | 1906 | | |
1895 | 1907 | | |
1896 | | - | |
| 1908 | + | |
1897 | 1909 | | |
1898 | 1910 | | |
1899 | 1911 | | |
| |||
1905 | 1917 | | |
1906 | 1918 | | |
1907 | 1919 | | |
| 1920 | + | |
| 1921 | + | |
1908 | 1922 | | |
1909 | 1923 | | |
1910 | 1924 | | |
| |||
2262 | 2276 | | |
2263 | 2277 | | |
2264 | 2278 | | |
| 2279 | + | |
| 2280 | + | |
2265 | 2281 | | |
2266 | 2282 | | |
2267 | 2283 | | |
| |||
2532 | 2548 | | |
2533 | 2549 | | |
2534 | 2550 | | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
2535 | 2556 | | |
2536 | 2557 | | |
2537 | 2558 | | |
| |||
0 commit comments