Hi,
Unfortunately QtKeychain while perfect for saving and reading of a
password from an application, doesn't do what i need.

I wanted a tool that can list all secret collections, create/delete
them, and list all secrets in a collection saved by any application,
also those from other desktops.

QtKeychain can only read and write from the default collection, and
list passwords saved with its own qtkeychain "schema"

In SecretService, schemas are a set of metadata keys that are allowed,
and different apps can use different ones, so
QtKeychain for the ways it does queries to secretservice, doesn't
"know" about them (but that's fine, because the alternative
is much more complicated and a bug would give access to other secrets,
that are out of the scope of the library)

I don't think that expanding QtKeychain to support all is needed is
either desiderable nor feasible, because
on one hand, the QtKeychain api has to more or less map to the minimum
common denominator of what's
allowed by the api of every supported platform (i would doubt that
android would ever let a normal app look at the secrets of all other
apps for instance)

and on the other hand, the goal of QtKeychain is really to be a no
frills api for the use case
 "i have an app that needs to store a secret, i want a simple api to
store and read that secret, and nothing else"
I don't think adding extra stuff for being able to be a system
password manager makes much sense (if possible
at all on some of the supported platforms)

On Thu, Jul 17, 2025 at 5:19 PM Ingo Klöcker <kloec...@kde.org> wrote:
>
> On Donnerstag, 17. Juli 2025 14:39:57 Mitteleuropäische Sommerzeit Marco
> Martin wrote:
> > Thanks,
> > I got it mostly working.
> > However i had to disable Android and windows because of the dependency
> > to GNOME libsecret which i don't think is available there?
> > (also, on Android I think it would really make no sense as the
> > application needs a DBus connection to SecretService which is not
> > really possible there)
>
> This may be a stupid question, but why didn't you use qtkeychain which has
> backends for all major OS and which we use in most if not all KDE apps that
> store passwords?
>
> https://github.com/frankosterfeld/qtkeychain
>
> Regards,
> Ingo

-- 
Marco Martin

Reply via email to