Spring Application (ear) on JBoss using keycloak

Viewed 19

I have a spring application (not boot) that is deployed on a jboss 7.2.4 as an .ear file. For security reasons I have to protect all REST-API ports that are provided by the application. For this our AD provides users and user groups to use.

As I cannot migrate the application into spring boot I have to use the existing spring/jboss installation and have to use keycloak for security handling.

I found no information how to use keycloak inside an jboss installation. Can anybody help? Is it possible at all?

1 Answers

Just configure an authorities converter to map authorities from keycloak roles and configure your authentication converter to use this authorities converter.

You can refer to this article for @Beans definition (yes, it is boot app, but it configures the two beans I'm talking about).

Related