Enabling features
-
Quick update on this: A customer of mine refined the package and supplied the code to dynamically enable/disable features and also rebuild the executable on restart. Corresponding MR is here .
Until now custom providers were not usable because adding them required a rebuild of the app (which wasn't working due to readonly fs), with this patch this should work.
-
@msbt mm, so while that MR works, it goes against our philosophy of code being readonly at runtime. Wondering if there are any strong reasons to do this. After all, we can just enable the necessary features in the package. Things like --db etc should not be changed by users (the manifest addons are static)
-
wrote 26 days ago last edited by
Yes it's mainly about providers. Changing features is an additional option. I do not think it would be wise to include all possible providers and features upstream whenever a user requests them.
-
wrote 23 days ago last edited by shrey 23 days ago
@girish is there any workaround/solution planned for this (capability to add/modify features)?
Example, i'm trying to add SMS Auth and Webhook Events capabilities, by first adding the
.jar
files to theproviders
folder > add/edit the corresponding conf/env variables inkeycloak.conf
> trigger thebuild
operation. But it simply restarts the container, while removing all of my changes to the.conf
file. -
wrote 23 days ago last edited by
@shrey You could try my patch in the MR https://git.cloudron.io/packages/keycloak-app/-/merge_requests/12 :
Add the.jar
in theproviders/
, add additional commandline flags inenv.sh
and then simply restart the container. -
wrote 22 days ago last edited by
I see. In the case of this MR, the executable (the
.jar
file) is rebuilt on every app startup. Thus, this would not be overwritten by an update. The relevant commandline parameters are persistent inenv.sh
when updating.I think there are two failure modes after an update: 1) obsolete commandline parameters in
env.sh
or 2).jar
files inproviders/
, which were compatible with the previous version but incompatible with the new version. If you want to allow users to select custom features and install custom providers. I think both these options are essentially unavoidable.Let me know if there is something I can improve. I am looking forward to getting this merged.