Retrieve passwords from vault qube programmatically

Hey everyone,

I’d like to setup an app qubes to read my mail, with my previous setup on an other OS I was using mbsync + dovecot + emacs.

Only problem I have is that I don’t know how to fetch password programatically from the vault qube which contains a keepassxc instance where all my passwords are, and pass it to mbsync.

Before I’d just use the secret service integration and have something like this in mbsyncrc:

PassCmd "secret-tool lookup account <myaccount>"

Only examples I’ve seen so far with qubes involve the user manually copying in and out the password from one qube to the other. Which gets old very quickly when you have 5+ emails accounts.

Hi

It would only be possible to script something based on keepassxc when using it in CLI which would require typing the password everytime or having a security token with a configured challenge response like a yubikey.

If you can use a software more script friendly like pass which would require unlocking your gpg key once, you could call a qubes rpc script to retrieve the output of a command in vault from your mail qube

I am just using ~/.authinfo.gpg with split-gpg setup.
~/.authinfo.gpg file holds my email account’s password.

Thanks you both for the quick answers!

I think I’ll dig into the rpc way, one of my goal is to lessen my dependencies on gpg if I can and get rid of .authinfo.gpg (might use age instead GitHub - anticomputer/age.el: Transparent age encryption support for Emacs modeled after EPG/EPA )