Reject BMC login failure markers in get_java_viewer#40
Open
nesvet wants to merge 10 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_java_viewertreated ASMB8 BMC login failure markers such asFailure_Login_*as valid session cookies when the BMC returned HTTP 200. The child then downloaded HTMLsession_expiredcontent 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 childdocker/get_java_viewer.py— validate downloaded content starts with<?xmlor<jnlpChild exit codes remain 3 (login) and 4 (download), so the server can surface typed connect errors.
Test plan
LoginFailedError, exit 3, no supervisordDownloadFailedError, exit 4Tested on ASUS ASMB8-iKVM firmware 1.14.2: wrong password fails before child startup; valid password loads JViewer.