keycloak-nodejs-multirealm icon indicating copy to clipboard operation
keycloak-nodejs-multirealm copied to clipboard

different secret per realm

Open jardakotesovec opened this issue 6 years ago • 3 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!

jardakotesovec avatar Sep 17 '18 15:09 jardakotesovec

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

c3s4r avatar Sep 17 '18 18:09 c3s4r

@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 avatar Aug 15 '19 00:08 MumblesNZ

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

jardakotesovec avatar Aug 15 '19 05:08 jardakotesovec