We have a widlfy REST API jaxrs and we want to secure it with keycloak.
The problem is the integration with @SecurityDomain("keycloak")
is working only with an EJB entry-point. it is ignored on class with no @Stateless
annotation
The issue is the entry point become an EJB and EJB poolManaged what is not really a good thing for a stateless application. Moreover all methods in EJB are transactional and we do not want this behavior. So yes we can add an annotation transactional to specify to not use transaction in the method, but i think it is a workaround.
We want to work the most we can with CDI. and have entry point with ejb pool management with in wildlfy 20 EJB in same time can be a bottleneck in a big application.
Any idea ? or proper way to implement keycloak security with CDI ?