Repository navigation
Conversation
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.
What
With User Content Isolation active, IRSS content is delivered from the content domain only. SCORM packages cannot run there yet: a SCO looks up the SCORM API in its parent window and calls it synchronously, which the browser blocks as soon as SCO and player are on different origins.
This PR adds a way to deliver an IRSS container from the ILIAS domain even when the isolation is active:
ContainerURIConsumer::withoutIsolation(). Internally it usesFileDeliveryServices::buildTokenURLWithoutIsolation(),SrcBuilder::getRevisionURLWithoutIsolation()andDataSigning::getSignedStreamTokenWithoutIsolation(), which are marked@internal.The decision is part of the signed token.
deliver.phpserves such a token only on the ILIAS domain (404 on the content domain) and without the cross-origin headers; every other token is still served on the content domain only. Without active isolation nothing changes.Deprecated from the start
We do not want content outside of the isolation. Content delivered this way runs with the session of the user on the ILIAS origin, exactly what the isolation is meant to prevent. All of them are therefore deprecated right away and will be removed with ILIAS 13.
To keep this visible, a new code rule
ilias.deliveryWithoutIsolation(scripts/PHPStan/Rules/ContentIsolation/DeliveryWithoutIsolationRule.php) reports every call ofwithoutIsolation()in consumer code and fails the code-rules gate. A caller has to be allowed explicitly, and the allowance is only valid for ILIAS 12.For Alex Hartwig: how SCORM registers its use
Once SCORM is delivered from the IRSS, the method that builds the package URL has to carry the allowance attribute:
withoutIsolation(), with the reason (SCORM must run without isolation in ILIAS 12 despite the IRSS; with ILIAS 13 SCORM implements a postMessage proxy) and the ILIAS major12../scripts/PHPStan/run_code_rules.sh components/ILIAS/ScormAicc(and thecode-rulesCI job) reports the call.scripts/PHPStan/list_exemptions.sh components/ILIAS/ScormAicclists the allowance.Details:
components/ILIAS/FileDelivery/README.md, section "Delivering on the ILIAS domain", andscripts/PHPStan/README.md.