fix(accounts): switch off remove_local_account_keys on QTS #19

Merged
christianmanivong merged 1 commits from fix/local-account-key-replace into main 2026-11-04 11:38:53 +00:00
Owner

What

remove_local_account_keys = None, next to the personal-account actions QTS already switches off. See NetOrk/netork#2013.

napalm-device-types (NAPALM/napalm-device-types#90, assumed to be 4.28.0) adds remove_local_account_keys to LocalAccountsMixin, and napalm-linux (NAPALM/napalm-linux#69, assumed to be 0.17.0) brings it to every LinuxDriver. QTS manages its users in its own UI. Without this line, a capability check (callable(getattr(driver, "remove_local_account_keys", None))) would say QTS can take keys off an account. The opt-out is still in place for get_local_accounts, add_local_account, lock_local_account and add_service_account, so replaces and clear_password cannot reach QTS.

Needs the releases first. The floors are raised to napalm-device-types>=4.28.0 and napalm-linux>=0.17.0, because the test also asserts that LinuxDriver has the method.

Tests

Fixtures only. test_personal_accounts_are_not_managed_here now includes remove_local_account_keys. It failed first against the new device-types (the method was callable on QnapQtsDriver). 116 tests pass, ruff, napalm-standard check and ratchet are clean, and mypy reports nothing in napalm_qnap_qts.

## What `remove_local_account_keys = None`, next to the personal-account actions QTS already switches off. See NetOrk/netork#2013. napalm-device-types (NAPALM/napalm-device-types#90, assumed to be 4.28.0) adds `remove_local_account_keys` to `LocalAccountsMixin`, and napalm-linux (NAPALM/napalm-linux#69, assumed to be 0.17.0) brings it to every `LinuxDriver`. QTS manages its users in its own UI. Without this line, a capability check (`callable(getattr(driver, "remove_local_account_keys", None))`) would say QTS can take keys off an account. The opt-out is still in place for `get_local_accounts`, `add_local_account`, `lock_local_account` and `add_service_account`, so `replaces` and `clear_password` cannot reach QTS. **Needs the releases first.** The floors are raised to `napalm-device-types>=4.28.0` and `napalm-linux>=0.17.0`, because the test also asserts that `LinuxDriver` has the method. ## Tests Fixtures only. `test_personal_accounts_are_not_managed_here` now includes `remove_local_account_keys`. It failed first against the new device-types (the method was callable on `QnapQtsDriver`). 116 tests pass, ruff, `napalm-standard check` and `ratchet` are clean, and mypy reports nothing in `napalm_qnap_qts`.
christianmanivong added 1 commit 2026-11-04 10:50:37 +00:00
fix(accounts): switch off remove_local_account_keys on QTS
driver / standard (pull_request) Successful in 18s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m16s
driver / test (3.12) (pull_request) Successful in 1m14s
driver / test (3.13) (pull_request) Successful in 1m5s
driver / lowest (pull_request) Successful in 41s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m11s
CI / driver (pull_request) Successful in 3m2s
driver / publish (pull_request) Skipped
f3f263cf61
napalm-linux 0.17.0 brings napalm-device-types' new
remove_local_account_keys to every LinuxDriver. QTS has the other
personal-account actions switched off, as it manages its users in its
own UI; without this one a capability check would say QTS can take keys
off an account.

See NetOrk/netork#2013
christianmanivong merged commit 28eb954eda into main 2026-11-04 11:38:53 +00:00
christianmanivong deleted branch fix/local-account-key-replace 2026-11-04 11:38:53 +00:00
Sign in to join this conversation.