Skip to main content

Supermicro HTML5 iKVM (ATEN AST2100) to standard RFB/VNC-over-WebSocket transcoding gateway

Project description

ikvm-gateway

A standalone transcoding proxy that bridges a Supermicro HTML5 iKVM console (the proprietary Nuvoton/InsydeVNC protocol with an ATEN AST2100 video codec) to a standard RFB/VNC stream over WebSocket, so any stock noVNC client can view and control the BMC console. Credentials never reach the browser.

[noVNC browser] <-- standard RFB 3.8 over WS, security None (our origin) --> [ikvm-gateway]
                                                                                   |
                                          InsydeVNC over WSS (SID cookie + token) / TLS
                                                                                   v
                                                                          [Supermicro BMC]

How it works

  1. Upstream (src/ikvm_gateway/upstream/) — authenticates to the BMC (web login -> SID cookie; Redfish OEM IKVM launch -> per-session entry_value token), opens wss://<bmc>/, completes the InsydeVNC type-16 handshake (echo RFB 055.008, security type 0x10, send token[24] + zero[24]), then decodes each 0x57 AST2100 rectangle into an RGB framebuffer.
  2. Decoder (rust/, shipped as ikvm_gateway._ast2100) — the AST2100 codec, implemented in Rust (PyO3), reimplemented from the board's own served decoder. Full-frame decode is ~1-3 ms. It is bundled into the same wheel as the Python package.
  3. Downstream (src/ikvm_gateway/downstream/) — a standard RFB 3.8 server offering security None, serving the framebuffer as Raw over a binary WebSocket. Stock noVNC connects directly.
  4. Input (src/ikvm_gateway/input/) — translates RFB key/pointer events (X11 keysyms) into ATEN HID KeyEvent/PointerEvent messages.

Install

From PyPI (prebuilt wheels bundle the native decoder; no Rust toolchain needed):

pip install ikvm-gw

For development, requires Python >= 3.12, uv, and a Rust toolchain. The project builds as a single maturin mixed Rust/Python wheel:

uv sync
# build the Rust decoder into the venv (reads ./pyproject.toml + ./Cargo.toml)
VIRTUAL_ENV="$PWD/.venv" uv run maturin develop

Run

Provide BMC credentials in a local secret file (git-ignored), three lines:

<bmc-host-or-ip>
<bmc-username>
<bmc-password>

Start the gateway (it prints a generated control API key to stderr):

uv run python -m ikvm_gateway --secret secret --bind-host 127.0.0.1 --bind-port 5700

Use from noVNC

Turnkey local viewer

uv run python -m tools.launch_viewer --api-key <key-printed-by-the-gateway>
# then open the printed http://127.0.0.1:8800/ URL in a browser

Manual integration

The downstream is plain RFB 3.8 (security None) over a binary WebSocket, so unmodified noVNC works. The one-time session ticket is presented via the WebSocket subprotocol:

  1. Server-side (never in the browser), fetch a ticket with the API key:
    GET http://<gateway>/sessions
    Authorization: Bearer <API_KEY>
    -> {"status":200,"message":"session ticket issued","data":{"ticket":"<ticket>"}}
    
  2. Connect noVNC, passing the ticket as a WebSocket subprotocol:
    new RFB(document.getElementById("screen"), "ws://<gateway>/vnc", {
      wsProtocols: ["<ticket>"],
    });
    

Security model (per REQUIREMENTS.md §8)

  • BMC credentials and the session token never reach the browser; the gateway terminates upstream auth and offers RFB security None downstream.
  • The BMC host is fixed from server configuration (the secret file / config), never taken from a client request — no SSRF.
  • The downstream control endpoint requires a bearer API key (constant-time compared). It issues one-time, short-TTL tickets; the ticket is consumed on the WebSocket handshake and never appears in a URL, query string, or log.
  • Per-session and global concurrency caps, idle and max-duration timeouts, and send-side backpressure are enforced.
  • Upstream TLS to the BMC uses an unverified context (self-signed BMC certs are the norm; the management network is the trust boundary).

Status and limitations (v1)

  • Verified end-to-end against a live Supermicro AST2500/2600 board: the console renders in a standard RFB client and keyboard input reaches the host.
  • The decoder is stateless, so the upstream requests full (non-incremental) frames each refresh (a full AST2100 frame decodes in ~1-3 ms). Making the decoder stateful to support incremental/skip blocks is a planned optimization.
  • Downstream encoding is Raw only; Tight/ZRLE is a planned optimization to cut bandwidth.
  • Only the Supermicro HTML5 / AST2100 (0x57) path is implemented; the VQ / low-JPEG / skip block paths in the decoder are ported but not yet exercised on the wire.

