Repository navigation
Conversation
closes: keycloak#33800 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
|
I just gave this branch a try Terminal 1 without infinispan Export in separate terminal works Terminal 1 with infinispan: Export in separate terminal fails (as expected) with: I think this is fine, as one usually does not run Keycloak with embedded h2 in clustered mode. |
@shawkins I've just briefly checked it and it might be possible to bind it to address we want: |
|
Thinking about it more there are two separate cases here:
|
@shawkins Isn't it? I think it might simplify things a little bit as users would not need to provide the DB properties, right? So we can probably agree that we need to document some "workaround" for the containerized approach and the question is what's gonna be better, right? Could you try to show the approach with the local directory mount? Or what would you suggest? |
Only if you mount location is directly in a keycloak install. The user showing the workaround on #33800 (comment) copied the file to temp location instead.
Let's assume we force the bi 8000 nding of the h2 server to localhost and a well-known port, we at least need to update the examples for the port binding and the mount:
Then
Using a volume would probably be better so we don't have to show / assume a local working directory. |
|
So we can either:
Either way the user is on the hook for cleaning up the external location or volume. The only practical benefit to the first approach is that you don't have to be running the start-dev container. |
|
Given the lack of additional feedback, I'm assuming at this point we can just expand on the copy approach instead. |
|
Not sure if this was mentioned in this context, but we needed to disable |
It hadn't been yet. Based upon the discussion above if we were to continue with this path, we'd forcably set the h2 server bind address to localhost and use a well known / configurable port. The only possible further workaround is to use AUTO_SERVER only for start / start-dev while the other commands would use fully remote connections. However this would be a breaking change for some and also require that the keycloak container is running to perfrom an export. |
Draft of automatically adding support for AUTO_SERVER.
This restricts the auto close changes for jdbc ping to only the case when infinispan is the cache (a check for non-custom or non-jdbc ping stack seems too involved).
There is a security implication here because h2 chooses to bind to a non-localhost ip if available. For example from my lock.db file: server=192.168.1.55:33123 - so we may not want to automatically enable this mode.
closes: #33800
cc @ryanemerson @thomasdarimont @Dissem @mabartos @vmuzikar