Allow server settings path to be set via settingsFile
query parameter
#1040
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.
Fixes #1014
This allows institutions to easily configure Studio for multiple use cases, without specifying super long config values in query parameters directly.
I am still a bit scared that this might introduce a security vulnerability, but I tried things and thought about it and I think: it does not. Most importantly, we make sure that the passed string is only a single file that lives in the same directory as the 'settings.toml' that would have been loaded anyway. This also prevents Studio from loading config files from external sources. Further consider that all values in the config file can be overwritten via specific query parameters anyway! Well, except
return.allowedDomains
. So this is the only one we care about. But given that an attacker can only chose between all settings files that live in the same directory as 'settings.toml'. So this should be fine, I think. Also note that we cannot just let the query parameter specify arbitrary paths as users can upload videos and attachments to Opencast, so they could inject a settings file that was that is reachable via the same domain.@fsufrre Can you test this and make sure it works for you and solves your feature request? To do that, you need to checkout this branch, run
create-release.sh
and replace the contents of thestudio.jar
in your opencast installation with the contents of theoc-studio*integrated.tar.gz
file. If you prefer, I can also do most of that for you and send you the modified jar file. Just ping me via matrix for that.