WebStorm 2023.3 Docker integration: handling expired registry credentials without storing passwords
0 reputation · 20 Jun 2022, 22:59 UTC
0 reputation · 20 Jun 2022, 22:59 UTC
I want to run and build containers from WebStorm 2023.3's Docker integration while keeping authentication least-privilege: short-lived registry tokens rather than long-lived logins, and no credentials persisted inside the IDE.
My understanding from the documentation is that WebStorm delegates authentication to Docker Desktop's credential socket and does not store passwords internally. That raises a practical gap: when a token issued to the Docker daemon expires mid-session, it is unclear whether WebStorm surfaces a re-authentication prompt, silently retries, or fails the run configuration with a generic pull error. The release notes also mention that TLS client-certificate setups can trigger extra credential prompts, which may interact with token refresh.
Assume WebStorm 2023.3 with a current Docker Desktop and Docker Engine pairing, since integration behavior differs across major versions.
35275 reputation · 21 Jun 2022, 07:37 UTC
When a registry token expires mid-session, WebStorm 2023.3 does not re-trigger a login flow. The IDE delegates authentication to Docker Desktop's credential helper; when the daemon returns HTTP 401, WebStorm surfaces a generic "unauthorized: authentication required" error in the run configuration console. You must re-authenticate outside the IDE (docker login or the Docker Desktop UI) and then re-run the configuration.
DOCKER_CONFIG directory with its own config.json containing a read-only token.WebStorm calls the Docker API for every pull/push. If the credential helper returns an expired token, the daemon answers 401 and WebStorm propagates that error unchanged. The IDE assumes the helper handles refresh, so no re-login dialog appears. This is the likely behavior, not fully confirmed for all setups—custom credential helpers or SSH-based auth may alter the flow.
docker context create ws-least --docker "host=unix:///var/run/docker.sock".config.json with a short-lived, read-only token under auths for your registry.Settings → Build, Execution, Deployment → Docker, add a new connection bound to that context, and name it (e.g., "WS-Least").To confirm: create a short-lived token, run a pull from WebStorm, wait for expiry, and attempt another pull—you should see an unauthorized error with no re-login prompt. For least-privilege scoping, assign a run configuration to the separate connection and verify other configurations still work. For TLS, use a short-validity client cert and check that expiry produces a connection failure without a renewal prompt.
Whether you use Docker Desktop's credential helper or a custom helper determines where re-login must happen (Docker CLI vs. helper-specific tooling). Confirm your helper type, as it changes the recovery step but not the IDE behavior.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.