help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs Secret Service integration and KeePassXC issues


From: Michael Albinus
Subject: Re: Emacs Secret Service integration and KeePassXC issues
Date: Wed, 29 Dec 2021 13:36:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Liam Hupfer <liam@hpfr.net> writes:

> Hi Michael,

Hi Liam,

>> The ephemeral “session” collection is created by the Secret Service
>> provider (GNOME keyring daemon in my tests). KeePassXC doesn’t seem to
>> create it. I’ve scanned the docs whether this temporary collection is
>> requested (as I assume), but I couldn’t find it. So maybe we shouldn’t
>> trust its existence. I’ve added a respective note to the auth info
>> pages, where the Secret Service API is described.
>
> Makes sense, thanks. This is the conclusion I came to as well (that the
> session collection is not part of the spec, but rather a
> GNOME Keyring-specific feature).

I vaguely remember that I ran also tests with KDE wallet, and I've seen
the "session" collection there as well. But I cannot say it
bullet-proof, I'll dig further the docs to see where this collection
comes from.

> I tried your change by downloading the updated `secrets.el' and
> executing `(load "/path/to/new/secrets.el")' followed by `(require
> 'secrets)' in my config.

"load" shall do already what you need, no further "require" needed.

The canonical way to fix this is to add "/path/to/new" to your
load-path in your ~/.emacs, like

(add-to-list 'load-path "/path/to/new")

Then the modified version of secrets.el is loaded when needed.

> However, over a few hours running Emacs and KeePassXC with my
> `auth-sources' set appropriately, it appears that many extra sessions
> are still opened when I view the aforementioned `Tools > Settings >
> Secret Service Integration > Authorization' in KeePassXC. I believe it
> is specific to Emacs, because the Nextcloud client and the GNOME Online
> Accounts daemon also show up and do not seem to ever create extra
> sessions. I’m not really sure how to debug this. I think this would mean
> something is calling `secrets-open-session' somewhere, but it only seems
> to be called when `secrets.el' is loaded, so I have no idea how it’s
> happening. If how I load your updated version has something to do with
> it, is there a better way for me to override the `defconst' and `defun'
> with your changes than what I’ve described?

Did you restart a new Emacs session, after adapting the load-path to the
modified secrets.el?

If this still happens, please instrument `secrets-open-session' for
debugging. And when the debugger stops there, produce a backtrace by
typing "d". This might tell us what's up.

My crystal ball tells me that `auth-source-search' is involved.

> —Liam

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]