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

feat(prism-agent): align DID document service handling with the spec #582

Merged
merged 27 commits into from
Jul 5, 2023

Conversation

patlo-iog
Copy link
Contributor

Overview

ATL-3559
ATL-3789

Checklist

My PR contains...

  • No code changes (changes to documentation, CI, metadata, etc.)
  • Bug fixes (non-breaking change which fixes an issue)
  • Improvements (misc. changes to existing features)
  • Features (non-breaking change which adds functionality)

My changes...

  • are breaking changes
  • are not breaking changes
  • If yes to above: I have updated the documentation accordingly

Documentation

  • My changes do not require a change to the project documentation
  • My changes require a change to the project documentation
  • If yes to above: I have updated the documentation accordingly

Tests

  • My changes can not or do not need to be tested
  • My changes can and should be tested by unit and/or integration tests
  • If yes to above: I have added tests to cover my changes
  • If yes to above: I have taken care to cover edge cases in my tests

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Atala PRISM Test Results

  56 files  +  2    56 suites  +2   7m 49s ⏱️ +17s
488 tests +51  477 ✔️ +48  11 💤 +3  0 ±0 
489 runs  +51  478 ✔️ +48  11 💤 +3  0 ±0 

Results for commit 6ac09cb. ± Comparison against base commit 3c2f7a0.

This pull request removes 9 and adds 60 tests. Note that renamed tests count towards both.
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when one of the service endpoints is a relative URL instead of an absolute URL
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when one of the service endpoints is an invalid URI fragment
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when one of the service endpoints is empty
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when one of the service endpoints is not a valid URL
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when service endpoint is empty
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when serviceEndpoint is None
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when serviceEndpoint is empty
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when serviceEndpoint is invalid
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - UpdateOperation validation - reject UpdateOperation when action AddService serviceEndpoint is empty
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - encode service endpoint - encode multiple endoints JSON object
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - encode service endpoint - encode multiple endoints URI
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - encode service endpoint - encode single endoint JSON object
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - encode service endpoint - encode single endoint URI
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - encode service type - encode multiple service types
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - encode service type - encode single service type
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - parseServiceEndpoint - parse empty json array
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - parseServiceEndpoint - parse empty json object
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - parseServiceEndpoint - parse empty uri string
io.iohk.atala.castor.core.model.ProtoModelHelperSpec ‑ ProtoModelHelper - parseServiceEndpoint - parse invalid endpoint that is not a string or object
…
This pull request skips 3 tests.
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - CreateOperation validation - reject CreateOperation when service URL is not normalized
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - UpdateOperation validation - reject UpdateOperation when action AddService serviceEndpoint is not normalized
io.iohk.atala.castor.core.util.DIDOperationValidatorSpec ‑ DIDOperationValidator - UpdateOperation validation - reject updateOperation when action UpdateService serviceEndpoint is not normalized

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

E2E Test Results

11 files  ±0  11 suites  ±0   6m 32s ⏱️ +18s
21 tests ±0  21 ✔️ ±0  0 💤 ±0  0 ±0 
32 runs  ±0  32 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 6ac09cb. ± Comparison against base commit 3c2f7a0.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2023

Atala PRISM Code Coverage

File Coverage
All files 23%

Minimum allowed coverage is 12%

Generated by 🐒 cobertura-action against 6ac09cb

@patlo-iog patlo-iog marked this pull request as ready for review July 5, 2023 18:51
@patlo-iog patlo-iog merged commit c9e69f6 into main Jul 5, 2023
9 checks passed
@patlo-iog patlo-iog deleted the feat/align-did-service-rebase branch July 5, 2023 18:52
atala-dev added a commit that referenced this pull request Jul 10, 2023
# [1.7.0](prism-agent-v1.6.0...prism-agent-v1.7.0) (2023-07-10)

### Bug Fixes

