Please let me know if this is not the right place to post, but I have been looking all over for information regarding this and can't seem to find a concise answer.
I have been attempting to use keycloak to meet our application's user management requirements. While I have found keycloak to be very capable and quite effective, I have run into what may be a dead end for our usage.
Background:
Traditionally, our application has used a very basic login framework that would verify the authentication. Then using a third party application, that we cannot change , identify the roles that user would have via a wsdl operation and insert into our applications database.
For example, if we verify the user John Doe exists and authenticate his credentials, we call the wsdl in our java code to get what roles that user should have (super user, guest, regular user). Obviously this entire framework is pretty flawed and at the end of the day, this is why weve chosen to use keycloak.
Problem
Unfortunately, as I mentioned we cannot change the third party application, and we must get user role mappings from this wsdl operation. I know there is a way to create/modify keycloak's users and roles via java functions. However, in order to keep this architecture modular is there a way to configure the authentication flow to reach out to this WSDL on keycloaks side for role mapping ? (i.e. not in the application code but maybe in a scriplet in the authentication flow)
What I am looking for is essentially how to configure the authentication flow to run something as simple as "hello world" in java after the credentials are verified but before access is granted.
Not sure if the Authentication SPI could be used