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

Feature/14/14 verify JWS (with ADR) #11

Merged
merged 55 commits into from
Jul 4, 2022

Conversation

algattik
Copy link

@algattik algattik commented Jun 22, 2022

What this PR changes/adds

Access to the Registration Service API is authenticated with JWS, using scheme and libraries provided in EDC (those libraries are used in EDC for IDS authentication).

See ADR for more details.

Why it does that

Authentication ensures that only actors who can assert their control of a did:web identifier can register that identifier as a dataspace participant.

Further notes

Linked Issue(s)

agera-edc/MinimumViableDataspace#14

Checklist

  • added appropriate tests?
  • performed checkstyle check locally?
  • added/updated copyright headers?
  • documented public classes/methods?
  • added/updated relevant documentation?
  • added relevant details to the changelog? (skip with label no-changelog)
  • formatted title correctly? (take a look at the CONTRIBUTING and styleguide for details)

@github-actions
Copy link

github-actions bot commented Jun 22, 2022

Unit Test Results

11 files  +  4  11 suites  +4   3s ⏱️ +2s
34 tests +16  34 ✔️ +16  0 💤 ±0  0 ±0 
42 runs  +16  42 ✔️ +16  0 💤 ±0  0 ±0 

Results for commit 9fb7e7e. ± Comparison against base commit 8fb1a4e.

♻️ This comment has been updated with latest results.

@algattik algattik mentioned this pull request Jun 28, 2022
7 tasks
@algattik algattik changed the title Feature/14/14 verify jws Feature/14/14 verify JWS (with ADR) Jul 1, 2022
@algattik algattik marked this pull request as ready for review July 1, 2022 07:55
@Izzzu Izzzu self-requested a review July 1, 2022 08:36
@cpeeyush cpeeyush self-requested a review July 1, 2022 11:45
Copy link

@cpeeyush cpeeyush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as I was a reviewer before. But will wait for one more approval as I am taking care of this PR now. Thanks

…ion/README.md

Co-authored-by: Ophélie Le Mentec <17216799+ouphi@users.noreply.github.com>
@cpeeyush cpeeyush merged commit 5fc90fb into feature/14-verify-jws Jul 4, 2022
cpeeyush added a commit that referenced this pull request Jul 18, 2022
* .

* .

* .

* .

* Update ParticipantsCommandTest.java

* Update ParticipantManager.java

* Update ParticipantManager.java

* Update action.yml

* Update verify.yaml

* Update JsonWebSignatureHeaderInterceptor.java

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* Update RegistrationApiClientTest.java

* .

* .

* Update Dockerfile

* Update RegistrationServiceCli.java

* Update RegistrationApiClientTest.java

* Update RegistrationServiceExtension.java

* Update RegistrationApiCommandLineClientTest.java

* Create README.md

* Update README.md

* Renamed executeParticipantsAdd to executeParticipantsList

* add comments for headers

* Update RegistrationApiClientTest.java

* Squashed commit of the following:

commit a8cf714
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 22:02:52 2022 +0200

    Update RegistrationApiClientTest.java

commit 4decadc
Merge: b537c9b 39471c3
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 21:56:59 2022 +0200

    Merge branch 'feature/14/14-web-context' into feature/14/14-verify-jws

commit b537c9b
Merge: 4284f1e 830cc32
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 21:54:43 2022 +0200

    Merge branch 'feature/14/14-participant-did' into feature/14/14-verify-jws

commit 4284f1e
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 07:42:10 2022 +0200

    .

commit df33c85
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 07:36:48 2022 +0200

    .

commit e0a92f1
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 07:00:27 2022 +0200

    .

commit 758839b
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 18:28:06 2022 +0200

    .

commit b68e5f4
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 17:49:38 2022 +0200

    .

commit da1682b
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 17:45:30 2022 +0200

    .

commit f486517
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 17:42:17 2022 +0200

    .

commit a0f871e
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 16:06:04 2022 +0200

    .

commit ce92919
Merge: 8644edb a75c1c8
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 16:01:13 2022 +0200

    Merge branch 'feature/14-verify-jws' into feature/14/14-verify-jws

commit 8644edb
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 15:43:41 2022 +0200

    .

commit 357a195
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 15:00:07 2022 +0200

    Update JsonWebSignatureHeaderInterceptor.java

commit 5e80400
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:49:06 2022 +0200

    Update verify.yaml

commit 1df6120
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:48:44 2022 +0200

    Update action.yml

commit 5a7d4b2
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:48:11 2022 +0200

    Update ParticipantManager.java

commit cb2ea94
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:48:11 2022 +0200

    Update ParticipantManager.java

commit c2db217
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:44:19 2022 +0200

    Update ParticipantsCommandTest.java

commit e6a7b37
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 13:48:41 2022 +0200

    .

commit 68fbcd3
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 22 23:07:00 2022 +0200

    .

commit d28d030
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 22 22:57:37 2022 +0200

    .

commit 6049d05
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 22 22:57:31 2022 +0200

    .

* .

* .

* .

* .

* Create README.md

* Update README.md

* Update README.md

* Make integration in EDC easier

* Update docs/developer/decision-records/2022-07-01-service-authentication/README.md

Co-authored-by: Izabela Kulakowska <ikulakowska@microsoft.com>

* Update DidJwtAuthenticationFilter.java

* Improve exception messages on auth failure

* Split up method logic

* Update name

* Use double quotes for Boolean var in docker compose yaml to avoid error

* Update docs/developer/decision-records/2022-07-01-service-authentication/README.md

Co-authored-by: Ophélie Le Mentec <17216799+ouphi@users.noreply.github.com>

Co-authored-by: Izabela Kulakowska <ikulakowska@microsoft.com>
Co-authored-by: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com>
Co-authored-by: Ophélie Le Mentec <17216799+ouphi@users.noreply.github.com>
Izzzu added a commit that referenced this pull request Jul 19, 2022
* Feature/14/14 upgrade edc (#12)

* Feature/14/14 web context (with ADR) (#14)

* Feature/14/14 participant did (#13)

* Feature/14/14 verify JWS (with ADR) (#11)

* .

* .

* .

* .

* Update ParticipantsCommandTest.java

* Update ParticipantManager.java

* Update ParticipantManager.java

* Update action.yml

* Update verify.yaml

* Update JsonWebSignatureHeaderInterceptor.java

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* .

* Update RegistrationApiClientTest.java

* .

* .

* Update Dockerfile

* Update RegistrationServiceCli.java

* Update RegistrationApiClientTest.java

* Update RegistrationServiceExtension.java

* Update RegistrationApiCommandLineClientTest.java

* Create README.md

* Update README.md

* Renamed executeParticipantsAdd to executeParticipantsList

* add comments for headers

* Update RegistrationApiClientTest.java

* Squashed commit of the following:

commit a8cf714
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 22:02:52 2022 +0200

    Update RegistrationApiClientTest.java

commit 4decadc
Merge: b537c9b 39471c3
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 21:56:59 2022 +0200

    Merge branch 'feature/14/14-web-context' into feature/14/14-verify-jws

commit b537c9b
Merge: 4284f1e 830cc32
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 21:54:43 2022 +0200

    Merge branch 'feature/14/14-participant-did' into feature/14/14-verify-jws

commit 4284f1e
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 07:42:10 2022 +0200

    .

commit df33c85
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 07:36:48 2022 +0200

    .

commit e0a92f1
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 29 07:00:27 2022 +0200

    .

commit 758839b
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 18:28:06 2022 +0200

    .

commit b68e5f4
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 17:49:38 2022 +0200

    .

commit da1682b
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 17:45:30 2022 +0200

    .

commit f486517
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 17:42:17 2022 +0200

    .

commit a0f871e
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 16:06:04 2022 +0200

    .

commit ce92919
Merge: 8644edb a75c1c8
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 16:01:13 2022 +0200

    Merge branch 'feature/14-verify-jws' into feature/14/14-verify-jws

commit 8644edb
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 15:43:41 2022 +0200

    .

commit 357a195
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 15:00:07 2022 +0200

    Update JsonWebSignatureHeaderInterceptor.java

commit 5e80400
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:49:06 2022 +0200

    Update verify.yaml

commit 1df6120
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:48:44 2022 +0200

    Update action.yml

commit 5a7d4b2
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:48:11 2022 +0200

    Update ParticipantManager.java

commit cb2ea94
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:48:11 2022 +0200

    Update ParticipantManager.java

commit c2db217
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 14:44:19 2022 +0200

    Update ParticipantsCommandTest.java

commit e6a7b37
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Tue Jun 28 13:48:41 2022 +0200

    .

commit 68fbcd3
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 22 23:07:00 2022 +0200

    .

commit d28d030
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 22 22:57:37 2022 +0200

    .

commit 6049d05
Author: Alexandre Gattiker <algattik@microsoft.com>
Date:   Wed Jun 22 22:57:31 2022 +0200

    .

* .

* .

* .

* .

* Create README.md

* Update README.md

* Update README.md

* Make integration in EDC easier

* Update docs/developer/decision-records/2022-07-01-service-authentication/README.md

Co-authored-by: Izabela Kulakowska <ikulakowska@microsoft.com>

* Update DidJwtAuthenticationFilter.java

* Improve exception messages on auth failure

* Split up method logic

* Update name

* Use double quotes for Boolean var in docker compose yaml to avoid error

* Update docs/developer/decision-records/2022-07-01-service-authentication/README.md

Co-authored-by: Ophélie Le Mentec <17216799+ouphi@users.noreply.github.com>

Co-authored-by: Izabela Kulakowska <ikulakowska@microsoft.com>
Co-authored-by: Peeyush Chandel <555114+cpeeyush@users.noreply.github.com>
Co-authored-by: Ophélie Le Mentec <17216799+ouphi@users.noreply.github.com>

* Move artifact version in config

* Variable renaming for clarity

* Externalize verbose error response config

* PR feedback

Co-authored-by: Alexandre Gattiker <algattik@users.noreply.github.com>
Co-authored-by: Izabela Kulakowska <ikulakowska@microsoft.com>
Co-authored-by: Ophélie Le Mentec <17216799+ouphi@users.noreply.github.com>
Co-authored-by: Marc Gomez <marcgomez@microsoft.com>
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.

4 participants