gabriel-farache opened a new issue, #1898: URL: https://github.com/apache/incubator-kie-issues/issues/1898
Whenever a workflow starts, if the system finds access tokens in the HTTP headers, they must be saved in the secondary near cache. This second cache is required for cases where the workflow can be interrupted, such as waiting for an async response or callbacks from other actors. The system must also perform the token exchange and [save the access and request tokens to the primary cache](https://docs.google.com/document/d/1N93q1Kwjja3YCE38s4MMXRIRq_FOucvpZIUgS7MUOqk/edit#heading=h.7ce8nscuz4xi). This action is required because the original access token might expire while the workflow execution is interrupted. The refresh token allows the workflow to acquire a new token once the system resumes its execution. Usually, refresh tokens have a longer expiration time. The cache key comprises the workflow instance ID and the "Security ID" [sanitized](https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names) name separated by a pipe. For example, "0000-1111-2222-3333|acme_financial_oauth." "Security ID" is the "SecurityScheme" name found in the corresponding [OpenAPI spec file](https://spec.openapis.org/oas/latest.html#security-scheme-object): ``` securitySchemes: acme-financial-oauth: 👈 type: oauth2 flows: clientCredentials: authorizationUrl: http://localhost/auth/realms/acme/protocol/openid-connect/auth tokenUrl: http://localhost/auth/realms/kogito/acme/openid-connect/token scopes: {} ``` Quarkus has cache implementation support that we can leverage in this requirement. See [Application Data Cache](https://quarkus.io/guides/cache) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
