Repository navigation
[Testing]: System keychain access on macOS, Linux and Windows #891
Copy link
Copy link
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
What needs testing
Everything RustGIS keeps in the system keychain goes through Services::secrets (#754). The code is unit-tested against an in-memory store (MemorySecrets, with MemorySecrets::failing for errors), but not against the real backends. Test every keychain use on a real desktop build on each platform:
| Platform | Backend |
|---|---|
| macOS | login Keychain |
| Windows | Credential Manager (persistence Local) |
| Linux | Secret Service (GNOME Keyring, KWallet) over D-Bus |
Every item is stored under the service RustGIS:
| Feature | Keychain account | Where |
|---|---|---|
| AI provider keys | assistant/<provider> |
Assistant settings › Remember the key on this computer |
| Database passwords | connection/<id> |
the connection's login › Remember |
| S3 keys | connection/<id> |
the S3 dialog or the connection's form › Remember on this computer |
| ChatGPT sign-in (refresh token) | chatgpt/<client_id>/<subject> |
Assistant › ChatGPT (sign in) |
Checks for each feature, on each platform
- Save: the item appears in the keychain under the account above, and the secret is nowhere else (preferences, project file,
chatgpt-auth.json). - Restart: the secret is read back and works; note any keychain prompt and how often it appears.
- Forget: clearing, unticking, signing out or removing deletes the item.
- Upgrade: a secret an older version kept in plain text (AI keys in the preferences, ChatGPT tokens in
chatgpt-auth.json) moves to the keychain, and leaves the old place only once the keychain has it. - Keychain unavailable (Linux without a Secret Service, no keyring): the secret lasts for the session only, the UI says why, and nothing is written in plain text instead.
- Locked or refused (cancel the system dialog): the UI reports it; nothing is lost or written elsewhere. Make sure no other program is prompting at the same time; on macOS, editors that poll
ghwill. - UI while a dialog is up: some actions (saving a remembered connection, ChatGPT sign-out, removal, account selection) touch the keychain on the UI thread, an accepted trade-off for user actions. Note whether the freeze is a problem.
Feature-specific checks:
- ChatGPT:
- Windows: the save succeeds, meaning the value fits Credential Manager's 2560 bytes of UTF-16. Measured on macOS: 536–566 bytes.
- After a restart: the renewal rotates the token (the file's
revchanges and matches the keychain item's). - Locked keychain: sign-out still signs out locally and says the session wasn't revoked; Remove account refuses.
- S3: the saved keys are bound to their endpoint; editing the connection's address or credentials forgets them.
- Databases: editing a connection's address or user forgets the saved password.
Status
| Feature | macOS | Windows | Linux |
|---|---|---|---|
| AI provider keys | – | – | – |
| Database passwords | – | – | – |
| S3 keys | – | – | – |
| ChatGPT sign-in | save, restart, sign-out and removal pass (#884); locked keychain not done | – | – |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed
Activity
[-]Test the system keychain on Linux, Windows and macOS[/-][+]Test all system keychain access on macOS, Linux and Windows[/+][-]Test all system keychain access on macOS, Linux and Windows[/-][+][Testing]: System keychain access on macOS, Linux and Windows[/+]