Problem Statement
The jwt that we use to connect a Wormhole app to piko has an expiration date. While we disable closing a piko connection on jwt expiry, other failures, network hiccups, machine restarts, etc, may force the piko agent to need to reconnect. If the jwt is expired, this will fail.
Proposed Solution
I added an API some time ago in Route Registry that allows the exchange of an unexpired piko jwt for a new one with an extended expiration time. This API can be called periodically to refresh the jwt so that a connection can be reestablished.
Failure on the side of wh (process killed, machine goes down, etc) could be recovered if the piko jwt is persisted to some durable storage (disk). Rotating the jwt queues another check in Route Registry to see that the route is up and restores it in the routing table. But, for now, I will consider this functionality out of scope for this issue. We can add it in the future if we see fit.
Exit Criteria
Problem Statement
The
jwtthat we use to connect a Wormhole app topikohas an expiration date. While we disable closing apikoconnection onjwtexpiry, other failures, network hiccups, machine restarts, etc, may force thepikoagent to need to reconnect. If thejwtis expired, this will fail.Proposed Solution
I added an API some time ago in Route Registry that allows the exchange of an unexpired
pikojwtfor a new one with an extended expiration time. This API can be called periodically to refresh thejwtso that a connection can be reestablished.Failure on the side of
wh(process killed, machine goes down, etc) could be recovered if thepikojwtis persisted to some durable storage (disk). Rotating thejwtqueues another check in Route Registry to see that the route is up and restores it in the routing table. But, for now, I will consider this functionality out of scope for this issue. We can add it in the future if we see fit.Exit Criteria
whperiodically rotates thepikojwtbefore expirywhdetects connection failures topikoand attempts to reestablish a connection (with backoff)