mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
8bceeb13de
* Enable adjustable clock in trigger service tests changelog_begin changelog_end * Test user side token expiry * Test service side token refresh * Use AccessToken wrapper in TriggerRunnerImpl * Store refresh token in trigger DB * add refresh token to trigger runner config * TriggerTokenExpired message to server * TriggerTokenRefresh message to server * refresh trigger token and update db * Restart trigger with fresh token * Test second token expiry * Refresh token on running trigger changelog_begin * [Triggers] UNAUTHENTICATED errors will now terminate the trigger. These errors are no longer available for handling in the trigger DAML code. Instead, they are forwarded to the trigger service for handling, e.g. access token refresh. changelog_end * todo note * Move triggerRunnerName and getRunner into object * Factor out token refresh * Factor out getActiveContracts * factor out create command * Add logging to token refresh * Handle token expiry in TriggerRunner TriggerRunnerImpl throws a dedicated exception when it fails on an expired access token (any unauthenticated error to be precise). The TriggerRunner supervisor reacts to this child failure by requesting a token refresh and restart on the trigger server and stopping itself. The trigger server requests a new access and refresh token on the auth middleware and restarts the trigger. This works around an issue with actor supervisors in akka-actor-typed. A stop supervisor wrapped within a restart supervisor will not cause a stop as expected. Instead, the restart supervisor will trigger as well and restart the actor. The work around uses a custom behavior interceptor to emulate the appropriate stop supervisors as closely as possible. We cannot properly emulate ChildFailed signals this way, so we use dedicated messages intead. * throw --> Future.failedo * getOrFail helper Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io> |
||
---|---|---|
.. | ||
src/main | ||
BUILD.bazel |