all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jschmidt4gnu@vodafonemail.de, emacs-devel@gnu.org, yantar92@posteo.net
Subject: Re: Storing sensitive data indefinitely in variables or buffers: Whether and how to fix?
Date: Sun, 4 Jun 2023 18:47:07 -0500	[thread overview]
Message-ID: <fa858dba-6b08-7824-4b56-6135e4010c4f@alphapapa.net> (raw)
In-Reply-To: <83v8g6bcls.fsf@gnu.org>

On 6/2/23 01:30, Eli Zaretskii wrote:
>> Date: Thu, 1 Jun 2023 15:47:39 -0500
>> Cc: adam@alphapapa.net, emacs-devel@gnu.org, yantar92@posteo.net
>> From: Adam Porter <adam@alphapapa.net>
>>
>> plstore looks like an interesting library, but even that looks like more
>> than the simple solution I'm wishing for.  I'm not sure that, as an
>> application author, I should need to care about which keys in a record
>> are encrypted or not.  I just want to do something simple and Lispy, like:
>>
>>     (alist-get "@alphapapa:matrix.org" (secure-storage 'ement-sessions))
>>
>> To get my Matrix session's data.  Or:
>>
>>     (map-nested-elt (secure-storage 'ement-sessions)
>> '("@alphapapa:matrix.org" token))
>>
>> to get that session's token.  And then:
>>
>>     (setf (map-nested-elt (secure-storage 'ement-sessions)
>> '("@alphapapa:matrix.org" token)) "foobarbaz")
>>
>> to write the data to the secure storage.  And then the secure-storage
>> library should automatically handle the encryption/decryption,
>> filesystem location, backend format, prompting the user for a key and/or
>> caching it appropriately, etc.
>>
>> I think this is the simplest kind of API that could be useful to
>> applications--and it would be really useful.
> 
> I see no problems implementing such a simple API on top of plstore.el.
> But I don't really understand why you would care to use alist-get
> instead of, say, plstore-get.  Why does it matter whether the storage
> is presented as an alist or as an opaque storage with accessor and
> setter?

I don't mean that it should be an alist specifically.  I mean that I'd 
just like to get/put a Lisp object, which I could then use with standard 
Lisp functions like alist-get, plist-get, gethash, as well as map-elt, 
and setf wrappers for setting, etc.



  reply	other threads:[~2023-06-04 23:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 21:25 Storing sensitive data indefinitely in variables or buffers: Whether and how to fix? Jens Schmidt
2023-05-31  8:02 ` Ihor Radchenko
2023-05-31 16:39   ` Adam Porter
2023-05-31 18:17     ` tomas
2023-06-01  6:34       ` Ihor Radchenko
2023-06-01  6:51         ` tomas
2023-06-01  7:11           ` Ihor Radchenko
2023-05-31 19:05     ` Eli Zaretskii
2023-06-01  6:48       ` Ihor Radchenko
2023-06-01  7:11         ` Eli Zaretskii
2023-06-01  7:29           ` Ihor Radchenko
2023-06-01  7:33             ` Eli Zaretskii
2023-06-01  7:34           ` tomas
2023-05-31 19:37     ` Jens Schmidt
2023-06-01  6:42       ` Ihor Radchenko
2023-06-01 20:10         ` Jens Schmidt
2023-06-01 20:47           ` Adam Porter
2023-06-02  6:30             ` Eli Zaretskii
2023-06-04 23:47               ` Adam Porter [this message]
2023-06-05  2:31                 ` Eli Zaretskii
2023-05-31 12:56 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa858dba-6b08-7824-4b56-6135e4010c4f@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jschmidt4gnu@vodafonemail.de \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.