<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/python, branch fix/T8955-http-api-verify-tls</title>
<subtitle>VyOS command definitions, scripts, and utilities (mirror of https://github.com/vyos/vyos-1x.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-1x.git/atom?h=fix%2FT8955-http-api-verify-tls</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-1x.git/atom?h=fix%2FT8955-http-api-verify-tls'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/'/>
<updated>2026-10-04T09:46:17+00:00</updated>
<entry>
<title>http-api-client: T8955: leave warning handling to the caller</title>
<updated>2026-10-04T09:46:17+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-10-04T09:46:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=69160aae61b3dc00a31d5980919d665e02f4c417'/>
<id>urn:sha1:69160aae61b3dc00a31d5980919d665e02f4c417</id>
<content type='text'>
Address the round-2 adversarial-review finding: warnings.catch_warnings()
mutates the process-global filter list for the duration of the block (still
the case on Python 3.13), so scoping suppression inside the library was not
actually isolated.

- http_api_client no longer touches warning filters at all. The
  _suppress_insecure_warning helper is removed and post() calls
  session.post directly again. The unused warnings, contextmanager and
  urllib3 imports are dropped. The class docstring now states that callers
  disabling verification own InsecureRequestWarning handling. The OSError
  wrapping and verify_tls validation are unchanged.
- config_sync ignores InsecureRequestWarning in its __main__ block only,
  before opmode.run(). That one-shot op-mode process deliberately connects
  without verification (verify_tls=False) until T9396. Importing the module
  adds no filter.

🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>http-api-client: T8955: harden verify_tls handling</title>
<updated>2026-10-04T09:29:31+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-10-04T09:29:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=7f7c730cb415f6b1b22abe5788a10e02c50778ad'/>
<id>urn:sha1:7f7c730cb415f6b1b22abe5788a10e02c50778ad</id>
<content type='text'>
Address the adversarial-review findings on the TLS verification change:

- Finding 1: validate ApiClientConfig.verify_tls in __post_init__. Only a
  bool or a non-empty CA bundle path is accepted; anything else (including
  "", None and ints) raises ValueError. requests treats "" as falsy and
  would silently disable verification. Strings are never coerced: "false"
  is a path, so callers must pass a real bool.
- Finding 2: stop calling urllib3.disable_warnings() process-wide from
  ApiClient.__init__. InsecureRequestWarning is now ignored only around the
  request itself, via warnings.catch_warnings(), and only when verify_tls
  is False. post() is the only request path in the client.
- Finding 3: wrap OSError (raised by requests' cert_verify for a missing
  CA bundle path) in ApiTransportError. The handler sits after the
  RequestException handlers, since those subclass OSError.
- Finding 4: config-sync hard-codes verify_tls = False instead of reading
  an unmapped 'verify_tls' key from the runtime config, whose leaf values
  are strings. Mapping a CLI option to a bool or CA path is T9396.

🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>http-api-client: T8955: enable TLS verification by default</title>
<updated>2026-10-04T09:13:18+00:00</updated>
<author>
<name>Yuriy Andamasov</name>
<email>yuriy@vyos.io</email>
</author>
<published>2026-06-02T14:49:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=bc1a054e14eaabd17326d63fa99c19c0a867130d'/>
<id>urn:sha1:bc1a054e14eaabd17326d63fa99c19c0a867130d</id>
<content type='text'>
ApiClientConfig.verify_tls defaulted to False and ApiClient unconditionally
silenced urllib3's InsecureRequestWarning, so TLS peer verification was off by
default. The sole consumer, src/op_mode/config_sync.py, builds the client
without passing verify_tls and therefore connected to a *remote* secondary VyOS
node over HTTPS without verifying the certificate -- a MITM exposure on the
channel that carries the API key and the full configuration.

- ApiClientConfig.verify_tls now defaults to True and accepts bool | str;
  a string is forwarded to requests as a CA bundle path (verify=&lt;path&gt;).
- InsecureRequestWarning is suppressed only when verification is explicitly
  disabled (verify_tls is False), not when a CA path or True is set.
- config_sync reads an optional verify_tls from the secondary runtime settings,
  defaulting to False to preserve current behaviour for self-signed secondaries.
  The insecurity is now explicit at the call site instead of hidden in the
  library default. Exposing a CA certificate (PKI reference) and peer
  fingerprint pinning under service config-sync secondary is follow-up T9396.

🤖 Generated by [robots](https://vyos.io)
</content>
</entry>
<entry>
<title>T9365: add wrappers for reference tree path from config/partial path</title>
<updated>2026-10-01T16:54:29+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2026-09-28T16:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=ccab7522a977e2a4c24de195f382e90475d1ad7c'/>
<id>urn:sha1:ccab7522a977e2a4c24de195f382e90475d1ad7c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge pull request #5493 from jestabro/trim-reftree-caches</title>
<updated>2026-10-01T16:46:46+00:00</updated>
<author>
<name>Daniil Baturin</name>
<email>daniil@vyos.io</email>
</author>
<published>2026-10-01T16:46:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=954afbf43c52460c4c7385a8b5cb44af66835064'/>
<id>urn:sha1:954afbf43c52460c4c7385a8b5cb44af66835064</id>
<content type='text'>
T9341: Fix consistency of legacy templates, xml_ref cache, and reference tree</content>
</entry>
<entry>
<title>wwan: T9326: always pre-negotiate the attach-time PDN type before connect</title>
<updated>2026-09-30T06:30:41+00:00</updated>
<author>
<name>Adam Smith</name>
<email>adamsmith@yzguy.io</email>
</author>
<published>2026-09-30T05:18:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=5299606d0e6adf5f522cc6cbfb35ea39fc138bb4'/>
<id>urn:sha1:5299606d0e6adf5f522cc6cbfb35ea39fc138bb4</id>
<content type='text'>
modem_connect() only ran the --3gpp-set-initial-eps-bearer-settings
pre-step (added by T9326) when the requested ip-type included IPv6,
gated on options.partition('ip-type=')[2].partition(',')[0] in ('ipv6',
'ipv4v6'). A bare 'ipv4' request skipped it entirely.

Confirmed live (same MC7455/Google Fi setup as T9326's original report)
that the underlying ip-version-mismatch rejection isn't IPv6-specific:
with the attach committed to ip-type=ipv6, a bare ip-type=ipv4
--simple-connect fails outright with the same QMI CallEndReason, not
just the ipv4v6 case's silent single-family drop. A WWAN interface
whose configured address family changes (e.g. dropping dhcpv6 down to
dhcp-only) can hit exactly this, and won't self-heal on retry since
nothing about a failed connect touches the attach-committed PDN type -
vyos-netlinkd's reconcile loop would back off and retry the identical
failing request forever.

Removed the gate entirely: the pre-step already fails silently and
falls through unchanged on a modem/network that doesn't need it, so
there's no reason to skip it for any particular family.
</content>
</entry>
<entry>
<title>Merge pull request #5483 from yzguy/wwan-modem-by-port-ownership</title>
<updated>2026-09-30T04:18:19+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-09-30T04:18:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=8df929883bbffeb6b1dc8cb4dd0d8e8f6c328341'/>
<id>urn:sha1:8df929883bbffeb6b1dc8cb4dd0d8e8f6c328341</id>
<content type='text'>
wwan: T7487: identify modem by port ownership, not interface number</content>
</entry>
<entry>
<title>wwan: T7487: catch malformed mmcli JSON, not just OSError</title>
<updated>2026-09-30T04:13:50+00:00</updated>
<author>
<name>Adam Smith</name>
<email>adamsmith@yzguy.io</email>
</author>
<published>2026-09-29T19:30:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=1aa2cd1df614925cf68964239eeaaf42ea74bc43'/>
<id>urn:sha1:1aa2cd1df614925cf68964239eeaaf42ea74bc43</id>
<content type='text'>
mmcli can return empty or non-JSON output while ModemManager is still
starting (T6604), and json.loads() raising on that is a ValueError, not an
OSError - it was propagating straight out of _modem_owning_port() uncaught.
Under wait=True that reaches wait_for()'s callback and aborts the poll loop
instead of retrying, exactly the startup race this module exists to ride
out.

Co-authored-by: Christian Breunig &lt;christian@breunig.cc&gt;
</content>
</entry>
<entry>
<title>ethtool: T9353: fix BASEX mode(s) support in check_speed_duplex()</title>
<updated>2026-09-29T19:30:47+00:00</updated>
<author>
<name>_mrplow</name>
<email>mrplow87@users.noreply.github.com</email>
</author>
<published>2026-09-25T12:25:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=41e64e80978bce094ef37f59771943e9e977ae87'/>
<id>urn:sha1:41e64e80978bce094ef37f59771943e9e977ae87</id>
<content type='text'>
Bugfix which allows for BaseX link modes reported by ethtool to be correctly
validated, so config can be commited.
</content>
</entry>
<entry>
<title>wwan: T7487: move json/wait_for imports into their only callers</title>
<updated>2026-09-29T19:21:15+00:00</updated>
<author>
<name>Adam Smith</name>
<email>adamsmith@yzguy.io</email>
</author>
<published>2026-09-29T19:21:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-1x.git/commit/?id=002050d158356078931d1a196538b5803eab788e'/>
<id>urn:sha1:002050d158356078931d1a196538b5803eab788e</id>
<content type='text'>
Requested by c-po: json.loads and wait_for were only used by
_modem_owning_port() and modem_index()'s wait branch respectively, so
importing them at module level cost every other caller of this module an
import it does not need.
</content>
</entry>
</feed>
