Fix unencrypted delivery and key removal #130

Merged
pfm merged 40 commits from 129-key-removal into main 2023-12-02 21:59:15 +01:00
Collaborator

Expected to fix !129.

Expected to fix !129.
pfm added 3 commits 2023-09-21 20:24:25 +02:00
When falling back to unencrypted mail delivery, do not pass sender information
to SendFrom.call method.
- Use regular expressions instead of finding particular characters in gnupg
  output to decide whether confirmation line was found.

- Use tempfile.mkdtemp to create secure temporary directories.

- Record information about the key considered by GnuPG. When missing in
  exception, it means no key was found.
pfm self-assigned this 2023-09-21 20:24:32 +02:00
pfm added 1 commit 2023-09-25 19:44:33 +02:00
pfm added 5 commits 2023-10-23 22:48:26 +02:00
pfm added 1 commit 2023-10-27 23:54:06 +02:00
pfm added 6 commits 2023-11-15 20:38:29 +01:00
Introduce new Python modules:

- lacre.notify -- to send notifications from the cron script;

- lacre.dbschema -- to keep database schema definition as code (SQLAlchemy);

- lacre.repositories -- to define key and identity repositories with high
  level APIs that we can then use elsewhere.

Also:

- rework GnuPG.add_key to return fingerprint so we can use it in the cron
  script;

- rename cron-job's logger name, replacing dash with an underscore as logging
  module doesn't like dashes.
Also: reformat with spaces instead of tabs.
pfm added 2 commits 2023-11-17 22:56:04 +01:00
pfm added 4 commits 2023-11-20 22:12:23 +01:00
Keys don't have to be surrounded with less-than and greater-than characters,
so this code could mishandle valid keys.
- Implement a context manager logging execution time.
- Use that context manager in daemon's handle_DATA method.
Also: rename key_id to fingerprint.
pfm added 1 commit 2023-11-20 22:28:14 +01:00
pfm added 4 commits 2023-11-25 01:14:13 +01:00
- Keep only one class to provide access to identities stored in the database.

- Remove old code and its tests.

- Align KeyRing and IdentityRepository APIs.

- Implement a (very) simple unit test for IdentityRepository.
- Flush key-collecting structures each time a new public key entry is found.
  This will avoid adding sub-keys and overwriting main keys with them.

- Use parseaddr from email.utils to parse emails (and drop realname part).

- Record logs produced during unit tests.

- Fix a small bug in test code.

Also: add basic information about available test identities to testing
documentation.
- Use accessor methods.
- Avoid data duplication.
pfm added 2 commits 2023-11-25 14:08:06 +01:00
- Don't pass table definitions to repository constructors.

- Keep an internal reference to Engine in lacre.repository.

- Implement KeyConfirmationQueue.count_keys.
pfm added 3 commits 2023-11-25 15:10:07 +01:00
pfm added 2 commits 2023-11-25 16:11:25 +01:00
Author
Collaborator

This change depends on Lacre/lacre-webgate#11.

This change depends on Lacre/lacre-webgate#11.
pfm added 3 commits 2023-11-26 18:32:31 +01:00
- Let the user specify a directory, using the one from configuration by
  default.

- If user requested identity list without a specific email, list all.  Drop
  support for '-a' option.
pfm added 2 commits 2023-12-02 21:19:19 +01:00
pfm added 1 commit 2023-12-02 21:48:31 +01:00
pfm merged commit b7713207ab into main 2023-12-02 21:59:15 +01:00
pfm deleted branch 129-key-removal 2023-12-02 21:59:16 +01:00
Sign in to join this conversation.
No description provided.