Repository navigation
v3.0.0-rc.3
Pre-release
Pre-release
·
8 commits
to main
since this release
Security
- Keep the
systemdunit and its environment file out of the app directory. The installation guides put them in/etc/hyperglass, whichsystemdreads as root and the Docker container can write to, so a compromised container could editExecStart, or setCOMPOSE_FILEto 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.samplesnow readEnvironmentFile=/etc/default/hyperglass, and the guides copy the unit to/etc/systemd/system/hyperglass.serviceinstead 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/hyperglassexists (#515). - Refuse link-local targets (IPv4
169.254.0.0/16, IPv6fe80::/10) and IPv6 zone identifiers, such asfe80::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 optionallow_link_local: trueaccepts 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::/0is still accepted (#439). Behaviour change: built-in directives can't accept link-local targets; to query them, add a custom directive whose IP rules setallow_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_vyosandubiquiti_edgerouter, and their_sshforms, 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/queryaccepts"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 thancache.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 includerefresh_in, the seconds until a forced query would run.forcemust 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 asresult="bypass"inhyperglass_query_cache_total, and a forced query answered from the cache counts ashit(#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.enableandweb.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. Newweb.textkeys:history_title,history_open,history_delete,history_clear_all,history_clear_confirm,history_clear_cancel,history_backandhistory_saved_at. History saved by hyperglass-ng underhyperglass.queryHistoryis 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.textkeys:history_rerun,history_new_target,history_location_unavailableandhistory_variable_unavailable(#557). - The requery button forces a fresh run when
cache.refresh.enableistrue, 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 newweb.text.refresh_cooldown(defaultRefresh available in {seconds}s), which screen readers announce once per press.params.cache.refresh.enableis now sent to the UI (#553). - Keep a directive's results out of query history with
retain: falseindirectives.yaml(defaulttrue; 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 toretain: falseare 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>, withlocationrepeated 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.textkeys:copy_link,link_copied,query_link(#577). - Share snapshots, off by default. With
share.enable: true,POST /api/sharewith a query response'sidcopies that cached result into a snapshot thatGET /api/share/{id}returns until it expires, not extended by reads. The request can pick how long withexpiresIn, one ofshare.timeout_choices(default 7, 30 and 90 days, capped byshare.max_timeout, default 90 days, at most a year); without it the snapshot is kept forshare.timeout(default 30 days). Sharing the same result again from the same client returns the existing snapshot unchanged, whateverexpiresInsays.share.timeoutand the choices are sent to the UI.DELETE /api/share/{id}deletes a snapshot with the delete token returned at creation, sent in theX-Delete-Tokenheader. Snapshots are kept in Redis underhyperglass.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 shippedcompose.yamldoesn't). Creation is limited per client (an IPv4 address or an IPv6 /64) and globally byshare.quota(default 10 and 100 per hour), reads and delete requests byshare.read_quota, the number of live snapshots byshare.max_entries(default 1000; never makes room by deleting) and each snapshot's size byshare.max_size(default 256 KiB), so storage is at most 256 MiB with the defaults. A directive withretain: falsecan't be shared, and a snapshot whose directive is later set toretain: falseor removed is no longer served. Stored snapshots are validated before they are returned. Share responses are never cached (Cache-Control: no-store), andPOST /api/sharetakes onlyapplication/jsonbodies. Operators can list and delete snapshots withhyperglass share list,hyperglass share delete <id>andhyperglass share clear. Newmessageskeys: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_totalcounts 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'scache.share_*keys,params.public_urland/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 butGET /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 removesharefrom the address. Form parameters in a share link (location,type,target,var.*) are ignored. A missing, expired or deleted share showsmessages.share_not_found, an unsupported snapshotmessages.share_unsupported, and other failures the newweb.text.share_error. Pages served from the UI now haveReferrer-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. Newweb.textkeys: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 withretain: false. It opens a popover to choose how long to keep the link (share.timeout_choices, withshare.timeoutselected) 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 theX-Delete-Tokenheader 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 matchingmessagesentry, never the server's response.share.enableis now sent to the UI. Newweb.textkeys: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 showsmessages.share_result_expiredwith 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 underhyperglass.shareswith 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. Withshare.enable: false, browsers forget their saved links. For kiosks and shared terminals,share.remember_links: false(defaulttrue, 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 withweb.history.enable. Newweb.textkeys: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 inshare_delete_scope, isshares_title) (#562). - Optional rate limit on
POST /api/query, off by default. Withquery_limit.enable: true, each client (an IPv4 address or an IPv6 /64, read throughweb.client_ipbehind trusted proxies) can sendquery_limit.client_limitqueries (default 30; the UI sends one per selected location) perquery_limit.windowseconds (default 60), and all clients togetherquery_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 withRetry-Afterand the newmessages.rate_limitedtext, and no device is contacted. When Redis is unreachable the limit is not checked. With metrics enabled, rejected queries count asreason="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 asport, it says to set it at the device level. The key is still ignored: aportundercredentialleaves the device on port 22 (#517). - Document rate limiting the routes that don't reach devices at the reverse proxy, with NGINX's
limit_reqand the third-partyrate_limitmodule for Caddy, with commented examples in the sample configurations (#532). - Add a health check and optional Prometheus metrics.
GET /api/healthchecks 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 healthcheckrequests it onHYPERGLASS_HOSTandHYPERGLASS_PORT, over IPv4 or IPv6, and exits with status 1 when Hyperglass is unhealthy or unreachable. The image runs it as its DockerHEALTHCHECK, with a 10-minute start period for the first UI build. The shippedcompose.yamlno longer defines its ownhealthcheck, which requested/api/info, so the image's check applies. Withmetrics.enable: true(defaultfalse), Prometheus metrics are served atmetrics.path(default/metrics), aggregated across workers:hyperglass_queries_totalby device, query type and status;hyperglass_query_errors_totalby device, query type and failure reason, which is the error's class in snake case (such asdevice_timeoutorauth_error),invalid_requestfor a rejected request,service_unavailablewhile Redis or the configuration in it is unavailable, and otherwiseinternal_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 labelledunknown, 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 thetimeout(default 5 seconds) andmax_concurrent(default 8) shared by/api/dnsand/api/aspath/enrich, the DNS-over-HTTPSdns.resolver(defaulthttps://1.1.1.1/dns-query), and each endpoint's per-minute quotas per client and for all clients (dns.client_limit120 anddns.global_limit600,aspath.client_limit30 andaspath.global_limit120).structured.ip_enrichmentgains the WHOIS server, which/api/aspath/enrichalso uses (whois_hostbgp.tools,whois_port43,whois_timeout10 seconds andwhois_bulk_timeout15 seconds), and the PTR lookup limits underreverse_dns(workers4,max_addresses32,lookup_timeout1.0 andquery_timeout2.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, including3.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_outputis now on for every platform with a structured parser; it was off unless set totrue(#413). Platforms without a parser still return text, andtrueon 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/devicesor/api/queries. Restore text output withstructured_output: falseon the device.docs.enableis nowfalse, sodocs.path(/api/docs) returns 404; it wastrue. Restore it withdocs.enable: true. Thehyperglass onboard deviceprompt for structured output now defaults to yes. - Document what each setting in
.samples/sample_config.yamland.samples/sample_devices.yamlneeds 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 theweb.server_lookups.dns.resolvercomment now warn that an internal resolver exposes internal and split-horizon names to every visitor:/api/dnsstill returns public addresses of internal names, including through CNAMEs, looks up internal names under suffixes it does not refuse, and answersNOERRORorNXDOMAINso 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_iconis nowCached from {time}; it wasCached from {time} UTC. A configuration that setscache_iconto the old text now labels a local time as UTC; remove the setting or the wordUTC. - 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 toruff check ., which now includes import order. For contributors:task formatrunsruff format hyperglass,task sortrunsruff check --select I --fix hyperglassandtask lintrunsruff check hyperglass. Ruff also writes and checks the# Standard Library,# Third Party,# Projectand# Localimport heading comments (#594). - Publish each commit merged to
mainasghcr.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 floatingmaintag, andlatestmoves only on a stable release. A release no longer builds its own image. It checks that the tagged commit'ssha-<commit>image carries this repository'smainprovenance, scans it again and adds the version tag (andlatestfor 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 packagednode_modules, and the image is about half the size (#431). Behaviour change:/etc/hyperglass, or the host directory mounted forHYPERGLASS_APP_PATH, must be writable by UID 10001. The previous image left root-owned files there, so runsudo chown -R 10001:10001 /etc/hyperglassbefore starting the new image; otherwise the container exits withPermission denied: '/etc/hyperglass/plugins'. SSH key files must be readable by UID 10001, and directories mounted forlogging.directoryorlogging.samples.pathwritable by it. See Container user and file ownership. - Lock the Python dependencies with uv, in
uv.lock, instead of Rye.requirements.lockandrequirements-dev.lockare removed: packagers and contributors install fromuv.lock(uv sync --extra uifor development) and runuv lockafter changingpyproject.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,
hyperglasswith no arguments prints the help and exits with status 2 instead of 0,--helplists 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/runtimeand@babel/helperssecurity overrides from the exact version7.26.10into^7.26.10floors, 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(defaultfalse) (#434). Behaviour change: with a font other than the defaults anddownloadleftfalse, visitors' browsers load that font from Google Fonts instead of from Hyperglass. Setdownload: trueto 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_bgprouteandlogging.http.enableare nowfalsethere, 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.textkeys, defaulting to the old text:submit_query(Submit Query) andreset_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; andweight_low_preferredandweight_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 asfr,pt-BRorzh-Hant-TW(defaulten), 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-LUusesde,zh-Hant-TWuseszh-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 readsTue, Nov 24, 2026, 08:00:00 UTCinstead ofTue, 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}areweb.text.query_locationandweb.text.query_typewith 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_TIMEOUTseconds (default 3), and a command on an open connection afterHYPERGLASS_REDIS_SOCKET_TIMEOUTseconds (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/healthkeeps 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/infoor 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": 422in 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
pingcould run another directive whose id contains it, such asping6, depending on the process hash seed (#426, #491). API change:queryTypeis now matched exactly and case-sensitively. A direct API client that sends a partial or differently cased id, such asbgp_routeorPING, now getsQueryTypeNotFound. 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 defaultwarninglevel, with the internal message, level and keywords. They now return HTTP 500 withmessages.general, leveldangerand 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 frommessages, keep their status and body. - Count a query either as a success or as an error, never both.
POST /api/queryread 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/queriesreturns, 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/dnsand/api/aspath/enrichreached clients withoutRetry-After, and a 405 withoutAllow(#585). - Return HTTP 404 from
GET /api/devices/{id}for an ID that no device has, withmessages.not_found({type}isweb.text.query_location) and levelwarning. The miss is logged atERRORwhen the error is created, as every public error is, and as a warning with the method and path, never atCRITICAL. It returned HTTP 500 withmessages.generaland 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-invalidand 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-checkedattribute is replaced byaria-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 showedShow 5whatever 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. Newweb.textkeys:page_size(defaultRows per page),page_size_option(defaultShow {count}) andpage_count(defaultPage {page} of {pages}). The page count is now plain text; its numbers were bold (#548). - Report an invalid
httpblock on aplatform: httpdevice with the failed field, such ashttp.method. A platform check replaced that error withDevice '...' has platform 'http' configured, but no http parameters are defined.; the check is removed. A device without anhttpblock 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 withbuiltins: falseor 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.1orfe80::1%eth0, reached a later rule such ascondition: "*", which accepted it whateverallow_loopback,allow_reserved,allow_unspecifiedandallow_link_localsaid. 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 matchingallow_*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,latestonce a stable version exists, and the newestsha-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
0for 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 elseprimary_asn; the text parsers showed0(#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 installoutput of the UI build as it was printed. The debug log had a newline between every character (#451). - Include
web.custom_javascriptandweb.custom_htmlin 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
ASIXPfor an exchange point,ASNonefor an unknown AS and*for a missing address, hostname or AS; it now showsIXP,—and—, and ASNs without theASprefix, 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 aTypeError(#449, #450). - Describe
hyperglass directivesandhyperglass pluginsin their own help text. Both used the description ofdevices,Show all configured devices, sohyperglass --helpshowed 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.pathin the support bundle.hyperglass support-bundleread only the default samples file, so with a custom path the bundle had no query failures. It now readslogging.samplesfromconfig.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:ororigin: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 as065000:0100), more than three parts, dotted values withouttarget:ororigin:(such as192.0.2.1:100) and an unprefixed65000:4294967295are 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
::orff02::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_timeouthad 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.textkeyscopy_output(defaultCopy Output),reload_query(Reload Query) andview_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 newweb.textkeysfirst_page(defaultFirst Page),previous_page(Previous Page),next_page(Next Page) andlast_page(Last Page). More newweb.textkeys, defaulting to the old text:as_path_title(Path to {target}), the heading of the AS path view; andzoom_in,zoom_outandfit_nodes, its chart controls. Withweb.text.title_mode: logo_only, the home button keepsweb.text.titleas 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 withmessages.general, or a fixed message when the configuration can't be read. With metrics enabled, such a failed query counts with reasonservice_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 indentedLocal AS numberline 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 ofprimary_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 withpnpm run lintandpnpm run format:check. Thepnpm-workspace.yamloverrides for packages that only ESLint pulled in (ajv,brace-expansion,braces,cross-spawn,js-yaml,micromatch,minimatch,picomatch) are removed with them (#618).