I let mutt-wizard set a cron job which takes my password out of pass,
logs into the email server and fetches my mail every 5 minutes. With
this I have to unlock my key as frequently as the amount in
gpg-agent.conf's default-cache-ttl setting.
Hi all,
I let mutt-wizard set a cron job which takes my password out
of pass, logs into the email server and fetches my mail every
5 minutes.
With this I have to unlock my key as frequently as the amount in gpg-agent.conf's default-cache-ttl setting.
pam-gnupg has been suggested as a remedy to this problem but the
disclaimer on its page about dangerous bugs make me hesitant to use
it. What do you think about the security of it? It's only 500 SLOC
but I don't trust myself with reviewing the security of it.
Can you re-architect this as a (pseudo) daemon so that you unlock it
once (or at least a LOT less often) and it stores the necessary
information in memory for subsequent re-use?
Could you re-configure things so that (a copy of) the requisite password
is accessible via a different set of GPG credentials specific to the
process that you're running? Then you could probably have just that set
of GPG credentials unprotected so that the script could use them as it
is today.
If neither of these options were possible I'd look into something like a
TPM and / or Yubikey wherein I could offload some of the GPG to it so
that the decryption key is physically tied to the source computer /and/ *where* *it* *can't* *be* *copied*.
You just described gpg-agent, the core of what Efe (OP) is meddling
with :)
I don't have any thoughts on the pam module, but I make use of some
scripts that rely on pass as well. For my use case I just raised the
TTL setting of gpg-agent to match an eight hour work day or eight hour evening period and ran with it. Feels fairly natural to "log in" to
the agent once a day at the first use.
Can you re-architect this as a (pseudo) daemon so that you unlock it
once (or at least a LOT less often) and it stores the necessary
information in memory for subsequent re-use?
Could you re-configure things so that (a copy of) the requisite password
is accessible via a different set of GPG credentials specific to the
process that you're running? Then you could probably have just that set
of GPG credentials unprotected so that the script could use them as it
is today.
If neither of these options were possible I'd look into something like a
TPM and / or Yubikey wherein I could offload some of the GPG to it so
that the decryption key is physically tied to the source computer /and/ *where* *it* *can't* *be* *copied*.
Doesn't this sort of defeat the purpose of using pass? I mean if it's
always decryptable then is it really useful to have it encrypted in the
first place (assuming you have full disk encryption set up)? I may be
missing something crucial here so please let me know.
Grant:
This seems like the lesser of all evils to me. As I understand, you're suggesting that I lend the email password to the daemon at start and
only have that password stored in memory instead of my actual gpg
password, is that correct?
Again, I may be missing something here, but does having your GPG
credentials unprotected offer any real protection?
I guess this is where I'll eventually be heading towards.
By the way, thanks to both of you for your thoughts!
Doesn't this sort of defeat the purpose of using pass? I mean if
it's
always decryptable then is it really useful to have it encrypted in
the first place (assuming you have full disk encryption set up)?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (0 / 16) |
Uptime: | 165:00:23 |
Calls: | 10,385 |
Calls today: | 2 |
Files: | 14,057 |
Messages: | 6,416,521 |