Custom Identity Provider in SpringBoot

Hello, everyone.

I am implementing my own IdentityProvider in Camunda and I would like to know whether I am on the right path or not.

As of now, I have an implementation of ReadOnlyIdentityProvider that overrides the checkPassword method (it just returns true as of now). The thing is that after the checkPassword method is invoked, the method UserResourceImpl.getUserProfile kicks in. The problem here is that this method ends up invoking IdentityService.createUserQuery().userId(resourceId).singleResult() which will eventually hit the database.

On the provider I am implementing, I don’t want that call to the database to take place, I want it to go to AWS Cognito instead. My workaround was to create my own implementation of UserQuery and return this custom implementation on MyClassImplementingReadOnlyIdentityProvider.createUserQuery. Then, on my UserQuery implementation, I reimplemented the singleResult method so it fetches information from AWS Cognito.

Is this approach correct or there should be somewhere else I should reimplement things?

TL;DR: is reimplementing singleResult in a subclass of UserQuery the right way to customise where Camunda fetches user information from?

Thank you in advance,

Best regards

@rivins , I am also trying to achieve the same. Did you find any solution for this? Please let me know.

Thanks in advance.