keycloak with mod_auth_openidc advantages

682 views Asked by At

I am in the middle of setting up SSO in our infrastructure and I am wondering if people would more experience could share their learnings.

  • I already have a reverse-proxy in-front of our system.
  • We have several legacy java apps running on tomcat
  • We have SPA apps as well written in JS
  • We have few APIs that will also need to be protected

I have two ways to set SSO up for us.

  1. set up SSO on the reverse proxy using mod_auth_openidc so our gatekeeper makes sure that anyone who is hitting our services is already validated.

  2. add a keycloak libs to each individual service

My preference is to set this up on the referse proxy.

Are there any disadvantages / best practices when it comes to this?

For legacy apps I would just use the HTTP headers added by the reverse proxy to find user details For the new apps I would like to use the keycloak libs to get user details.

I do not want to go down some routes which is obviously problematic. So Any tips so that I can save some time are very welcome.

So far I have come up with the following list

pros to use a proxy server and mod_auth_openidc

  • Single place to handle all auth specific configuration
  • Abstracts out the implementation detail of the SSO. E.g. we do not need to integrate keycloak into each service. In my opinion this could cause issues if we decided later to actually move to a different SSO. ( I know this does not happen often )

cons to use a proxy server and mod_auth_openidc

  • an additional piece of software to maintain ( bugs etc )
  • possible extra checks on credentials if the app also integrated with keycloak ( not required it is possible but only needed if keycloak specific features are required in the app and those not available in the headers )

I would be interested in other's opinion on the pros and cons?

Thanks

0

There are 0 answers