Repository navigation
feat(ocm): serve CSP-scoped webapp launcher page - #5906
Merged
Merged
Conversation
MahdiBaghbani
requested review from
diocas,
glpatcern,
jessegeens and
rawe0
as code owners
October 15, 2026 16:46
MahdiBaghbani
force-pushed
the
served-webapp-launcher
branch
from
October 15, 2026 19:34
5433ee6 to
9726296
Compare
MahdiBaghbani
force-pushed
the
served-webapp-launcher
branch
from
October 15, 2026 20:56
9726296 to
f527b50
Compare
This was referenced Oct 16, 2026
glpatcern
force-pushed
the
served-webapp-launcher
branch
3 times, most recently
from
October 20, 2026 09:20
088379f to
43233f3
Compare
This was referenced Oct 22, 2026
glpatcern
previously approved these changes
Oct 22, 2026
MahdiBaghbani
force-pushed
the
served-webapp-launcher
branch
from
October 30, 2026 10:36
43233f3 to
a1ac9a2
Compare
MahdiBaghbani
force-pushed
the
served-webapp-launcher
branch
from
October 30, 2026 15:37
a1ac9a2 to
b3c4426
Compare
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
glpatcern
force-pushed
the
served-webapp-launcher
branch
from
November 5, 2026 08:08
1239088 to
74e6ba2
Compare
glpatcern
self-requested a review
November 5, 2026 09:43
glpatcern
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of the cs3org/OCM-STA#20 and cs3org/OCM-STA#48
Summary
POST /sciencemesh/webapp-launch, a protected route that runs the samebuildLaunchas/open-in-appand returns a page that postsaccess_tokenstraight to the validated app URL. Nothing is stored and no unprotected route is added.form-actionis the exact app origin and the submit script runs on a fresh nonce, withno-store,no-referrerandnosniff. Internationalized hosts use their ASCII form, and a host CSP can't name is refused with 400 before any exchange. Error pages carry fixed text andform-action 'none'.access_tokenfrom form-encoded POST bodies in the credentialbearerstrategy (RFC 6750 section 2.2), which closes the old TODO.expired_session_redirect_uriis forwarded only when it points athttps://<provider_domain>.flowchart TD SPA["SPA form POST /sciencemesh/webapp-launch"] --> A{"auth: access-token or access_token"} A -->|"missing or invalid"| U["401"] A -->|"ok"| B["buildLaunch: same offer and path checks as /open-in-app"] B -->|"fails"| ERR["error page: fixed text, form-action 'none'"] B -->|"ok"| H{"app host fits an exact CSP host source?"} H -->|"no, 400"| ERR H -->|"yes, ASCII form"| X["discovery and token exchange"] X -->|"fails"| ERR X -->|"ok"| R{"expired_session_redirect_uri on https://provider_domain?"} R -->|"no"| DROP["field dropped"] R -->|"yes"| KEEP["field forwarded"] DROP --> P["auto-submit page: form-action = app origin, nonce script"] KEEP --> P P --> APP["POST access_token to the app URL"]The part you might ask about is why reva serves a page. If the SPA posted the token itself, its CSP would need every federated app origin in
form-action; this page names only the app of this launch.Config note: the web OIDC token authenticates through the
bearercredential strategy, which is in reva's defaultcredential_chain.bearerintoken_strategy_chain(default["header"]) is only needed for clients that send a Reva token. The reverse proxy must not add its own CSP on this path.