Cuewire

Where Cuewire keeps your keys, and what 0.1.27 fixes on Linux

Cuewire keeps a few secrets for you: your sign-in, your sync code, your phone pairings and the API keys you give agent accounts. All of them live in your system's keychain. This post says what that means, what went wrong on Linux up to 0.1.26, and what changes in 0.1.27.

0.1.27 is not out yet. The current version is 0.1.26. Everything under "Coming in 0.1.27" below is finished, merged and covered by automated tests, and arrives with that version. The rest describes Cuewire as it is today.

What Cuewire keeps, and where

Four kinds of secret:

The keychain is Credential Manager on Windows and the Keychain on a Mac. On Linux it is the Secret Service, usually GNOME Keyring or KWallet. None of these secrets is ever written to a file.

That last rule has no exception. A keychain encrypts what it keeps, locks with your login, and is what the rest of your system already trusts with passwords. A file in Cuewire's data folder would sit on disk unencrypted, and be copied by backups and sync tools. So when there is no keychain, Cuewire says so instead of falling back to a file. Everything that needs no secret from Cuewire keeps working: canvases, notes, the Free plan, and agents that sign in with their own login. Each agent keeps that login itself, and on Linux some agents use the keychain for it too.

What went wrong on Linux, up to 0.1.26

Windows and macOS always have a keychain, ready when you log in, so Windows and Mac users were practically never affected by any of this. On Linux the keychain is a separate program, and sometimes it isn't there: on a minimal or tiling window manager, on some remote desktops, in WSLg or in a container. Or it is there, but starts after Cuewire, or is still locked.

In 0.1.26 and earlier, that went badly:

Coming in 0.1.27

It says what's wrong, before a code is sent

When you click Email me a code, Cuewire checks the keychain first. If there is no Secret Service, the sign-in sheet says:

Signing in needs the system keychain: no Secret Service is running (install and unlock GNOME Keyring or KWallet): …

followed by what actually went wrong, for example that there was no session bus. If the keyring is locked, it says "it is locked: unlock it (for example in Passwords and Keys, or KWallet), then try again". No code is sent, so none is wasted. The log says the same thing once, not every minute.

No restart needed

Cuewire now opens the keychain itself. While it can't, it tries again: at most once a minute in the background, and at once when you click Email me a code. Start GNOME Keyring, or unlock it, and Cuewire finds it.

A locked keyring waits for you

Work that runs in the background asks whether the keyring is locked before reading from it. That covers your organisation's documents, settings sync, phone pairings and the account panel. While the keyring is locked, that work waits for you to unlock it instead of showing a dialog you didn't ask for. Signing in, turning sync on or off, pairing or unpairing a phone, adding or removing an agent account and starting an agent on one don't show it either: they say "unlock it, then try again".

Nothing is lost while the keychain isn't ready

Nothing keychain-related freezes the window

Opening Cuewire and its sheets no longer reads the keychain on the window's thread. Turning sync on or off, pairing or unpairing a phone, adding or removing an agent account, and starting an agent on an account all wait for the keychain in the background. Meanwhile the sheet says Turning sync on…, Pairing…, Adding… or Removing…. If the keychain refuses a change, what you had stays as it was (removing a key pool can stop partway; remove it again), and Cuewire tells you why.

An agent that uses a saved key shows Waiting: reading its key from the keychain… and starts by itself once the key is read. A restart, or a move to the next key of a pool, keeps the old program running until the new key is in, and then swaps them. If the key can't be read, the old program keeps running, Cuewire says why, and the agent and key it shows are the ones actually running.

Your existing secrets stay where they are

0.1.27 opens the keychain itself, instead of letting the keychain library open it once at start and keep any failure, but underneath it uses the same keychain code, and it names every entry exactly as 0.1.26 did. Upgrading won't sign you out, or forget your sync code, a pairing or an API key.

We checked this against real keychains on all three systems: Credential Manager on Windows, the login keychain on a Mac, and GNOME Keyring on Linux. Entries written the way 0.1.26 writes them are found and removed by the new code, and entries the new code writes are found the old way.

If you use Linux

Limits

Read more

The manual describes each part: Sign in, Settings sync, the companion, agent accounts and key pools, and privacy. Cuewire 0.1.26 is on the download page. When 0.1.27 is out, the changelog lists these changes.