Tests

uv run pytest -q     # Python
cargo test           # Rust decoder

Release

Tagging a version (e.g. git tag v0.1.0 && git push --tags) triggers .github/workflows/pypi.yaml, which builds abi3 wheels (Linux x86_64/aarch64, macOS x86_64/arm64, Windows x64) plus an sdist and publishes to PyPI via Trusted Publishing (OIDC) — register the repo as a Trusted Publisher for the ikvm-gw project on PyPI first.

License

GNU Lesser General Public License v3.0 or later (LGPL-3.0-or-later). See COPYING.LESSER (LGPL terms) and COPYING (the GPL-3.0 text the LGPL builds on).

noVNC is loaded unmodified from a CDN at runtime and is not redistributed here (noVNC is MPL-2.0).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ikvm_gw-1.0.0.tar.gz (123.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ikvm_gw-1.0.0-cp312-abi3-win_amd64.whl (158.0 kB view details)

Uploaded CPython 3.12+Windows x86-64

ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (291.0 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ x86-64

ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (287.0 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

ikvm_gw-1.0.0-cp312-abi3-macosx_11_0_arm64.whl (259.1 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

ikvm_gw-1.0.0-cp312-abi3-macosx_10_12_x86_64.whl (260.4 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file ikvm_gw-1.0.0.tar.gz.

File metadata

  • Download URL: ikvm_gw-1.0.0.tar.gz
  • Upload date:
  • Size: 123.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ikvm_gw-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1eb1ddfb2701c7a1f72b28d3a55a9625817a0193a16e1152fa85d28b58785b5d
MD5 a3624d182b1047878c4dc8a8d6104242
BLAKE2b-256 06598e635f2992334e95f0709b0869b875920d3e416241f7df44387ec6800459

See more details on using hashes here.

Provenance

The following attestation bundles were made for ikvm_gw-1.0.0.tar.gz:

Publisher: pypi.yaml on DoyunShin/ikvm-gw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ikvm_gw-1.0.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: ikvm_gw-1.0.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 158.0 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ikvm_gw-1.0.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f3735fcd00b7b66af61fbec73ff945ea23d50f08b62706bd266497a1e35d8cd2
MD5 321e436b918748089ec89561fdab6c1f
BLAKE2b-256 f28be10ccd157a738d884211ad197fad75b6d1e334a6d87185f65750fe0f2b13

See more details on using hashes here.

Provenance

The following attestation bundles were made for ikvm_gw-1.0.0-cp312-abi3-win_amd64.whl:

Publisher: pypi.yaml on DoyunShin/ikvm-gw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 12e453e82bf2dbb996b5da8c649a24531f9c131e0e3bf6ad698d8a4b97c5ed70
MD5 58829ef9449025d4ae50bc7b6dedeafb
BLAKE2b-256 67db0217eb3e67d4d146d3d052d153fe1fad37e790b56acd160cbf7b23c3a29b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yaml on DoyunShin/ikvm-gw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f34377724c88b692423883a8856d65ed52ce5ca154b282d05020fcd288238350
MD5 19322de153ac1816f594e99f525e4f90
BLAKE2b-256 b6cc8e890ea5dd8b692a8abcfe9906145f861e351f07e4fc1c2d38d1877e6079

See more details on using hashes here.

Provenance

The following attestation bundles were made for ikvm_gw-1.0.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi.yaml on DoyunShin/ikvm-gw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ikvm_gw-1.0.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ikvm_gw-1.0.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b614d6246286f893aa1f6124d38630288c73c33518b2c071550706d1d8432d66
MD5 1526af6e53ec19406d5117496eda546b
BLAKE2b-256 6cbcd51ce55edd8dea88b790053e321e7b89e1da8bb8e4616e626a4ee543ab41

See more details on using hashes here.

Provenance

The following attestation bundles were made for ikvm_gw-1.0.0-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: pypi.yaml on DoyunShin/ikvm-gw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ikvm_gw-1.0.0-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ikvm_gw-1.0.0-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 81d830fecfff462f3b7babb31841655fb5f992b891995dddca3cbef46ef0bfa7
MD5 4fce43b9781b076ce8dfce75a4109cc3
BLAKE2b-256 0595360de281432ed2f243319f0378ed877b1838db969ae58c8b9fca223228b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for ikvm_gw-1.0.0-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: pypi.yaml on DoyunShin/ikvm-gw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page