Skip to content

Conversation

@iinuwa
Copy link
Member

@iinuwa iinuwa commented Aug 5, 2025

This was actually more complex than I wanted it to be. Because of the tokio/async-std exclusivity in the zbus package, I had to split off the UI earlier than I wanted to to make nice clean commit history.

I mucked around in Meson build files and got it to build, and then to communicate between the two processes over D-Bus. I believe I've updated all the relevant docs for now.

I tested the following, and it seems to work:

  • Create a credential via USB
  • Get a credential via USB w/ client PIN
  • Get a credential via USB w/ biometrics
  • Select between multiple USB authenticators
  • Select between multiple returned credentials from an authenticator
  • Get a credential via Hybrid

Changed

  • Public service name has changed from xyz.iinuwa.credentials.CredentialManagerUi to xyz.iinuwa.credentials.Credentials. The path and interface are also changed similarly.
  • To run the process, you have to run both the creds-ui and credsd binaries. The UI still needs the GSETTINGS_SCHEMA_DIR env variable set.
  • Error type on the public API has changed from a string to a structured type based on https://www.w3.org/TR/webauthn-3/#sctn-create-request-exceptions. Still mostly sending NotAllowedError as the catch-all everywhere for now.

TODO

  • Propagate WebAuthn errors to public API responses.
  • Cancel the request on the credential service when the UI has an error or crashes, or when the window closes. Until then, you have to restart one or both processes between failed requests.
  • Enable D-Bus service activation so that you don't have to start the services ahead of time: the client can just call the main API and they'll be started transparently.
  • Implement D-Bus authorization policies and process sandboxing.
  • Remove some dead code.
  • Now that I've typed it quite a bit, I do prefer the credentialsd name to credsd, so I'll probably wind up renaming that later.

iinuwa added 30 commits July 29, 2025 22:58
This doesn't work because of the mixing of Tokio and async-std runtimes.
:(
Add zbus debug output; allow launching server and client simultaneously.
Copy link
Member Author

@iinuwa iinuwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to go ahead and merge this and follow up with more PRs to clean up.

@iinuwa iinuwa merged commit a647888 into main Aug 5, 2025
1 check failed
@iinuwa iinuwa deleted the dbus-service branch August 5, 2025 16:18
This was referenced Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants