# linux: add credentials impl via oo7 \(\#8035\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ff6500831693886288dc789d27f1b2d601c73a60)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ff6500831693886288dc789d27f1b2d601c73a60

Requested commit: ff6500831693886288dc789d27f1b2d601c73a60

Commit: ff6500831693886288dc789d27f1b2d601c73a60

Tree: 61db6fd6a8ef027761d492dbb10bcf4f228dcf93

Author: Niklas Wimmer

Committer: GitHub

## Message

```
linux: add credentials impl via oo7 (#8035)

This change implements gpui's credentials API for the linux platform,
using the [`oo7`](https://lib.rs/crates/oo7) library.

We had a short discussion on Discord about where to store credentials
and landed on the two dbus APIs
[`org.freedesktop.Secrets`](https://specifications.freedesktop.org/secret-service/latest/index.html)
and
[`org.freedesktop.portal.Secrets`](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Secret.html).
The first one provides access to a more or less general purpose
keystore, the second provides a way of obtaining a unique masterkey
which in turn can be used for encrypting stuff and storing it to disk
(especially interesting for sandboxed apps, think flatpak/snap).

I decided to give the implementation a try with `oo7`, which uses the
portal if the app is sandboxed and the secret service otherwise. If we
do not want to use that library, we would probably have to more or less
copy its functionality anyways. I also heard rumors of eventually
changing the credentials API and I think this implementation serves as a
starting point to discuss the need for this?

With a working credentials implementation the sign in button now works
(it panicked before).

Todos:
- [x] implement keystore unlocking
- [x] try the change with oo7's tracing enabled?
- [x] test the password deletion

Release Notes:

- N/A

---------

Signed-off-by: Niklas Wimmer <mail@nwimmer.me>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
```

## Parents

- [1442fcb4974515b60bab23f745c977d1e47f5583](https://git.cafe/gitcafe/zed/commit/1442fcb4974515b60bab23f745c977d1e47f5583?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ff6500831693886288dc789d27f1b2d601c73a60?format=markdown)
