devsu / keycloak-nodejs-multirealm

Keycloak NodeJS Multi Realm Adapter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

different secret per realm

jardakotesovec opened this issue · comments

Hi,
I have similar use case where I need to have multiple realms handled with keycloak. I am bit confused that this middleware seems to just have exactly same config for all keycloak instances except the realm name. How could I set different secret (`{credentials {secret: 'secret123' }}) for different realms?

I am wondering how you actually using that - you somehow imported same secrets in each realm? Or maybe I am missing something and is possible to set different secrets per realm?

Any feedback appreciated. Thanks!

Hi @jardakotesovec. We built this module for bearer-only clients, so we didn't add support for different client secrets. A PR would be welcome though ;)

@jardakotesovec did you find a solution for this?

If we could authenticate the client with JWT then we could use a common private key across multiple realms, but I couldn't get the keycloak nodejs adapter to work with the JWT's.

@MumblesNZ Hi, were able to use original keycloak-nodejs-connect with this approach. With this strategy I can have multiple Keycloak instances with difference configurations and pick the correct one for each request.

We are using this approach in production and works just fine.