Repository navigation
48553: [LTI] send the LTI calls through the proxy of ILIAS - #12456
Merged
Merged
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.
Mantis: https://mantis.ilias.de/view.php?id=48553
The LTI component does not use the proxy configured in ILIAS. celtic/lti sends its calls (key sets of platforms and tools, access tokens, Names and Role Provisioning Services, Assignment and Grade Services) with its own cURL client, which does not know the proxy settings of ILIAS. On servers that can only reach other hosts through that proxy, launches are refused with "JWT signature check failed" and grades are not sent.
Fix
ilLTICurlClientsends the calls of celtic/lti withilCurlConnection, which applies the proxy settings of ILIAS like the other calls of ILIAS.ilLTILibraryLoggeruses it only when the proxy of ILIAS is active. Without a proxy nothing changes: the library keeps its own client, which still follows the proxy settings of the environment of the server.ilLTIHttpClientlogs a warning with the cause (for example, that the proxy cannot be reached), which the library otherwise only reports as a failed signature or service call.Testing
With the proxy of ILIAS pointing to a proxy that only opens tunnels to port 443, every call went through the proxy: launch, Names and Role Provisioning Services, grades on launch and by the cron job, deep linking as tool and as platform, and the token endpoint. With the proxy active but not reachable, the launch is refused and the log shows the warning with the cause. Without a proxy, everything works as before and no call goes to the proxy.
ilLTICurlClientTestcovers a call through a proxy that cannot be reached.