github hyperglass-community/hyperglass v3.0.0-rc.3

pre-release2 hours ago

Security

  • Keep the systemd unit and its environment file out of the app directory. The installation guides put them in /etc/hyperglass, which systemd reads as root and the Docker container can write to, so a compromised container could edit ExecStart, or set COMPOSE_FILE to a Compose file that mounts the host's root filesystem, and run its own commands as root on the host at the next restart. The sample units in .samples now read EnvironmentFile=/etc/default/hyperglass, and the guides copy the unit to /etc/systemd/system/hyperglass.service instead of linking it from /etc/hyperglass. Upgrading: existing units keep working, but keep the old layout and its risk until you move the files as described in Move the service and environment file out of the app directory. A unit copied from the new sample does not start until /etc/default/hyperglass exists (#515).
  • Refuse link-local targets (IPv4 169.254.0.0/16, IPv6 fe80::/10) and IPv6 zone identifiers, such as fe80::1%eth0, by default on every IP rule, including those of the built-in directives. A zone let a visitor choose the router interface a ping or traceroute left from. The new IP rule option allow_link_local: true accepts link-local targets, and a zone only on a link-local host address; a zone on a prefix or on any other address is always refused. As with the other address classes, a prefix is refused only when all of it is link-local, so ::/0 is still accepted (#439). Behaviour change: built-in directives can't accept link-local targets; to query them, add a custom directive whose IP rules set allow_link_local: true.
  • Quote substituted arguments in custom directives on the remaining shell-backed platforms: cisco_apic, corelight_linux, edgecore_sonic, f5_linux, ovs_linux, brocade_vyos, vyatta_vyos and ubiquiti_edgerouter, and their _ssh forms, as #407 did for the other shell-backed platforms. Built-in commands are unchanged (#442). Behaviour change: a custom template on these platforms that relied on shell expansion of the target, or on the target splitting into several arguments, now gets one literal argument.

Added

  • Forced refresh, off by default. With cache.refresh.enable: true, POST /api/query accepts "force": true, which runs a cached query on the device again and replaces its cache entry. The server answers a forced query from the cache when the query ran less than cache.refresh.min_interval (default 30 seconds) ago, or while another forced request for the same query is in progress, so at most one forced run of each query starts per interval. Successful responses include refresh_in, the seconds until a forced query would run. force must be a boolean: a value that cannot be read as one is rejected with HTTP 400, even when forced refresh is disabled. With metrics enabled, a forced run counts as result="bypass" in hyperglass_query_cache_total, and a forced query answered from the cache counts as hit (#552).
  • Per-browser query history. Each browser saves its successful queries, with their output, in local storage (hyperglass.history) and lists them under "Recent queries" on the landing page, with the time each was saved in the viewer's time zone. A saved query opens read-only, without a request to the server; the browser's Back button closes it. Visitors can delete one query, or all of them after a confirmation; all tabs of a browser share one history, so a query deleted or cleared in one tab is gone from the others. Nothing is sent to the server. History is on by default and keeps 10 queries; web.history.enable and web.history.limit (1 to 50) change that, and turning it off also deletes the history a browser has already saved. Turn it off on kiosks and shared terminals. New web.text keys: history_title, history_open, history_delete, history_clear_all, history_clear_confirm, history_clear_cancel, history_back and history_saved_at. History saved by hyperglass-ng under hyperglass.queryHistory is not migrated: each browser deletes it when it loads the page, whether history is on or off (#556, #590).
  • Run a saved query again, or with a new target, from "Recent queries" or from an opened saved query. Run again fills the form with the saved locations, query type, target and variables and submits it through the form, so a required greeting, hostname resolution and validation still apply; New target fills in everything but the target and focuses the target field. Values the configuration no longer has are left out, and removed locations and variable values are named on their fields. Run again only submits the query as it was saved; when anything was left out or changed, it only fills the form. Nothing runs a query from a link. New web.text keys: history_rerun, history_new_target, history_location_unavailable and history_variable_unavailable (#557).
  • The requery button forces a fresh run when cache.refresh.enable is true, instead of returning the cached result. Pressed before the server allows the next forced run, it sends nothing and shows the time left under the result's header, from the new web.text.refresh_cooldown (default Refresh available in {seconds}s), which screen readers announce once per press. params.cache.refresh.enable is now sent to the UI (#553).
  • Keep a directive's results out of query history with retain: false in directives.yaml (default true; built-in directives always retain). In a query of several locations, only the locations whose own directive retains its results are saved. Results saved before a directive was set to retain: false are deleted from each browser's history when it next shows the query form. The flag is exported to the UI with each directive (#558).
  • Fill in the query form from URL parameters: ?location=<id>&type=<id or name>&target=<value>&var.<variable>=<value>, with location repeated for several locations. Values the configuration doesn't offer are left out. The link only fills in the form: the query runs when the user submits it, so a required greeting still applies. See the user guide (#554).
  • Copy a link to the submitted query from the results view. The link fills in the form with the same locations, query type, target and variables, on the page's current address (its origin and path, without its other parameters or fragment); the recipient submits it to run the query. When the browser can't copy, the link is shown in a read-only field to copy by hand. New web.text keys: copy_link, link_copied, query_link (#577).
  • Share snapshots, off by default. With share.enable: true, POST /api/share with a query response's id copies that cached result into a snapshot that GET /api/share/{id} returns until it expires, not extended by reads. The request can pick how long with expiresIn, one of share.timeout_choices (default 7, 30 and 90 days, capped by share.max_timeout, default 90 days, at most a year); without it the snapshot is kept for share.timeout (default 30 days). Sharing the same result again from the same client returns the existing snapshot unchanged, whatever expiresIn says. share.timeout and the choices are sent to the UI. DELETE /api/share/{id} deletes a snapshot with the delete token returned at creation, sent in the X-Delete-Token header. Snapshots are kept in Redis under hyperglass.share:, outside the state cleared on start, so they survive a restart of Hyperglass; to survive a restart of Redis, Redis must persist its data (the shipped compose.yaml doesn't). Creation is limited per client (an IPv4 address or an IPv6 /64) and globally by share.quota (default 10 and 100 per hour), reads and delete requests by share.read_quota, the number of live snapshots by share.max_entries (default 1000; never makes room by deleting) and each snapshot's size by share.max_size (default 256 KiB), so storage is at most 256 MiB with the defaults. A directive with retain: false can't be shared, and a snapshot whose directive is later set to retain: false or removed is no longer served. Stored snapshots are validated before they are returned. Share responses are never cached (Cache-Control: no-store), and POST /api/share takes only application/json bodies. Operators can list and delete snapshots with hyperglass share list, hyperglass share delete <id> and hyperglass share clear. New messages keys: share_result_expired, share_pending, share_not_allowed, share_too_large, share_unavailable, share_not_found, share_unsupported, share_invalid_expiry. With metrics enabled, hyperglass_share_requests_total counts share requests. The query cache entry now also holds the query, its labels, format and runtime. Any result in the query cache can be snapshotted by anyone who can query it. See Share Snapshots. Fork users: hyperglass-ng's cache.share_* keys, params.public_url and /result/<id> links don't carry over (#559).
  • Open a share link: /?share=<id> shows the shared result in place of the form, read-only, with the time the device ran the query and when the link expires, both in the viewer's time zone. The output can be copied; there is no requery, polling or AS path lookup, and the page makes no request but GET /api/share/<id>. Run this query fills the form with the shared query for the visitor to submit (a required greeting still applies), and New query shows an empty form; both remove share from the address. Form parameters in a share link (location, type, target, var.*) are ignored. A missing, expired or deleted share shows messages.share_not_found, an unsupported snapshot messages.share_unsupported, and other failures the new web.text.share_error. Pages served from the UI now have Referrer-Policy: same-origin (and the same policy as a <meta name="referrer"> tag, for a UI served by something else), and the shared result page asks search engines not to index it. New web.text keys: share_title, share_loading, share_error, share_result_time, share_expires, share_run_query, share_new_query (#560).
  • Share a result from the results view. With share.enable: true, each successful result has a Share button next to copy and requery, except while its AS path enrichment is still running and for a directive with retain: false. It opens a popover to choose how long to keep the link (share.timeout_choices, with share.timeout selected) and create it; then it shows the link (<page address>?share=<id>) to copy, its expiry, a notice that anyone with the link can see the result and its target, and Delete Link. The link and its delete token are kept in this browser's local storage (hyperglass.shares, see #562), and the token is sent only in the X-Delete-Token header of the delete request: never in a URL, the link or logs. Links made from earlier results of the same query, before it ran again, stay in the popover. A delete answered with 404 checks once whether the link still exists: if it does (shared again elsewhere, which replaced the token), the link is kept and a note replaces the delete button. A link's lifetime is counted from the server's clock, so a browser clock that is off doesn't drop it. Refused requests show the matching messages entry, never the server's response. share.enable is now sent to the UI. New web.text keys: share_result, share_keep_for, share_create, share_link, share_notice, share_delete, share_deleted, share_earlier_link, share_delete_scope, share_delete_rotated, share_link_expired, share_minute, share_minutes, share_hour, share_hours, share_day, share_days (#561).
  • Share a result from the query history, and keep the links created in this browser. With sharing on, each result of an opened saved query has the Share button, and so does the row of a saved query of one location; the request sends the saved result's timestamp, so the server shares that result or answers 404, and a saved result the server no longer holds shows messages.share_result_expired with a Run again button (the query is never run again on its own). The links created in a browser, from live results or saved queries, are kept in its local storage under hyperglass.shares with their delete tokens, and listed under "Your shared links" on the landing page, whether query history is on or off, to copy or delete later, from any tab and after a reload; Forget all forgets them after a confirmation, and the links keep working until they expire. Saved queries whose result has a live link are marked. Deleting saved queries or clearing the history keeps the links; the Clear all confirmation says so. Expired links are removed with their tokens. With share.enable: false, browsers forget their saved links. For kiosks and shared terminals, share.remember_links: false (default true, sent to the UI) keeps the links and their tokens in the page's memory only, writes nothing to the browser's storage and deletes the links a browser stored before when it loads the page; turn it off there together with web.history.enable. New web.text keys: shares_title, shares_forget, shares_clear_all, shares_clear_confirm, shares_clear_cancel, history_shared, history_share_kept, share_delete_scope_page ({shares} in it, and in share_delete_scope, is shares_title) (#562).
  • Optional rate limit on POST /api/query, off by default. With query_limit.enable: true, each client (an IPv4 address or an IPv6 /64, read through web.client_ip behind trusted proxies) can send query_limit.client_limit queries (default 30; the UI sends one per selected location) per query_limit.window seconds (default 60), and all clients together query_limit.global_limit (default 300). Queries answered from the cache count; requests rejected by validation don't. A query over the limit gets HTTP 429 with Retry-After and the new messages.rate_limited text, and no device is contacted. When Redis is unreachable the limit is not checked. With metrics enabled, rejected queries count as reason="rate_limited". See Query Rate Limit (#584).
  • Warn at startup about unknown keys under a device's credential, which are ignored. The warning names the device and the key, never its value, and suggests a close match; for a device key such as port, it says to set it at the device level. The key is still ignored: a port under credential leaves the device on port 22 (#517).
  • Document rate limiting the routes that don't reach devices at the reverse proxy, with NGINX's limit_req and the third-party rate_limit module for Caddy, with commented examples in the sample configurations (#532).
  • Add a health check and optional Prometheus metrics. GET /api/health checks that Redis answers, that the configuration is in Redis or can be reloaded, and that the UI is built (or disabled), and answers HTTP 200 or 503 with {"status", "checks"}; failure details are logged, not returned. hyperglass healthcheck requests it on HYPERGLASS_HOST and HYPERGLASS_PORT, over IPv4 or IPv6, and exits with status 1 when Hyperglass is unhealthy or unreachable. The image runs it as its Docker HEALTHCHECK, with a 10-minute start period for the first UI build. The shipped compose.yaml no longer defines its own healthcheck, which requested /api/info, so the image's check applies. With metrics.enable: true (default false), Prometheus metrics are served at metrics.path (default /metrics), aggregated across workers: hyperglass_queries_total by device, query type and status; hyperglass_query_errors_total by device, query type and failure reason, which is the error's class in snake case (such as device_timeout or auth_error), invalid_request for a rejected request, service_unavailable while Redis or the configuration in it is unavailable, and otherwise internal_error; hyperglass_query_duration_seconds, the device run time of successful queries not answered from the cache; hyperglass_query_cache_total; hyperglass_build_info; and HTTP request metrics by route template. Device and query type labels come only from validated ids, and a query that fails before validation is labelled unknown, so requests can't add label values. The metrics endpoint is unauthenticated: restrict it at the reverse proxy or firewall. See Health & Monitoring (#519).
  • Make the hard-coded external lookups configurable, with the old values as defaults. web.server_lookups, which isn't sent to the UI, sets the timeout (default 5 seconds) and max_concurrent (default 8) shared by /api/dns and /api/aspath/enrich, the DNS-over-HTTPS dns.resolver (default https://1.1.1.1/dns-query), and each endpoint's per-minute quotas per client and for all clients (dns.client_limit 120 and dns.global_limit 600, aspath.client_limit 30 and aspath.global_limit 120). structured.ip_enrichment gains the WHOIS server, which /api/aspath/enrich also uses (whois_host bgp.tools, whois_port 43, whois_timeout 10 seconds and whois_bulk_timeout 15 seconds), and the PTR lookup limits under reverse_dns (workers 4, max_addresses 32, lookup_timeout 1.0 and query_timeout 2.0 seconds) (#437). Behaviour change: the per-client quotas count an IPv6 client per /64 and an IPv4-mapped IPv6 client per IPv4 address. One IPv6 host could rotate through its /64 and use up the global quota.
  • Add a security policy, SECURITY.md. Report a vulnerability privately through GitHub private vulnerability reporting ("Report a vulnerability" on the repository's Security tab), not in a public issue. The policy lists the supported versions (3.x) and the disclosure process, and the README, CONTRIBUTING and the new issue page link to it (#428).
  • Attest the build provenance and an SPDX SBOM of each published image. The attestations are stored beside the image on GHCR and on GitHub; check them with gh attestation verify oci://ghcr.io/hyperglass-community/hyperglass:<version> -R hyperglass-community/hyperglass. Images published before this change, including 3.0.0-rc.2, have none. See Verify a published image (#430).

Changed

  • Name the Hyperglass contributors next to Matt Love as copyright holders, in LICENSE, the license page of the documentation and the package's license text, and keep his notice as the license requires. The Python package lists Matt Love and the Hyperglass contributors as authors, Jonathan Senecal and Wilhelm Schonfeldt as maintainers, and links the repository, issues and changelog (#626).
  • Standardise configuration defaults: a feature that needs no extra configuration and exposes nothing more is on by default, and a feature that needs configuration or exposes more is off (#631). Default changes: devices[].structured_output is now on for every platform with a structured parser; it was off unless set to true (#413). Platforms without a parser still return text, and true on them is still an error. A structured device offers the table form of each built-in query, such as __hyperglass_frr_bgp_route_table__, in place of the text form, so an API client that sends a built-in query type ID must take the IDs from /api/devices or /api/queries. Restore text output with structured_output: false on the device. docs.enable is now false, so docs.path (/api/docs) returns 404; it was true. Restore it with docs.enable: true. The hyperglass onboard device prompt for structured output now defaults to yes.
  • Document what each setting in .samples/sample_config.yaml and .samples/sample_devices.yaml needs to work: the outbound or browser connections with protocol, port and destination, credentials and files, and whether it exposes more to visitors. The server DNS docs and the web.server_lookups.dns.resolver comment now warn that an internal resolver exposes internal and split-horizon names to every visitor: /api/dns still returns public addresses of internal names, including through CNAMEs, looks up internal names under suffixes it does not refuse, and answers NOERROR or NXDOMAIN so visitors can tell which names exist (#631).
  • Show the cached-result time in the viewer's locale and time zone, with the zone name or offset, for example Nov 20, 2026, 3:00:00 AM EST. The locale decides the 12- or 24-hour clock. The backend's timestamp is UTC without a zone designator, and the tooltip showed it as received (#564, #551). Default change: web.text.cache_icon is now Cached from {time}; it was Cached from {time} UTC. A configuration that sets cache_icon to the old text now labels a local time as UTC; remove the setting or the word UTC.
  • Upgrade the UI to zustand 5 (from 3.7.2). A greeting acknowledgement saved in the browser, including one saved by an earlier version, still keeps the greeting closed when the page loads (#575).
  • Format Python and order its imports with Ruff instead of Black and isort, and check both in CI: ruff format --check . runs next to ruff check ., which now includes import order. For contributors: task format runs ruff format hyperglass, task sort runs ruff check --select I --fix hyperglass and task lint runs ruff check hyperglass. Ruff also writes and checks the # Standard Library, # Third Party, # Project and # Local import heading comments (#594).
  • Publish each commit merged to main as ghcr.io/hyperglass-community/hyperglass:sha-<full commit SHA>, after the same tests and vulnerability scan as a release, to test a fix before it is released. These images are unsupported test builds: there is no floating main tag, and latest moves only on a stable release. A release no longer builds its own image. It checks that the tagged commit's sha-<commit> image carries this repository's main provenance, scans it again and adds the version tag (and latest for a stable version) to it, so the released image is the one that was tested (#458, #388, #499).
  • Run the container image as the unprivileged user hyperglass (UID and GID 10001) instead of root, and leave compilers, npm and pnpm out of the final image. The UI is still built at the first start, from the packaged node_modules, and the image is about half the size (#431). Behaviour change: /etc/hyperglass, or the host directory mounted for HYPERGLASS_APP_PATH, must be writable by UID 10001. The previous image left root-owned files there, so run sudo chown -R 10001:10001 /etc/hyperglass before starting the new image; otherwise the container exits with Permission denied: '/etc/hyperglass/plugins'. SSH key files must be readable by UID 10001, and directories mounted for logging.directory or logging.samples.path writable by it. See Container user and file ownership.
  • Lock the Python dependencies with uv, in uv.lock, instead of Rye. requirements.lock and requirements-dev.lock are removed: packagers and contributors install from uv.lock (uv sync --extra ui for development) and run uv lock after changing pyproject.toml. The image installs the same versions as before, and Renovate now proposes Python dependency updates (#527).
  • Lift the version holds on the CLI dependencies: Typer 0.29.2 or later and Rich 13.9.4 or later, without upper bounds, and no direct Click dependency (Click 8.5 comes with other packages). From these versions, hyperglass with no arguments prints the help and exits with status 2 instead of 0, --help lists commands in the order they are defined instead of alphabetically, and a traceback from an unhandled CLI error no longer shows local variables (#531).
  • Turn the UI's @babel/runtime and @babel/helpers security overrides from the exact version 7.26.10 into ^7.26.10 floors, so both take later 7.x releases (#435).
  • Ship the default UI fonts, Nunito and Fira Code, with Hyperglass, so the UI build no longer downloads them from Google Fonts and works without internet access. A font other than the defaults is downloaded at build time only with the new web.theme.fonts.download: true (default false) (#434). Behaviour change: with a font other than the defaults and download left false, visitors' browsers load that font from Google Fonts instead of from Hyperglass. Set download: true to self-host it as before.
  • Disable Next.js telemetry (NEXT_TELEMETRY_DISABLED=1) in the UI build Hyperglass runs at startup. Every installation that didn't opt out sent anonymous telemetry to Vercel when it built the UI (#433).
  • Leave third-party lookups off in the sample configuration: structured.ip_enrichment.enrich_traceroute, enrich_bgproute and logging.http.enable are now false there, with a comment. An operator who copied the sample sent every public traceroute hop and BGP next hop to bgp.tools over plain-text WHOIS, sent each visitor's IP address to the webhook receiver, and looked that address up at bgp.tools. The new Data Sent to Third Parties page lists each service that Hyperglass or the visitor's browser contacts, what is sent and the setting that controls it (#438).

Fixed

  • Take the remaining fixed English text of the query form and the route table from configuration. New web.text keys, defaulting to the old text: submit_query (Submit Query) and reset_form (Reset), the names of the form's buttons; as_path_internal (Internal), the marker of a locally originated route; as_path_asn (AS{asn}), the tooltip of an AS whose organization isn't known; no_value (N/A), an empty cell; and weight_low_preferred and weight_high_preferred (Lower Weight is Preferred, Higher Weight is Preferred), the weight's tooltip. The locally originated and no communities markers can now be reached with the keyboard, which shows their tooltip, and have an accessible name (#581).
  • Show the route table's age and the time in its tooltip in the language set by the new web.locale, a BCP 47 tag of a language, optional script and optional region such as fr, pt-BR or zh-Hant-TW (default en), on screen and in the copied table. The age (2 hours) was always English, and so were the day and month names of the tooltip. The age's translation is loaded only when it is used; a region without its own translation uses its language's (de-LU uses de, zh-Hant-TW uses zh-tw), and without one the age and the tooltip are English. The tooltip keeps a 24-hour time in UTC with the weekday in every locale; in English it reads Tue, Nov 24, 2026, 08:00:00 UTC instead of Tue, 24 Nov 2026 08:00:00 UTC. The age and weight tooltips can now be opened with the keyboard, stay open after a tap on touch screens, and their text is given to screen readers as the cell's description, even while the tooltip is closed (#605).
  • Take the error shown when the selected locations have no query type in common from the new web.text.no_common_query_types. Only the two nouns were configurable, and the sentence around them was fixed English. {locations} is the locations' names, and {query_location_plural} and {query_type_plural} are web.text.query_location and web.text.query_type with an English plural, as before. The default keeps the old sentence, except that the names are now separated by commas only (Router One, Router Two), without & or a serial comma. A template that can't be formatted is shown as written (#521).
  • Give the shared Redis connection pool socket timeouts. While Redis was unreachable, each request waited as long as the operating system waits on a TCP connection (about 15 seconds in testing) before it got the 503, and held a worker thread for that time. A connection now gives up after HYPERGLASS_REDIS_CONNECT_TIMEOUT seconds (default 3), and a command on an open connection after HYPERGLASS_REDIS_SOCKET_TIMEOUT seconds (default 5); the request then gets the same 503. Starting with Redis unreachable now fails after one connect timeout, instead of waiting again to clear state and unregister plugins. /api/health keeps its own 3-second probe (#570).
  • Check that configuration is present in Redis without a thread-pool job on every request. Every request to any route ran the state recovery check on the worker's shared thread pool, so a client flooding /api/info or the static files could delay every other request. A worker now trusts a successful check for one second, and requests that arrive while a check runs share it. A request that finds state missing still answers 503 and makes the next request rebuild it, and state flushed from Redis is still rebuilt, at the latest by the first request after that second. A query that finds the plugin registry missing from Redis, or not yet marked ready while another worker rebuilds it, now answers 503 the same way, instead of running with no plugins or only some of them and caching unparsed output for the whole cache timeout (#532).
  • Rebuild lost state at once after a host boot. Until any rebuild had failed, the cooldown after a failed rebuild was measured from time zero of the system's monotonic clock, so for the first 30 seconds after the host booted, a worker that lost its state answered 503 instead of rebuilding it (#532).
  • Return HTTP 400 with the failed fields for malformed query requests. Request validation errors previously returned HTTP 200 and were logged as critical (#412, #490). API change: this applies to every route, and external clients that received HTTP 200 with "status_code": 422 in the body now receive HTTP 400 with the same body keys.
  • Resolve a query type by its exact directive id. A query for a custom directive such as ping could run another directive whose id contains it, such as ping6, depending on the process hash seed (#426, #491). API change: queryType is now matched exactly and case-sensitively. A direct API client that sends a partial or differently cased id, such as bgp_route or PING, now gets QueryTypeNotFound. The UI already sends exact ids.
  • Stop returning internal error messages to API clients. An internal error raised during a request, such as a parsing error from an output plugin or a configuration error found while running a query, was returned with its internal message. It is now logged, and the client gets messages.general (#543, #539). API change: these internal errors usually returned HTTP 400, the status of their default warning level, with the internal message, level and keywords. They now return HTTP 500 with messages.general, level danger and empty keywords. A state error, raised when state is missing from Redis during a request, returned HTTP 400 and now returns HTTP 503 with the same body as a Redis outage. Public errors, whose messages come from messages, keep their status and body.
  • Count a query either as a success or as an error, never both. POST /api/query read the configuration from Redis again after recording the query as a success, so a Redis failure at that point also counted it as an error (#582).
  • Keep a stable directive and location group order across restarts. Each device lists its custom directives in the order of the directives file, then its built-in directives, and location groups, like the directive names /api/queries returns, keep the order of the devices file. The order changed on every restart, which reordered the query type menu and rebuilt the UI on every start; with more than one location group, the groups could also reorder and rebuild the UI (#492, #507).
  • Send the headers set on an HTTP error with its response. The API's HTTP error handler rebuilt the response without them, so the lookup quota's 429 from /api/dns and /api/aspath/enrich reached clients without Retry-After, and a 405 without Allow (#585).
  • Return HTTP 404 from GET /api/devices/{id} for an ID that no device has, with messages.not_found ({type} is web.text.query_location) and level warning. The miss is logged at ERROR when the error is created, as every public error is, and as a warning with the method and path, never at CRITICAL. It returned HTTP 500 with messages.general and logged a critical error (#530).
  • Show the "My IP" popover above the submit button. On wide screens the popover opened under the target field was painted beneath the search button (and, on short windows, beneath the footer), so the addresses under it could not be clicked. The popover is now rendered at the end of the page (#271).
  • Show the error border on a query form select with a validation error. The select's style hooks read the error from a context provided by the same component, so they never saw it and an invalid select looked valid. The query target and directive variable selects now also pass their errors to the select, and each select marks its combobox aria-invalid and is described by the field's error message (#513).
  • Make the location cards and the query form selects usable with a keyboard and a screen reader. Each location card is now a checkbox, named by its location and described by its description, that Tab reaches and Space or Enter toggles, with a focus ring for keyboard focus. The cards are grouped under the location field's visible label; the group is marked invalid and described by the field's error message while the field has one, and each named location group is grouped under its heading. When a reused saved query names a location that no longer exists, the first card gets focus. The select target and directive variable selects are named by their field labels, which pointed at IDs the selects' inputs didn't have. The cards' data-checked attribute is replaced by aria-checked (#573).
  • Name the table's page size select and take its options and the page count from web.text, and show the header title button's focus ring for keyboard focus. The select had no accessible name and showed Show 5 whatever the page size was, its options (Show 50) and the page count (Page 1 of 3) were fixed English, and the title button removed its focus ring. New web.text keys: page_size (default Rows per page), page_size_option (default Show {count}) and page_count (default Page {page} of {pages}). The page count is now plain text; its numbers were bold (#548).
  • Report an invalid http block on a platform: http device with the failed field, such as http.method. A platform check replaced that error with Device '...' has platform 'http' configured, but no http parameters are defined.; the check is removed. A device without an http block still loads with the default HTTP configuration, as it has since #397, and the HTTP device documentation no longer calls it a configuration error (#330).
  • Refuse to start when a custom directive uses the id of a built-in directive, such as __hyperglass_juniper_ping__, and name the directive in the error. The custom directive replaced the built-in without any message, and every device that uses built-ins lost that query type; no device could use the custom directive either, because devices ignore directive ids that start with __. To change a built-in command, give the custom directive a new id that doesn't start with __ and leave the built-in out with builtins: false or a list of built-ins on the device (#516). Behaviour change: a directives file with such a directive no longer starts; rename the directive. No working setup is lost, since the directive could not be selected.
  • Apply the IP rule address class policy to IP targets accepted by a pattern rule or a rule without validation. In a custom directive with IP rules, an IP target outside every IP rule, such as ::1, 169.254.1.1 or fe80::1%eth0, reached a later rule such as condition: "*", which accepted it whatever allow_loopback, allow_reserved, allow_unspecified and allow_link_local said. Such a target now gets the IP rule defaults: zoned, loopback, unspecified, link-local and reserved targets are refused. Directives without IP rules, and built-in directives, are unchanged (#495). Behaviour change: to keep accepting one of these targets, add an IP rule that contains it, with the matching allow_* option, before the pattern rule.
  • Make the weekly published image scan scan something. It scanned only latest, which no release has published yet, so every run passed without a scan. It now scans the newest version tag, latest once a stable version exists, and the newest sha- image from main, each once per digest, and fails when an image it expects is missing. Trivy runs by tag and index digest, as in CI, and pulls each image by digest itself, without the Docker socket (#520).
  • Report the same origin AS on every platform: the last ASN of the AS path, the one RPKI validation already used. Juniper, FRR, OpenBGPD and BIRD showed the aggregator AS, which is 0 for most routes, and Arista and Huawei showed the neighbour AS. A route with an empty AS path (iBGP or locally originated) shows the local AS the device reports, or else primary_asn; the text parsers showed 0 (#459, #457).
  • Keep the IPv6 routes of a Juniper BGP route query whose IPv4 reply is empty. The parser stopped at the empty reply, so the structured result had no routes (#448).
  • Log the pnpm install output of the UI build as it was printed. The debug log had a newline between every character (#451).
  • Include web.custom_javascript and web.custom_html in the first UI build, and rebuild the UI when their contents change. The files were written after the build, so a new installation's first build left them out, and editing a file at the same path didn't trigger a rebuild. Existing installations rebuild the UI once after the upgrade (#440).
  • Copy traceroute output the way the table shows it. The copied text showed ASIXP for an exchange point, ASNone for an unknown AS and * for a missing address, hostname or AS; it now shows IXP, — and —, and ASNs without the AS prefix, as the table does (#452).
  • Answer HTTP 503 at once to a request that arrives while the configuration is missing from Redis and another worker is reloading it. The request waited up to 30 seconds for the other worker, holding a thread of the pool that also runs Redis and device calls, and then got HTTP 400 (#436).
  • Load the directives file once at startup, and report an invalid directive as a configuration error that lists the failed fields. A Python directives file (directives.py) ran twice, and an invalid directive stopped startup with a raw Pydantic error; building the configuration error itself failed with a TypeError (#449, #450).
  • Describe hyperglass directives and hyperglass plugins in their own help text. Both used the description of devices, Show all configured devices, so hyperglass --help showed it three times (#453).
  • Quote the BGP community target in the Juniper command used with structured_output: true, as the text command already did. The two commands now differ only by | display xml (#456).
  • Include the query failures from a custom logging.samples.path in the support bundle. hyperglass support-bundle read only the default samples file, so with a custom path the bundle had no query failures. It now reads logging.samples from config.yaml, and uses the default path when the configuration is missing or invalid (#454).
  • Range-check built-in BGP community targets before building the command. Both parts of a standard community must be 0 to 65535, each part of a large community 0 to 4294967295, and the value of an extended target: or origin: community must fit beside its administrator, which must be a valid IPv4 address when it is one. A single number up to 4294967295 is still accepted. Out-of-range values, numbers with leading zeros (such as 065000:0100), more than three parts, dotted values without target: or origin: (such as 192.0.2.1:100) and an unprefixed 65000:4294967295 are refused with the reason, instead of being sent to the router. Custom directives are unchanged (#441).
  • Never send private, reserved, loopback, unspecified or multicast addresses to bgp.tools for IP enrichment. Unspecified and multicast addresses, such as :: or ff02::1, were sent (#473, #444).
  • Give each looking-glass request its own timeout. A result's requests shared one abort timer that was never cleared, so once request_timeout had passed since the first query, a requery failed at once with an abort error, even when the first query had finished in a second (#511).
  • Show a query that fails without an error body, after a timeout, a network error or a response that isn't JSON, as an error with its message. The result stayed collapsed, with the success icon and "Completed in 0 seconds". A timeout now shows messages.request_timeout, and a requery that fails after a success replaces the output with the error (#509).
  • Send a looking-glass query only when the visitor submits or requeries it. A query that timed out, failed on the network or got a response that isn't JSON was sent three more times, reaching the device again on a cache miss, and its error showed only after about four times request_timeout. Result panels also sent their query again when the browser came back online after a network drop (#546).
  • Stop the requery and copy buttons of a result acting while its query runs, and let the keyboard reach them. They were links without an address, so a click on the disabled requery button still sent the query to the device, and Tab skipped both (#510).
  • Give the copy, requery and AS path buttons of a result an accessible name, and let the keyboard reach the AS path button. Screen readers announced each of them as "button". Their names and tooltips come from the new web.text keys copy_output (default Copy Output), reload_query (Reload Query) and view_as_path (View AS Path) (#533).
  • Name the table's page buttons, and take the AS path view's text from configuration. The four page buttons were all named Table Icon Button; their names now come from the new web.text keys first_page (default First Page), previous_page (Previous Page), next_page (Next Page) and last_page (Last Page). More new web.text keys, defaulting to the old text: as_path_title (Path to {target}), the heading of the AS path view; and zoom_in, zoom_out and fit_nodes, its chart controls. With web.text.title_mode: logo_only, the home button keeps web.text.title as its name while the logo loads or when it fails to load (#541).
  • Select the only query type the selected locations have in common, so the form can be submitted without picking it by hand; the form showed no query type and refused to submit. Refuse an empty or whitespace-only target, including one typed and then cleared, which submitted a query with an empty target. Resetting the form from the title no longer leaves the previous query submittable (#512, #514).
  • Keep the query form consistent when the locations change or the form is reset. A location change that removes the selected query type now clears it, with its target and variables, instead of leaving an unavailable query type selected; when the new locations offer it under another directive, the values that directive doesn't offer are dropped. When the form picks the only query type for you, it clears a target entered for another one. Resetting from the title also clears the validation errors shown before (#540).
  • Show a location card as selected whenever its location is. The card kept its own state, so after a reset from the title it still looked selected and took two clicks to select again, and a location filled in without a click, such as from a link or a saved query, didn't look selected (#549).
  • Answer HTTP 503 with a JSON body while Redis is unreachable, whether Redis fails before or during the request. Requests got Litestar's plain-text HTTP 500, because the error handler also read its message from Redis. The body is {"output": "Hyperglass state is unavailable", "level": "danger", "keywords": []}, the answer already given while the configuration is missing from Redis; the Redis error, which names the Redis host, is only logged. Other errors still get HTTP 500 with messages.general, or a fixed message when the configuration can't be read. With metrics enabled, such a failed query counts with reason service_unavailable (#529).
  • Report the origin AS of Huawei structured BGP results correctly. A locally originated route now shows the local AS the router prints, such as 65008, instead of primary_asn: the parser did not read the indented Local AS number line and did not pass it on. VRP's community table has no AS path column, so a community result now shows origin 0 (unknown) instead of primary_asn, which presented every learned route as originated by this network (#627).

Removed

  • Remove the unused ESLint and Prettier packages and their leftover configuration files from the UI. Contributors lint and format the UI with Biome (pnpm run lint, pnpm run format); CI already checks them with pnpm run lint and pnpm run format:check. The pnpm-workspace.yaml overrides for packages that only ESLint pulled in (ajv, brace-expansion, braces, cross-spawn, js-yaml, micromatch, minimatch, picomatch) are removed with them (#618).

Don't miss a new hyperglass release

NewReleases is sending notifications on new releases.