Find and study register@ functionality #56

Closed
opened 2022-01-10 21:51:26 +01:00 by pfm · 4 comments
Collaborator

According to README:

We should locate that functionality, document and test it.

According to README: > - people can send an S/MIME signed email to register@yourdomain.tld to register their public key > - people can send their public OpenPGP key as attachment or inline to register@yourdomain.tld to register it We should locate that functionality, document and test it.
pfm added the
CODE
label 2022-01-10 21:51:45 +01:00
Author
Collaborator

Turns out it is implemented by register-handler.py script. However, the implementation doesn't seem to be very thorough.

It works as Postfix alias handler (see Install Register-handler in INSTALL.md):

  1. Add register: |/usr/local/bin/register-handler.py to /etc/aliases
  2. Update postfix's alias database with postalias /etc/aliases

We should definitely cover this part with tests too (see #57).

Turns out it *is* implemented by `register-handler.py` script. However, the implementation doesn't seem to be very thorough. It works as Postfix alias handler (see [Install Register-handler](https://git.disroot.org/Disroot/gpg-lacre/src/branch/master/INSTALL.md#install-register-handler) in `INSTALL.md`): > 6. Add `register: |/usr/local/bin/register-handler.py` to `/etc/aliases` > 7. Update postfix's alias database with `postalias /etc/aliases` We should definitely cover this part with tests too (see #57).
Author
Collaborator

Key steps of register-handler.py flow:

  1. The script is fed with a registration message.
  2. Key or certificate (material) is extracted.
  3. Material is uploaded to the web panel URL.
  4. If the web panenl returns a non-OK status, a failure message is sent to the sender of registration request.

Conclusion: we'll need to mock the web panel to test this script.

Key steps of `register-handler.py` flow: 1. The script is fed with a registration message. 2. Key or certificate (material) is extracted. 3. Material is uploaded to the web panel URL. 4. If the web panenl returns a non-OK status, a failure message is sent to the sender of registration request. Conclusion: we'll need to mock the web panel to test this script.
Owner

Gotcha. I will setup this up on lacre's test server so we could have a look, but I wonder whether we should focus on this right now or just do migration of the base code base and look into this once we are already on python3 with the base working well and ready for some closed alpha tests on test server with few people.

Gotcha. I will setup this up on lacre's test server so we could have a look, but I wonder whether we should focus on this right now or just do migration of the base code base and look into this once we are already on python3 with the base working well and ready for some closed alpha tests on test server with few people.
Author
Collaborator

I think that the most important functionality is already covered with tests, so we can skip testing this script. But we should keep in mind that after migration this script can stop working -- Python 3.x uses different data types in certain contexts.

I'm closing this ticket and will update the one related to tests.

I think that the most important functionality is already covered with tests, so we can skip testing this script. But we should keep in mind that after migration this script can stop working -- Python 3.x uses different data types in certain contexts. I'm closing this ticket and will update the one related to tests.
pfm closed this issue 2022-01-12 22:45:41 +01:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Disroot/gpg-lacre#56
No description provided.