You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated API requests can carry an AbortSignal in RequestContext, but KubeConfig.applySecurityAuthentication() does not pass that signal to exec credential authentication. If an exec plugin hangs, aborting the request cannot stop the plugin before the HTTP request begins. The call can outlive its deadline.
Client Version
Reproduced against current main (2.0.0, 426a09af). The affected exec-auth path also exists in 1.4.0.
Server Version
Not applicable: the request stalls during credential acquisition, before contacting the API server.
To Reproduce
Configure a KubeConfig user with an exec credential command that waits instead of returning credentials.
Create a generated API request with context.setSignal(controller.signal) before security authentication runs.
Abort the controller while the exec command is running.
The credential process remains active and the request does not settle until that process exits independently.
Expected behavior
Cancellation should stop a signal-bound exec credential process, wait for it to close, reject the request, and avoid caching its output. A signal that is already aborted should prevent the command from spawning, including when cached credentials exist. Calls without a signal should retain their existing behavior.
With a waiting exec plugin, the call remains pending after the timer aborts. The same behavior occurs when another task cancels the controller or an AbortSignal.timeout() deadline expires.
Environment (please complete the following information):
OS: macOS and Linux (POSIX process groups); Windows should terminate the direct child process
Node.js version: 22
Cloud runtime: none
Additional context
The signal needs to be set before authentication; request middleware runs later. I have a regression covering abort, deadline, child processes, cached credentials, and independent concurrent requests.
Activity