Commit de6f662
committed
fix(sap_concur): align the integration with SAP Concur's documented API
Validated all 70 tools, the block, and both proxy routes against SAP's
published API docs.
Auth:
- add the password and companyUuid to the token cache key so a request
with the wrong password can no longer be served a cached token minted
from someone else's
- wire the documented company-level flow (username = company UUID,
credtype = authtoken) so companyUuid actually scopes a token
- expand the datacenter allowlist to the documented set (adds glz, apj1,
usg, the impl hosts, and the www- twins) and drop the undocumented cn
host; validate the returned geolocation by shape instead of membership
- coalesce concurrent token fetches so a fan-out mints one token
- forward Retry-After so 429 retries pace off Concur's own hint
- handle the errorMessageList, SCIM detail, and legacy Error.Message
shapes instead of falling through to a generic HTTP message
- pin redirects and cap the response body
Block:
- collapse six contextType subBlocks that disagreed on their default, so
a new block no longer seeds MANAGER for every operation
- clamp contextType to each operation's documented set
- stop requiring a userId and contextType that the default operation's
tool does not accept, and scope the receipt fields to the upload ops
- reach six params that had no subBlock, and pass userId on travel
request updates so a stale value cannot impersonate
Tools:
- correct response shapes that resolved to undefined: budget headers,
budget categories, allocations, receipts, SCIM nextCursor, and the
delete endpoints that return a bare boolean
- use the Travel Request Amount schema (currency, not currencyCode)
- narrow the four XML-only travel tools to a documented string payload
and request application/xml
- surface real errors instead of a JSON parse failure when the proxy
returns a non-JSON body
- cap receipt uploads at the documented sizes before downloading
Adds 106 tests covering the token cache, geolocation validation, path
traversal, and error extraction.1 parent ae21476 commit de6f662
71 files changed
Lines changed: 3527 additions & 1235 deletions
File tree
- apps
- docs/content/docs/en/integrations
- sim
- app/api/tools/sap_concur
- proxy
- upload
- blocks/blocks
- lib/integrations
- tools
- generated
- sap_concur
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
42 | 59 | | |
43 | 60 | | |
44 | 61 | | |
45 | 62 | | |
| 63 | + | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
48 | 78 | | |
49 | 79 | | |
50 | 80 | | |
| |||
54 | 84 | | |
55 | 85 | | |
56 | 86 | | |
57 | | - | |
| 87 | + | |
58 | 88 | | |
59 | 89 | | |
60 | | - | |
| 90 | + | |
61 | 91 | | |
62 | 92 | | |
63 | 93 | | |
| |||
70 | 100 | | |
71 | 101 | | |
72 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
73 | 106 | | |
74 | 107 | | |
75 | 108 | | |
| |||
83 | 116 | | |
84 | 117 | | |
85 | 118 | | |
86 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
87 | 125 | | |
88 | 126 | | |
89 | 127 | | |
| |||
108 | 146 | | |
109 | 147 | | |
110 | 148 | | |
111 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
112 | 153 | | |
113 | 154 | | |
114 | 155 | | |
| |||
117 | 158 | | |
118 | 159 | | |
119 | 160 | | |
120 | | - | |
| 161 | + | |
121 | 162 | | |
122 | 163 | | |
123 | 164 | | |
| |||
128 | 169 | | |
129 | 170 | | |
130 | 171 | | |
131 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
132 | 176 | | |
133 | 177 | | |
0 commit comments