Implement signature verification api #391
Open
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.
Based on a discussion from a long time ago (https://yiviapp.slack.com/archives/C0KCTQ0BC/p1713794023128249) I decided to implement an API endpoint for verifying signatures in the irma server.
Currently, there's no authorization: as the user already has a signature, and authenticator does not prevent doing disclosures with excessive personal data.
However, maybe it should still be implement to prevent freeloading on a public irma server. I'm not sure about that, nor about how that would look. Alternatively, it could also be made configurable whether the endpoint should be available at all. That way, it can be disabled by default, and hosting parties who are afraid of people using it without authentication can still turn it on when reachable only from a private network.
I haven't made docs or implemented implemented any tests (yet). The verification logic is already tested though, and I'm using this without any issues so far in my project.
Let me know if you have any ideas or requests! If you guys are interested in merging this, I can probably take a look at unittests and docs some time.