User Info from JWT Kogito

137 Views Asked by At

I understand the mechanism of OIDC in Kogito with the help of process-usertasks-with-security-oidc-quarkus example.

However, I have a question about user information. In the given example, the approved field is filled by a Query string. Is there any way to get user information in Kogito? If it doesn't have that feature, can it reflect from header to service?

2

There are 2 best solutions below

0
On

I figure out a temporary fix that problem with help of written Custom Service when using Kogito with Quarkus.

https://quarkus.io/guides/security-jwt

JWT Injection can call from the Service layer when used with Kogito.

It is also possible to propagate user identity to other workflow items with internally tagged process variables.

0
On

The integration with the security context inside the Kogito app is something that is on the radar, see https://issues.redhat.com/browse/KOGITO-6162. That would ignore the query string and use the authenticated user. Perhaps, for now, you could create your own endpoint to retrieve the authenticated information as needed and mimic the same API call that is done in the generated endpoint.