devsu / keycloak-nodejs-multirealm

Keycloak NodeJS Multi Realm Adapter
Apache License 2.0
30 stars 12 forks source link

different secret per realm #1

Open jardakotesovec opened 6 years ago

jardakotesovec commented 6 years ago

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!

c3s4r commented 6 years ago

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

MumblesNZ commented 5 years ago

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

jardakotesovec commented 5 years ago

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