Add pgp signature to sensitive client - coordinator messages #592
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
pip install pre-commit
, thenpre-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.cd frontend/static/locales; python collect_phrases.py
to collect them for translation.