[PATCH 0/3] agent: add passphrase storage options

Matthias Kurz <[email protected]> Fri, 24 Apr 2026 10:31:56 +0200
Newsgroups dev.linux.lists.iwd
Message-ID <[email protected]>
Add an agent API variant for PSK passphrase requests that allows the
agent to tell IWD whether the passphrase should be persisted in the
network profile.

This is needed by NetworkManager's IWD backend for profiles where the
Wi-Fi PSK is stored as an agent-owned or not-saved secret. In those
cases NetworkManager can provide the passphrase for the current
connection attempt, but IWD should not save it into /var/lib/iwd/*.psk.

The new RequestPassphraseWithOptions method returns the passphrase plus
an options dictionary. Currently the only option is Store. If Store is
false, IWD uses the passphrase for the current connection attempt but
does not write PSK secrets back to the profile.

The method falls back to RequestPassphrase for older agents.

NetworkManager-side draft MR:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2402

Matthias Kurz (3):
  agent: Add passphrase storage options
  doc: Document passphrase storage options
  auto-t: Test transient PSK agent secrets

 .../testEncryptedProfiles/connection_test.py  |  27 +++++
 autotests/util/iwd.py                         |  14 ++-
 doc/agent-api.txt                             |  12 ++
 src/agent.c                                   | 108 +++++++++++++++---
 src/agent.h                                   |   1 +
 src/network.c                                 |  12 ++
 6 files changed, 159 insertions(+), 15 deletions(-)

-- 
2.54.0