You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "gabriel-farache (via GitHub)" <gi...@apache.org> on 2025/03/27 14:52:49 UTC

[I] Cache Original Access Tokens [incubator-kie-issues]

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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Cache Original Access Tokens [incubator-kie-issues]

Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache closed issue #1898: Cache Original Access Tokens
URL: https://github.com/apache/incubator-kie-issues/issues/1898


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] Cache Original Access Tokens [incubator-kie-issues]

Posted by "gabriel-farache (via GitHub)" <gi...@apache.org>.
gabriel-farache commented on issue #1898:
URL: https://github.com/apache/incubator-kie-issues/issues/1898#issuecomment-3119927226

   https://github.com/apache/incubator-kie-kogito-runtimes/pull/3891 enables persistence of the incoming headers from the request, hence the original auth token will be stored if the feature is enabled.
   No need to do anything else


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org