Modular pkg and tests#13
Merged
leonbotros merged 20 commits intomainfrom Oct 31, 2022
Merged
Conversation
Iso5786
reviewed
Jun 29, 2022
3aaffea to
9d951a0
Compare
9d951a0 to
e9a1ddb
Compare
Collaborator
Author
|
Checks do not all succeed because I changed the them to a matrix strategy, but they are the same tests. |
1a9bf8b to
d1b1d17
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds modularity wrt authentication method to the PKG. It is implemented as follows:
<K as IBKEM>::Id) for a scheme.The middleware adds the identity to the request-local extensions. The key service extracts the key and adds it the the response-local extensions after which the middleware is responsible for creating the response. This way a key cannot end up in a response "by accident".
This PR also includes testing middleware that receives an IRMA policy and performs no authentication. This way, some PKG endpoints can be tested without testing the IRMA part of the process. Some basic tests and a full round of encapsulation using the keys obtained via the API are included.
This PR does make breaking changes to the API, specifically, the endpoints that are used for IRMA authentication are now prefixed with
/irma.