Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pgp signature to sensitive client - coordinator messages #592

Merged
merged 2 commits into from
May 17, 2023

Conversation

Reckless-Satoshi
Copy link
Collaborator

@Reckless-Satoshi Reckless-Satoshi commented May 17, 2023

What does this PR do?

This is the last pre-requisite for the backend to be fully ready for the Federated model.

Coordinators know the authorization token of a given robot. Therefore, a malicious coordinator, could try to sneak into the orders that a robot has with another coordinator. This is not an issue for chat messages, as these are PGP encrypted, and the coordinator does not know the robot token. However, the coordinator, could be sneaky and try to submit an invoice or address of his own (alla MITM) to be paid out to his account once a trade finishes.

This PR extends the use of PGP signatures to addresses and invoices. A coordinator will only accept an address or invoice if it has been signed by the key of the robot, hence, proving possession of the robot token.

This PR is compatible with previous clients (they still send unsigned invoices/addresses). The support for unsigned Invoices/addresses will be dropped after v0.5.1

Checklist before merging

  • Install pre-commit and initialize it: pip install pre-commit, then pre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.
  • If I added new phrases to the user interface, I have ran cd frontend/static/locales; python collect_phrases.py to collect them for translation.

@Reckless-Satoshi Reckless-Satoshi marked this pull request as ready for review May 17, 2023 12:47
@Reckless-Satoshi Reckless-Satoshi changed the title Add pgp signature to sensitive client -> coordinator messages Add pgp sign to sensitive client - coordinator messages May 17, 2023
@Reckless-Satoshi Reckless-Satoshi changed the title Add pgp sign to sensitive client - coordinator messages Add pgp signature to sensitive client - coordinator messages May 17, 2023
@Reckless-Satoshi Reckless-Satoshi merged commit 516537a into main May 17, 2023
@Reckless-Satoshi Reckless-Satoshi deleted the pgp-sign-post branch May 17, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant