Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Keycloak
  3. Enabling features

Enabling features

Scheduled Pinned Locked Moved Keycloak
26 Posts 7 Posters 829 Views 7 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • girishG girish

      @andreasdueren the package builds the final jar with the features enabled, why does one have to build it again?

      andreasduerenA Offline
      andreasduerenA Offline
      andreasdueren
      wrote on last edited by
      #10

      @girish I thought that was necessary because it didn't seem like the feature was installed on my instance. I'll investigate...

      1 Reply Last reply
      0
      • M Online
        M Online
        msbt
        App Dev
        wrote on last edited by
        #11

        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.

        cc @girish @nebulon

        1 Reply Last reply
        4
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #12

          @msbt thanks, will take a look!

          M 1 Reply Last reply
          1
          • girishG girish

            @msbt thanks, will take a look!

            M Online
            M Online
            msbt
            App Dev
            wrote on last edited by
            #13

            @girish a quick test would be setting --metrics-enabled=false to true, you'll see a message that the server is listening on another port

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #14

              @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)

              1 Reply Last reply
              0
              • M Online
                M Online
                msbt
                App Dev
                wrote on last edited by
                #15

                @girish the problem is that if you add a new provider, the executable needs a rebuild, else it won't recognize it (as far as I understand it)

                1 Reply Last reply
                0
                • M Online
                  M Online
                  msbt
                  App Dev
                  wrote on last edited by
                  #16

                  @girish https://www.keycloak.org/server/configuration-provider#_installing_and_uninstalling_a_provider

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #17

                    @msbt ah ok, this is for providers and not this features thing. So, in your case, there is a custom provider jar file and we have to rebuild keycloak with that?

                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #18

                      mm, I see. Even setting some provider configuration requires a rebuild.. crazy

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gpichler
                        wrote on last edited by
                        #19

                        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.

                        1 Reply Last reply
                        1
                        • S Offline
                          S Offline
                          shrey
                          wrote on last edited by shrey
                          #20

                          @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 the providers folder > add/edit the corresponding conf/env variables in keycloak.conf > trigger the build operation. But it simply restarts the container, while removing all of my changes to the .conf file.

                          1 Reply Last reply
                          1
                          • G Offline
                            G Offline
                            gpichler
                            wrote on last edited by
                            #21

                            @shrey You could try my patch in the MR https://git.cloudron.io/packages/keycloak-app/-/merge_requests/12 :
                            Add the .jar in the providers/, add additional commandline flags in env.sh and then simply restart the container.

                            1 Reply Last reply
                            1
                            • girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #22

                              @gpichler @shrey we will try to get the MR merged soonish . Just have to double check if there is any other workaround we can use because we really dislike code being writable!

                              1 Reply Last reply
                              1
                              • G Offline
                                G Offline
                                gpichler
                                wrote on last edited by
                                #23

                                @girish Out of curiosity: What is your rational for not liking code being writable? Is it a security consideration?

                                1 Reply Last reply
                                0
                                • nebulonN Offline
                                  nebulonN Offline
                                  nebulon
                                  Staff
                                  wrote on last edited by
                                  #24

                                  Security is one but equally important is it for updating apps. If code files are changed we can't test and validate updates and each update will overwrite any local changes anyways.

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    gpichler
                                    wrote on last edited by
                                    #25

                                    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 in env.sh when updating.

                                    I think there are two failure modes after an update: 1) obsolete commandline parameters in env.sh or 2) .jar files in providers/, 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. 🙂

                                    1 Reply Last reply
                                    0
                                    • girishG Offline
                                      girishG Offline
                                      girish
                                      Staff
                                      wrote on last edited by
                                      #26

                                      @gpichler @msbt I have merged it now and published it

                                      1 Reply Last reply
                                      1
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • Bookmarks
                                        • Search