Skip to content

Reject BMC login failure markers in get_java_viewer#40

Open
nesvet wants to merge 10 commits into
sciapp:developfrom
nesvet:feat/get-java-viewer-login-validation
Open

Reject BMC login failure markers in get_java_viewer#40
nesvet wants to merge 10 commits into
sciapp:developfrom
nesvet:feat/get-java-viewer-login-validation

Conversation

@nesvet

@nesvet nesvet commented Jul 7, 2026

Copy link
Copy Markdown

Summary

get_java_viewer treated ASMB8 BMC login failure markers such as Failure_Login_* as valid session cookies when the BMC returned HTTP 200. The child then downloaded HTML session_expired content as JNLP, kept noVNC running, and the server UI hung on "Waiting for the Docker container to be up and ready...".

Changes

  • docker/get_java_viewer.py — reject session cookie values matching failure markers before starting the child
  • docker/get_java_viewer.py — validate downloaded content starts with <?xml or <jnlp

Child exit codes remain 3 (login) and 4 (download), so the server can surface typed connect errors.

Test plan

  • Wrong BMC password on ASMB8 → LoginFailedError, exit 3, no supervisord
  • Valid credentials → JNLP saved, child starts normally
  • Unauthenticated JNLP download → DownloadFailedError, exit 4

Tested on ASUS ASMB8-iKVM firmware 1.14.2: wrong password fails before child startup; valid password loads JViewer.

nesvet added 10 commits June 29, 2026 00:51
Add default-off template flags and child env passthrough for MD5 JAR
algorithms and IcedTea certificate ignore, scoped to the ephemeral KVM
container only. Point stretch child image apt sources at archive.debian.org.
Add cleanup_stale_kvm_children() and call it from start_kvm_container.
Run blocking docker subprocess work in a thread pool so Tornado's IOLoop
stays responsive during connect. Improve exit 125 error message when the
noVNC port is already in use.
Schedule WebSocket additional_logging on the IOLoop from worker threads
during stale-child cleanup to avoid corrupting Tornado WebSocket state.
Add cleanup_stale_kvm_children() and call it from start_kvm_container.
Run blocking docker subprocess work in a thread pool so Tornado's IOLoop
stays responsive during connect. Schedule additional_logging on the IOLoop
from worker threads. Improve exit 125 error message when the noVNC port
is already in use.
ASMB8 returns HTTP 200 with SESSION_COOKIE values such as
Failure_Login_* on bad credentials. Treat those as LoginFailedError
before starting the child, and validate downloaded JNLP content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant