Http Proxy Manager Token Expired Errors #626
-
What product are you having troubles with?Console What Console version are you using?Suite v14.0, Console v1.118.9 DescriptionWe are having a problem with the Http Proxy Manager. It seems to be making calls to downstream applications with tokens that are milliseconds from expiring, thereby causing those applications to return 401s and the Http Proxy Manager to log the "token expired" error. From my understanding, this is how the plugin handles tokens:
Right now, our token expiration is set to 1 hour (3600 seconds, technically). Currently in our busiest namespaces, we see that every hour on/near the hour mark, microservices return 401s and there is an accompanied "token expired" log by the Proxy Manager. It seems like what's causing this is that the token is milliseconds from expiring, we make one final call, get a 401 back, log the error, then refresh the token and everything is fine for another hour. This is causing pain for our teams as it's triggering alerts and failed requests in our older workflows that don't have high resiliency. It's worth noting that we have this problem in projects using various versions of the plugin, from latest (3.5.0) all the way back to 1.x and everything in between. I believe this is the same root issue that was brought up in this discussion: #386. It's also worth noting that a comment on the thread in that discussion mentioned setting up a meeting to talk about this further, but that meeting never actually happened. Actual OutcomeOn a cadence that matches our configured token expiration (currently set to 1 hour), applications downstream of the Http Proxy Manager return 401s and the Proxy Manager logs a "token expired" error. Expected OutcomeHttp Proxy Manager handles token expiration in a way that ensures that downstream applications are called with a valid token and won't return 401s on an hourly cadence. Perhaps we could have a configurable way to preemptively mark a token as expired. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Hi @KarissaBrummell, |
Beta Was this translation helpful? Give feedback.
Hello, @KarissaBrummell.
We have improved the microservice to avoid this race condition by modifying the logic.
In addition, in version v3.6.0, we have added the ability to configure TOKEN_PREEMPTIVE_EXPIRY_SECONDS (the default value is 30 seconds).
Please let us know if your issue has been resolved.