Repository navigation
Commit baadd3b
authored
Reach a server added by its address as the person the host app signed in (#2797)
* API: reach a server added by its address as the person the host app signed in
replaceApp takes an optional hostToken, { tokenEndpoint, scope }: on a
deployment with embedded sign-in, OpenBot swaps a short assertion about the
signed-in person at the host app's token endpoint (RFC 7523 JWT bearer grant)
and sends the access token it gets to the server. Absent keeps what the
server has, and null takes it away, as entraScope does. An app answers
hostTokenEndpoint and hostTokenScope, null on every server not reached this
way. The bundle and the web app's generated client are regenerated.
* Docs: calling an MCP server as the person the host app signed in
A subsection of Embedded sign-in: the assertion OpenBot signs and where its key is published, the JWT bearer request it sends to the host's token endpoint, what it needs back, caching and re-checks, how an administrator sets it on a server with hostToken, and what refuses it.
* Show a server reached through the host app as reached as the person asking, and say what the assertion's header and iat carry
* Docs: OPENBOT_EMBED_HOST_TOKEN_KEY turns on calling an MCP server as the person
* Docs and spec: only the host's own token endpoint, one spelling for aud and the call, nbf, and what the person reads for each answer
* Docs and spec: scope in OAuth's grammar, loopback by address only, no nbf, a day's cache cap, and what the person reads when the host can't be reached or refuses
* Docs and spec: a padded token endpoint is refused, not trimmed, the answer read up to 64 KiB, a 429 means try again, and what is refused before the host is asked
* Say that a token endpoint is written in ASCII, and sharpen the host's key and clock rules
* Show the host-token row in a real browser, and call the host one name everywhere
Admin's page of a server reached through the app OpenBot is part of is now drawn in Chromium and
WebKit (reached-as-the-person-browser.test.tsx, in the WebKit job's list, which runs both engines).
It checks the Connection card's description, the "How this is reached" row's text, the token
endpoint under it and its badge, beside the Entra server's page for comparison, light and dark, wide
and on a phone. It fails against the previous copy and on main, where the row does not exist.
The row's badge is now the token endpoint's host (auth.example.com) instead of "Host app", and the
web app and the person-facing sentences in docs/configuration.md say "the app OpenBot is part of",
the name the backend's refusals already use. The embedded sign-in section says once that the docs
call it the host app. The card's description is split into two short sentences.
The moved-apps.test.ts addition is dropped. needsNoAccountOfYours never reads hostTokenEndpoint, so
the assertion restated the default for a server added by its address and passed with or without
this change. There is no code here for it to guard; the browser test covers what changed.1 parent d080200 commit baadd3b
16 files changed
Lines changed: 997 additions & 29 deletions
File tree
- .github/workflows
- api
- openapi
- app
- src
- components/manage
- lib/api/generated
- apps
- model
- tests
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
589 | 592 | | |
590 | 593 | | |
591 | 594 | | |
| |||
716 | 719 | | |
717 | 720 | | |
718 | 721 | | |
| 722 | + | |
719 | 723 | | |
720 | 724 | | |
721 | 725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6619 | 6619 | | |
6620 | 6620 | | |
6621 | 6621 | | |
6622 | | - | |
| 6622 | + | |
6623 | 6623 | | |
6624 | 6624 | | |
6625 | 6625 | | |
| |||
6640 | 6640 | | |
6641 | 6641 | | |
6642 | 6642 | | |
| 6643 | + | |
| 6644 | + | |
| 6645 | + | |
| 6646 | + | |
| 6647 | + | |
| 6648 | + | |
| 6649 | + | |
| 6650 | + | |
6643 | 6651 | | |
6644 | 6652 | | |
6645 | 6653 | | |
| |||
35646 | 35654 | | |
35647 | 35655 | | |
35648 | 35656 | | |
| 35657 | + | |
| 35658 | + | |
35649 | 35659 | | |
35650 | 35660 | | |
35651 | 35661 | | |
| |||
35712 | 35722 | | |
35713 | 35723 | | |
35714 | 35724 | | |
| 35725 | + | |
| 35726 | + | |
| 35727 | + | |
| 35728 | + | |
| 35729 | + | |
| 35730 | + | |
| 35731 | + | |
| 35732 | + | |
| 35733 | + | |
| 35734 | + | |
35715 | 35735 | | |
35716 | 35736 | | |
35717 | 35737 | | |
| |||
35872 | 35892 | | |
35873 | 35893 | | |
35874 | 35894 | | |
| 35895 | + | |
| 35896 | + | |
| 35897 | + | |
| 35898 | + | |
| 35899 | + | |
| 35900 | + | |
| 35901 | + | |
| 35902 | + | |
| 35903 | + | |
| 35904 | + | |
| 35905 | + | |
| 35906 | + | |
| 35907 | + | |
| 35908 | + | |
| 35909 | + | |
| 35910 | + | |
| 35911 | + | |
| 35912 | + | |
| 35913 | + | |
| 35914 | + | |
| 35915 | + | |
35875 | 35916 | | |
35876 | 35917 | | |
35877 | 35918 | | |
| |||
35905 | 35946 | | |
35906 | 35947 | | |
35907 | 35948 | | |
| 35949 | + | |
| 35950 | + | |
| 35951 | + | |
| 35952 | + | |
| 35953 | + | |
35908 | 35954 | | |
35909 | 35955 | | |
35910 | 35956 | | |
| |||
60744 | 60790 | | |
60745 | 60791 | | |
60746 | 60792 | | |
| 60793 | + | |
| 60794 | + | |
60747 | 60795 | | |
60748 | 60796 | | |
60749 | 60797 | | |
| |||
60770 | 60818 | | |
60771 | 60819 | | |
60772 | 60820 | | |
| 60821 | + | |
| 60822 | + | |
60773 | 60823 | | |
60774 | 60824 | | |
60775 | 60825 | | |
| |||
60806 | 60856 | | |
60807 | 60857 | | |
60808 | 60858 | | |
| 60859 | + | |
| 60860 | + | |
60809 | 60861 | | |
60810 | 60862 | | |
60811 | 60863 | | |
| |||
60865 | 60917 | | |
60866 | 60918 | | |
60867 | 60919 | | |
| 60920 | + | |
| 60921 | + | |
60868 | 60922 | | |
60869 | 60923 | | |
60870 | 60924 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
224 | 226 | | |
225 | 227 | | |
226 | 228 | | |
| |||
242 | 244 | | |
243 | 245 | | |
244 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
| |||
921 | 931 | | |
922 | 932 | | |
923 | 933 | | |
| 934 | + | |
| 935 | + | |
924 | 936 | | |
925 | 937 | | |
926 | 938 | | |
| |||
992 | 1004 | | |
993 | 1005 | | |
994 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
995 | 1019 | | |
996 | 1020 | | |
997 | 1021 | | |
| |||
1199 | 1223 | | |
1200 | 1224 | | |
1201 | 1225 | | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1202 | 1243 | | |
1203 | 1244 | | |
1204 | 1245 | | |
| |||
1211 | 1252 | | |
1212 | 1253 | | |
1213 | 1254 | | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1214 | 1294 | | |
1215 | 1295 | | |
1216 | 1296 | | |
| |||
1897 | 1977 | | |
1898 | 1978 | | |
1899 | 1979 | | |
| 1980 | + | |
| 1981 | + | |
1900 | 1982 | | |
1901 | 1983 | | |
1902 | 1984 | | |
| |||
1933 | 2015 | | |
1934 | 2016 | | |
1935 | 2017 | | |
| 2018 | + | |
| 2019 | + | |
1936 | 2020 | | |
1937 | 2021 | | |
1938 | 2022 | | |
| |||
1969 | 2053 | | |
1970 | 2054 | | |
1971 | 2055 | | |
| 2056 | + | |
| 2057 | + | |
1972 | 2058 | | |
1973 | 2059 | | |
1974 | 2060 | | |
| |||
1995 | 2081 | | |
1996 | 2082 | | |
1997 | 2083 | | |
| 2084 | + | |
| 2085 | + | |
1998 | 2086 | | |
1999 | 2087 | | |
2000 | 2088 | | |
| |||
0 commit comments