* Adding Apollo ADR ([#573](#573)) ([e036bc8](e036bc8))
* **castor:** fix DID parser that failing to parse some DIDs ([#581](#581)) ([24b2300](24b2300))
* **pollux:** add pagination at db level for getCredentialRecords ([#586](#586)) ([c0db5c8](c0db5c8))

### Features

* **prism-agent:** add http metrics ([#585](#585)) ([f62d7f5](f62d7f5))
* **prism-agent:** align DID document service handling with the spec ([#582](#582)) ([c9e69f6](c9e69f6))
* **prism-agent:** expose connect/issue/presentation records 'thid' and add it to REST API queries ([#583](#583)) ([9a97c7a](9a97c7a))
* **prism-agent:** simple event mechanism using webhook ([#575](#575)) ([42cf8c9](42cf8c9)), closes [#1](#1)

### Performance Improvements

* add k6 connection flow running in CI ([#572](#572)) ([601f934](601f934))
patlo-iog added a commit that referenced this pull request Aug 17, 2023
…epo subject to the Developer Certificate of Origin (DCO), Version 1.1.

216ff3a fix(prism-agent): fix OAS on empty DID resolution representation (#616)
4fb1ca7 test: silence migration loggers in tests (#612)
7609e35 build: dependencies updates (#601)
bb1f112 fix(castor): align DID document translation logic (#595)
a1e457a fix(prism-agent): add did-method path segment in HD key derivation (#596)
a8b2f85 build: fix failing build (#597)
fa8c720 docs: improve explanation on DID update lineage (#587)
c0db5c8 fix(pollux): add pagination at db level for getCredentialRecords (#586)
c9e69f6 feat(prism-agent): align DID document service handling with the spec (#582)
24b2300 fix(castor): fix DID parser that failing to parse some DIDs (#581)
e8411dd fix(prism-agent): fix concurrent requests breaking DID index counter (#571)
6a5f9ce fix(prism-agent): decouple secret storage backend from agent (#570)
f450563 chore: cleanup unused oas api template (#566)
d6ff373 test: add key derivation benchmark tests and docs (#563)
3d7696b docs: add new tutorial page on seed generation and fixes (#561)
c3a5d8e fix: log seed error before effect fail (#557)
ee43feb feat(prism-agent): integrate DID secret storage with Vault (#543)
6129baf feat(prism-agent): add support for hierarchical deterministic key with seed (#534)
e36c634 fix(prism-agent): refactor crypto abstraction in the walletAPI (#522)
7bda5b0 chore: cleanup castor and wallet-api unused code (#519)
88eeefd feat(prism-agent): migrate did-registrar endpoint to tapir (#517)
9d587ff feat(prism-agent): migrate DID endpoint to tapir (#511)
8384fe3 feat(castor): add support for context in DID document & operation (#489)
e426a82 feat(prism-node): add context to protobuf definition (#487)
6e5bc5f ci: customize protolint rule in megalinter (#478)
2af6d11 docs: update did tutorial examples (#469)
af356d6 fix(prism-agent): fix incorrect long-form parsing behavior on resolution endpoint (#475)
f269b7e fix(pollux): upgrade castor version (#472)
5ed0978 fix(castor): fix unintended ordering behavior when parsing long-form DID (#471)
1cbb729 feat(prism-agent): add universal-resolver compatible endpoint (#455)
184838c docs: add docusaurus deactivate DID guide (#437)
30d11ff docs: improve DID OAS documentation (#442)
8b34217 docs: add docusaurus DID update guide (#417)
490ae2d docs: docusaurus publish DID guide (#406)
bf03674 fix(prism-agent): avoid race condition when update or deactivate DID (#415)
dd04c3f fix(prism-agent): add consistency to documentation of OAS on DID endpoints (#408)
447817d tests(prism-agent): fix failing e2e Prism DID scenarios (#402)
6a98f70 fix(prism-agent): add uri normalization on UpdateService patch (#401)
cd77edc docs: add create-DID docusaurus guide (#383)
a21e388 feat(prism-agent): add pagination to did-registrar list DID endpoint (#394)
3d08996 feat(prism-agent): fix DID service URI class and improve validation error response message (#389)
757b16b feat(pollux): upgrade castor vertion to 0.8.1 (#388)
f92fed6 fix(castor): use URI that is compliant to RFC3986 (#385)
1aa856f feat(prism-agent): do not create new Prism DID when proof presentation is generated (#378)
253f827 feat(pollux): check prover DID is the same as VC subject when creating a VP (#377)
1305555 test(pollox): make munit tests run (#374)
1c1a171 feat(prism-agent): issue credential to Prism DID holder by Prism DID issuer (#373)
5a1acde feat(pollux): support issuing VC to Prism DID subject by Prism DID issuer (#371)
74e1d21 test(prism-agent): add wallet-api and key-management tests (#362)
b8643a8 feat(prism-agent): upgrade castor and pollux and align OAS to the DID spec (#342)
00a6026 feat(pollux): upgrade castor and update DID public key extraction logic (#339)
7992b80 feat(castor): align castor implementation with DID spec (#336)
29a804f feat(prism-agent): add deactivate DID endpoint (#326)
de180a6 feat(pollux): upgrade castor to 0.7.0 (#330)
5ceb7e9 feat(castor): add support DID deactivate operation (#325)
a934cd4 fix(prism-agent): remove deprecated did-auth endpoints (#324)
a57365f feat(prism-agent): enable update DID operation on prism-agent (#307)
c97624d feat(pollux): upgrade castor to 0.6.0 (#320)
27b77b2 feat(castor): add support for DID update operation (#306)
af71ba1 ci: disable tsql linter and customise sql-lint linter (#313)
762c0cf ci: use latest megalinter version 6.18 for pre-commit hook (#308)
5661e76 feat(castor): upgrade node client for new key type (#287)
a533507 feat(prism-node): align Prism DID protobuf key type (#286)
7e116a3 feat(prism-agent): implement JDBC did nonsecret storage (#284)
ea10db5 feat(pollux): integrate castor resolver to pollux-jwt-vc library (#250)
27370ab fix(castor): add missing did document field (#251)
0ba3b89 feat(prism-agent): upgrade castor version with DID serviceEndpoint (#229)
8223740 feat(castor): upgrade castor with service in protobuf definition (#224)
8a6bad5 feat(prism-agent): bump dependencies version (#228)
53841d6 feat(prism-node): move api directory / make client releasable (#223)
680ef7b feat(prism-node): add service to prism-node protobuf (#222)
d7618eb infra: make prism-agent wait for db (#218)
e149f58 build(prism-agent): remove mistakenly added sbt settings (#214)
0308b4f feat(prism-agent): remove unused / deprecated DID endpoints (#213)
d5e08ab feat(prism-agent): implement get DIDs endpoint (#198)
7fba9b0 feat(prism-agent): implement DID resolution endpoint (#184)
d72159f feat(castor): implement translation of Node DidData to W3C DidDocument (#182)
e85e7c0 feat(prism-agent): upgrade castor on prism-agent (#141)
56cc1c3 feat(connect): bump up shared version to use 0.2.0
4809414 feat(pollux): fix shared version to 0.2.0
5e3445f feat(castor): update castor to use prism-node protobuf (#136)
14906a6 chore(pollux): upgrade shared lib version (#148)
70555c9 feat(shared): add base64 helper function (#135)
b39e38f ci(prism-node): add prism-node github workflow (#129)
948e864 feat(prism-node): add prism-node scala grpc client generation (#128)
71937da ci: add prism-node commit scope (#127)
a873090 fix(prism-agent): reuse db connection for background job (#102)
9cd1faa ci: rename commit scope agent to prism-agent (#97)
4a88ded feat(agent): integrate key-manage into prism-agent server (#77)
47dc3cd feat: define key-management interface (3) (#71)
a19a781 fix(iris): align type signature (#72)
bcb0991 [ATL-1925] feat(agent): define key-management interface (2) (#66)
6f5534d [ATL-1925] feat(agent): define key-management interface (1) (#63)
8492422 [ATL-1926] feat(castor): implement createPublishedDID (3) (#58)
f6afd38 [ATL-1926] feat(castor): implement createPublishedDID (2) (#53)
4e5260e [ATL-1926] feat(castor): implement createPublishedDID functionality (1) (#48)
24786b9 [ATL-1924] feat: rfc17 repo restructure (#47)
6f25f4c [ATL-1808] feat(castor): update http server for new OAS (#35)
642a2cd [ATL-1759] feat(castor): merge worker and api-server into a single runnable (#28)
45a18c9 [ATL-1759] feat(castor): castor services scaffolding (#24)
ca13854 Merge pull request #13 from input-output-hk/resolve-castor-c4-comment
fa7688c docs(castor): adjust diagram according to review comments
359ffd6 [ATL-1477] add Castor C4 diagram (#6)

Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>
antonbaliasnikov pushed a commit that referenced this pull request Aug 21, 2023
…epo subject to the Developer Certificate of Origin (DCO), Version 1.1.

216ff3a fix(prism-agent): fix OAS on empty DID resolution representation (#616)
4fb1ca7 test: silence migration loggers in tests (#612)
7609e35 build: dependencies updates (#601)
bb1f112 fix(castor): align DID document translation logic (#595)
a1e457a fix(prism-agent): add did-method path segment in HD key derivation (#596)
a8b2f85 build: fix failing build (#597)
fa8c720 docs: improve explanation on DID update lineage (#587)
c0db5c8 fix(pollux): add pagination at db level for getCredentialRecords (#586)
c9e69f6 feat(prism-agent): align DID document service handling with the spec (#582)
24b2300 fix(castor): fix DID parser that failing to parse some DIDs (#581)
e8411dd fix(prism-agent): fix concurrent requests breaking DID index counter (#571)
6a5f9ce fix(prism-agent): decouple secret storage backend from agent (#570)
f450563 chore: cleanup unused oas api template (#566)
d6ff373 test: add key derivation benchmark tests and docs (#563)
3d7696b docs: add new tutorial page on seed generation and fixes (#561)
c3a5d8e fix: log seed error before effect fail (#557)
ee43feb feat(prism-agent): integrate DID secret storage with Vault (#543)
6129baf feat(prism-agent): add support for hierarchical deterministic key with seed (#534)
e36c634 fix(prism-agent): refactor crypto abstraction in the walletAPI (#522)
7bda5b0 chore: cleanup castor and wallet-api unused code (#519)
88eeefd feat(prism-agent): migrate did-registrar endpoint to tapir (#517)
9d587ff feat(prism-agent): migrate DID endpoint to tapir (#511)
8384fe3 feat(castor): add support for context in DID document & operation (#489)
e426a82 feat(prism-node): add context to protobuf definition (#487)
6e5bc5f ci: customize protolint rule in megalinter (#478)
2af6d11 docs: update did tutorial examples (#469)
af356d6 fix(prism-agent): fix incorrect long-form parsing behavior on resolution endpoint (#475)
f269b7e fix(pollux): upgrade castor version (#472)
5ed0978 fix(castor): fix unintended ordering behavior when parsing long-form DID (#471)
1cbb729 feat(prism-agent): add universal-resolver compatible endpoint (#455)
184838c docs: add docusaurus deactivate DID guide (#437)
30d11ff docs: improve DID OAS documentation (#442)
8b34217 docs: add docusaurus DID update guide (#417)
490ae2d docs: docusaurus publish DID guide (#406)
bf03674 fix(prism-agent): avoid race condition when update or deactivate DID (#415)
dd04c3f fix(prism-agent): add consistency to documentation of OAS on DID endpoints (#408)
447817d tests(prism-agent): fix failing e2e Prism DID scenarios (#402)
6a98f70 fix(prism-agent): add uri normalization on UpdateService patch (#401)
cd77edc docs: add create-DID docusaurus guide (#383)
a21e388 feat(prism-agent): add pagination to did-registrar list DID endpoint (#394)
3d08996 feat(prism-agent): fix DID service URI class and improve validation error response message (#389)
757b16b feat(pollux): upgrade castor vertion to 0.8.1 (#388)
f92fed6 fix(castor): use URI that is compliant to RFC3986 (#385)
1aa856f feat(prism-agent): do not create new Prism DID when proof presentation is generated (#378)
253f827 feat(pollux): check prover DID is the same as VC subject when creating a VP (#377)
1305555 test(pollox): make munit tests run (#374)
1c1a171 feat(prism-agent): issue credential to Prism DID holder by Prism DID issuer (#373)
5a1acde feat(pollux): support issuing VC to Prism DID subject by Prism DID issuer (#371)
74e1d21 test(prism-agent): add wallet-api and key-management tests (#362)
b8643a8 feat(prism-agent): upgrade castor and pollux and align OAS to the DID spec (#342)
00a6026 feat(pollux): upgrade castor and update DID public key extraction logic (#339)
7992b80 feat(castor): align castor implementation with DID spec (#336)
29a804f feat(prism-agent): add deactivate DID endpoint (#326)
de180a6 feat(pollux): upgrade castor to 0.7.0 (#330)
5ceb7e9 feat(castor): add support DID deactivate operation (#325)
a934cd4 fix(prism-agent): remove deprecated did-auth endpoints (#324)
a57365f feat(prism-agent): enable update DID operation on prism-agent (#307)
c97624d feat(pollux): upgrade castor to 0.6.0 (#320)
27b77b2 feat(castor): add support for DID update operation (#306)
af71ba1 ci: disable tsql linter and customise sql-lint linter (#313)
762c0cf ci: use latest megalinter version 6.18 for pre-commit hook (#308)
5661e76 feat(castor): upgrade node client for new key type (#287)
a533507 feat(prism-node): align Prism DID protobuf key type (#286)
7e116a3 feat(prism-agent): implement JDBC did nonsecret storage (#284)
ea10db5 feat(pollux): integrate castor resolver to pollux-jwt-vc library (#250)
27370ab fix(castor): add missing did document field (#251)
0ba3b89 feat(prism-agent): upgrade castor version with DID serviceEndpoint (#229)
8223740 feat(castor): upgrade castor with service in protobuf definition (#224)
8a6bad5 feat(prism-agent): bump dependencies version (#228)
53841d6 feat(prism-node): move api directory / make client releasable (#223)
680ef7b feat(prism-node): add service to prism-node protobuf (#222)
d7618eb infra: make prism-agent wait for db (#218)
e149f58 build(prism-agent): remove mistakenly added sbt settings (#214)
0308b4f feat(prism-agent): remove unused / deprecated DID endpoints (#213)
d5e08ab feat(prism-agent): implement get DIDs endpoint (#198)
7fba9b0 feat(prism-agent): implement DID resolution endpoint (#184)
d72159f feat(castor): implement translation of Node DidData to W3C DidDocument (#182)
e85e7c0 feat(prism-agent): upgrade castor on prism-agent (#141)
56cc1c3 feat(connect): bump up shared version to use 0.2.0
4809414 feat(pollux): fix shared version to 0.2.0
5e3445f feat(castor): update castor to use prism-node protobuf (#136)
14906a6 chore(pollux): upgrade shared lib version (#148)
70555c9 feat(shared): add base64 helper function (#135)
b39e38f ci(prism-node): add prism-node github workflow (#129)
948e864 feat(prism-node): add prism-node scala grpc client generation (#128)
71937da ci: add prism-node commit scope (#127)
a873090 fix(prism-agent): reuse db connection for background job (#102)
9cd1faa ci: rename commit scope agent to prism-agent (#97)
4a88ded feat(agent): integrate key-manage into prism-agent server (#77)
47dc3cd feat: define key-management interface (3) (#71)
a19a781 fix(iris): align type signature (#72)
bcb0991 [ATL-1925] feat(agent): define key-management interface (2) (#66)
6f5534d [ATL-1925] feat(agent): define key-management interface (1) (#63)
8492422 [ATL-1926] feat(castor): implement createPublishedDID (3) (#58)
f6afd38 [ATL-1926] feat(castor): implement createPublishedDID (2) (#53)
4e5260e [ATL-1926] feat(castor): implement createPublishedDID functionality (1) (#48)
24786b9 [ATL-1924] feat: rfc17 repo restructure (#47)
6f25f4c [ATL-1808] feat(castor): update http server for new OAS (#35)
642a2cd [ATL-1759] feat(castor): merge worker and api-server into a single runnable (#28)
45a18c9 [ATL-1759] feat(castor): castor services scaffolding (#24)
ca13854 Merge pull request #13 from input-output-hk/resolve-castor-c4-comment
fa7688c docs(castor): adjust diagram according to review comments
359ffd6 [ATL-1477] add Castor C4 diagram (#6)

Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants