Discovery gets one piece of evidence that only a DAL gateway has.
PORT_SPECS asks discovery to fetch /getRSAPublickKey on the standard ports 80 and 443, with weight 0: the port answering counts for nothing. This is the DAL key exchange open() logs in with; the gateway answers it without a login (_get_rsa_pubkey() runs before UserLogin), with {"RSAPublicKey": "-----BEGIN PUBLIC KEY-----…"}.
HTTP_FINGERPRINT gains FingerprintRule('"rsapublickey"', weight=24.0), the quoted JSON key of that answer. "zyxel" stays mandatory at 7.
Why
The evidence was all vendor-wide: the Zyxel enterprise OID (1.3.6.1.4.1.890), Zyxel OUIs and "zyxel" on the page. Every managed Zyxel device has all three, and after #12 they made up the driver's whole maximum: 28 of 28, "high", for any Zyxel switch, firewall or NAS.
Under discovery's normalisation (score / _max_possible_score, "high" from 0.7), the maximum is now 15 + 6 + 7 + 24 = 52:
Evidence
Score
Confidence
Zyxel switch: OID + OUI + "zyxel"
28 / 52 = 0.54
medium
DAL gateway: OID + OUI + "zyxel" + answer
52 / 52 = 1.00
high
DAL gateway without SNMP
37 / 52 = 0.71
high
DAL gateway without SNMP, OUI not seen
31 / 52 = 0.60
medium
Why 24: vendor-wide evidence alone stays below "high" with any weight over 12; a gateway without SNMP needs at least 22 to reach it (35 / 50 is exactly 0.70). 24 leaves a margin above that edge.
Why not other markers: the driver's code and fixtures name no landing-page text, and the only model string (VMG4005-B50A) is in a test fixture that is not a recording (README: "not recorded yet"). getBasicInformation answers without a login too, but the driver only relies on it answering JSON; which keys it carries is not established by anything the driver needs to work. The RSA key exchange is: without it the driver cannot log in.
Cost: discovery sends one more GET per scheme to every host it probes on 80/443 (as it already does for /redfish/v1/). On a non-DAL host that is a 404.
Tests
Fixtures only (no device). tests/test_fingerprint.py mirrors netOrk's scoring (OUI 6, OID 15, HTTP rules with mandatory and negative, the maximum via rules_max_weight) and checks the table above, plus the PORT_SPECS (path, weight 0, not mandatory) and that the probed path is the one the driver logs in with. test_vendor_wide_evidence_alone_stays_below_high failed before the change (assert 1.0 < 0.7). The numbers were cross-checked against netOrk's own _score_driver/_max_possible_score on main.
## What
Discovery gets one piece of evidence that only a DAL gateway has.
- `PORT_SPECS` asks discovery to fetch `/getRSAPublickKey` on the standard ports 80 and 443, with weight 0: the port answering counts for nothing. This is the DAL key exchange `open()` logs in with; the gateway answers it without a login (`_get_rsa_pubkey()` runs before `UserLogin`), with `{"RSAPublicKey": "-----BEGIN PUBLIC KEY-----…"}`.
- `HTTP_FINGERPRINT` gains `FingerprintRule('"rsapublickey"', weight=24.0)`, the quoted JSON key of that answer. `"zyxel"` stays mandatory at 7.
## Why
The evidence was all vendor-wide: the Zyxel enterprise OID (`1.3.6.1.4.1.890`), Zyxel OUIs and "zyxel" on the page. Every managed Zyxel device has all three, and after #12 they made up the driver's whole maximum: 28 of 28, "high", for any Zyxel switch, firewall or NAS.
Under discovery's normalisation (`score / _max_possible_score`, "high" from 0.7), the maximum is now 15 + 6 + 7 + 24 = 52:
| Evidence | Score | Confidence |
|---|---|---|
| Zyxel switch: OID + OUI + "zyxel" | 28 / 52 = 0.54 | medium |
| DAL gateway: OID + OUI + "zyxel" + answer | 52 / 52 = 1.00 | high |
| DAL gateway without SNMP | 37 / 52 = 0.71 | high |
| DAL gateway without SNMP, OUI not seen | 31 / 52 = 0.60 | medium |
Why 24: vendor-wide evidence alone stays below "high" with any weight over 12; a gateway without SNMP needs at least 22 to reach it (35 / 50 is exactly 0.70). 24 leaves a margin above that edge.
Why not other markers: the driver's code and fixtures name no landing-page text, and the only model string (`VMG4005-B50A`) is in a test fixture that is not a recording (README: "not recorded yet"). `getBasicInformation` answers without a login too, but the driver only relies on it answering JSON; which keys it carries is not established by anything the driver needs to work. The RSA key exchange is: without it the driver cannot log in.
Cost: discovery sends one more GET per scheme to every host it probes on 80/443 (as it already does for `/redfish/v1/`). On a non-DAL host that is a 404.
## Tests
Fixtures only (no device). `tests/test_fingerprint.py` mirrors netOrk's scoring (OUI 6, OID 15, HTTP rules with mandatory and negative, the maximum via `rules_max_weight`) and checks the table above, plus the `PORT_SPECS` (path, weight 0, not mandatory) and that the probed path is the one the driver logs in with. `test_vendor_wide_evidence_alone_stays_below_high` failed before the change (`assert 1.0 < 0.7`). The numbers were cross-checked against netOrk's own `_score_driver`/`_max_possible_score` on main.
pytest 47 passed, ruff format/check clean, mypy clean, `napalm-standard check` and `ratchet` green.
Closes #13
The driver's evidence was all vendor-wide: Zyxel's enterprise OID, Zyxel
OUIs and "zyxel" on the web page. Every managed Zyxel device has all
three, and they were the driver's whole maximum, so discovery named any
Zyxel switch this gateway with high confidence.
Discovery now also fetches /getRSAPublickKey on ports 80 and 443, the
DAL key exchange the driver logs in with, without counting the port.
Its "RSAPublicKey" answer weighs 24: vendor-wide evidence alone is 28 of
52 (medium), a gateway 52 of 52, or 37 of 52 without SNMP.
Closes#13
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Discovery gets one piece of evidence that only a DAL gateway has.
PORT_SPECSasks discovery to fetch/getRSAPublickKeyon the standard ports 80 and 443, with weight 0: the port answering counts for nothing. This is the DAL key exchangeopen()logs in with; the gateway answers it without a login (_get_rsa_pubkey()runs beforeUserLogin), with{"RSAPublicKey": "-----BEGIN PUBLIC KEY-----…"}.HTTP_FINGERPRINTgainsFingerprintRule('"rsapublickey"', weight=24.0), the quoted JSON key of that answer."zyxel"stays mandatory at 7.Why
The evidence was all vendor-wide: the Zyxel enterprise OID (
1.3.6.1.4.1.890), Zyxel OUIs and "zyxel" on the page. Every managed Zyxel device has all three, and after #12 they made up the driver's whole maximum: 28 of 28, "high", for any Zyxel switch, firewall or NAS.Under discovery's normalisation (
score / _max_possible_score, "high" from 0.7), the maximum is now 15 + 6 + 7 + 24 = 52:Why 24: vendor-wide evidence alone stays below "high" with any weight over 12; a gateway without SNMP needs at least 22 to reach it (35 / 50 is exactly 0.70). 24 leaves a margin above that edge.
Why not other markers: the driver's code and fixtures name no landing-page text, and the only model string (
VMG4005-B50A) is in a test fixture that is not a recording (README: "not recorded yet").getBasicInformationanswers without a login too, but the driver only relies on it answering JSON; which keys it carries is not established by anything the driver needs to work. The RSA key exchange is: without it the driver cannot log in.Cost: discovery sends one more GET per scheme to every host it probes on 80/443 (as it already does for
/redfish/v1/). On a non-DAL host that is a 404.Tests
Fixtures only (no device).
tests/test_fingerprint.pymirrors netOrk's scoring (OUI 6, OID 15, HTTP rules with mandatory and negative, the maximum viarules_max_weight) and checks the table above, plus thePORT_SPECS(path, weight 0, not mandatory) and that the probed path is the one the driver logs in with.test_vendor_wide_evidence_alone_stays_below_highfailed before the change (assert 1.0 < 0.7). The numbers were cross-checked against netOrk's own_score_driver/_max_possible_scoreon main.pytest 47 passed, ruff format/check clean, mypy clean,
napalm-standard checkandratchetgreen.Closes #13