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

✨ Implement DID Exchange and DID Rotate methods and πŸ—‘οΈ deprecate connections protocol #1119

Merged
merged 34 commits into from
Oct 17, 2024

Conversation

ff137
Copy link
Collaborator

@ff137 ff137 commented Oct 15, 2024

✨ Implements DID-Exchange and DID-Rotate methods in our Connections API
New endpoints under /connections:

  • /did-exchange/create-request
  • /did-exchange/accept-request
  • /did-exchange/reject
  • /did-rotate
  • /did-rotate/hangup

πŸ—‘οΈ Deprecates the following endpoints:

  • /connections/create-invitation
  • /connections/accept-invitation

βœ… Includes e2e and unit test coverage

πŸŽ‰ Upgraded cloudcontroller now allows Create Local DID support for: did:web, did:peer2, did:peer:4

Closes #910

app/routes/connections.py Fixed Show fixed Hide fixed
app/routes/connections.py Fixed Show fixed Hide fixed
app/routes/connections.py Fixed Show fixed Hide fixed
app/routes/connections.py Fixed Show fixed Hide fixed
app/routes/connections.py Fixed Show fixed Hide fixed
@ff137 ff137 self-assigned this Oct 16, 2024
@ff137 ff137 added the enhancement New feature or request label Oct 16, 2024
@ff137 ff137 marked this pull request as ready for review October 16, 2024 17:34
@ff137 ff137 requested a review from cl0ete October 16, 2024 17:34
@ff137 ff137 changed the title 🚧 Deprecate connections protocol and implement DID Exchange and DID Rotate methods ✨ Implement DID Exchange and DID Rotate methods and πŸ—‘οΈ deprecate connections protocol Oct 16, 2024
Copy link

Coverage

K8s Test Coverage
FileStmtsMissCoverMissing
app
Β  Β main.py78297%117–118
app/routes
Β  Β connections.py983366%348–380, 407–422, 446–459, 490–502, 529–540
Β  Β jsonld.py604722%23–93, 104–137
Β  Β messaging.py241154%43–52, 85–95
Β  Β oob.py462839%58–99, 131–144, 170–181
Β  Β trust_registry.py62297%52–53
Β  Β verifier.py1393376%88–90, 95, 152–154, 159, 231, 239–241, 246, 288–293, 299–301, 362–364, 369, 406–408, 413, 449–451, 505–507
app/routes/wallet
Β  Β credentials.py775232%32–45, 54–66, 75–86, 95–109, 120–136, 148–162, 171–183, 192–203
Β  Β jws.py422736%35–60, 76–99
Β  Β sd_jws.py422736%36–61, 78–101
app/services
Β  Β acapy_ledger.py611280%110–111, 124–140, 196–197
Β  Β acapy_wallet.py40490%60–61, 98–99
Β  Β revocation_registry.py1663579%118–160, 201–205, 360–364, 403–408, 441–445, 473–478, 527–528
app/services/issuer
Β  Β acapy_issuer_v2.py1011288%63, 97–106, 110, 126–127, 173, 227–228, 255
app/services/onboarding
Β  Β tenants.py634922%30–103, 113–143
Β  Β verifier.py37392%67, 83–87
app/services/onboarding/util
Β  Β register_issuer_did.py86397%100–102
Β  Β set_endorser_metadata.py724044%28–30, 50–52, 76–78, 109–128, 140–151, 163–176, 189–203
app/services/trust_registry
Β  Β actors.py107992%95–100, 110, 209–210, 212–217, 282–285
Β  Β schemas.py54983%57–63, 89–99
app/services/trust_registry/util
Β  Β actor.py31294%26–27
Β  Β issuer.py23483%39–40, 48–49
app/tests/e2e
Β  Β conftest.py23578%46–54
Β  Β test_connections.py149299%281–282
Β  Β test_jsonld.py591673%134–169
Β  Β test_proof_request_models.py24196%101
Β  Β test_tenants.py4211596%203, 247–248, 287, 789, 833–834, 843–844, 853–854, 866–867, 876–877
Β  Β test_wallet_credentials.py30197%55
Β  Β test_wallet_dids.py701086%101–116
app/tests/e2e/issuer
Β  Β test_get_records_paginated.py63297%65–66
Β  Β test_save_exchange_record.py72199%166
app/tests/e2e/verifier
Β  Β test_get_records_paginated.py62297%59–60
Β  Β test_many_revocations.py614034%31–107, 117–128, 139–214
Β  Β test_proof_revoked_credential.py441273%127–199
Β  Β test_verifier.py2241295%661–731
app/tests/exception_handling
Β  Β test_handle_model_with_validation.py23196%22
app/tests/fixtures
Β  Β credentials.py1203769%173, 268–348, 361–432
Β  Β definitions.py662661%29–50, 64–65, 94–124, 143–144
Β  Β member_acapy_clients.py36489%47–50, 73–74
Β  Β member_connections.py43881%80–91, 130–141
Β  Β member_wallets.py611575%29–34, 49–54, 69–74, 89–94, 111–118
app/tests/routes/issuer
Β  Β test_create_offer.py39197%145
Β  Β test_send_credential.py36197%125
app/tests/routes/wallet/dids
Β  Β test_get_public_did.py29197%40
app/tests/services
Β  Β test_revocation_registry.py141299%74, 105
app/tests/services/issuer
Β  Β test_issuer.py123298%281–285
app/tests/util
Β  Β connections.py872967%104–129, 138–155, 172–181, 236–256
Β  Β ledger.py501080%35, 43, 55, 63–67, 77, 83
Β  Β regression_testing.py351751%33, 41–68, 74–81
Β  Β sse_listener.py28486%51–56
Β  Β trust_registry.py29390%24, 27–28
Β  Β webhooks.py531572%19, 65–81, 88–90, 95, 119
app/util
Β  Β acapy_verifier_utils.py123596%81–84, 164–168, 245
Β  Β assert_public_did.py18856%17–33
Β  Β credentials.py14286%13, 18
Β  Β retry_method.py361558%20–35, 76–77, 91–103
Β  Β tenants.py451762%24–29, 44–45, 52–59, 90–91, 97, 124
Β  Β transaction_acked.py14286%31–32
endorser
Β  Β main.py37197%55
endorser/services
Β  Β endorsement_processor.py94298%110–111
endorser/tests
Β  Β test_util_endorsement.py144597%286, 291, 350–352
endorser/util
Β  Β endorsement.py68790%134–146
trustregistry
Β  Β main.py82495%46–48, 110
trustregistry/tests
Β  Β test_main.py137199%90
waypoint
Β  Β main.py48198%64
waypoint/tests/routers
Β  Β test_waypoint_sse.py83594%61–62, 119, 136, 171
waypoint/tests/services
Β  Β test_nats_service.py116397%45, 133, 155
TOTAL1217481793%Β 

Tests Skipped Failures Errors Time
803 5 πŸ’€ 0 ❌ 0 πŸ”₯ 3m 6s ⏱️

app/tests/e2e/test_did_rotate.py Dismissed Show dismissed Hide dismissed
Copy link

sonarcloud bot commented Oct 17, 2024

@ff137 ff137 merged commit c78bd72 into development Oct 17, 2024
45 of 46 checks passed
@ff137 ff137 deleted the deprecate-connections-protocol branch October 17, 2024 15:06
ff137 added a commit that referenced this pull request Oct 17, 2024
…ections protocol (#1119)

* πŸ—‘οΈ mark deprecated routes

* 🚧 initial implementation of new did-exchange routes

* 🎨 modify default extra settings example

* πŸ”§ Update default pylint config

* 🎨 update docstrings and available optional params

* 🚧 e2e test under construction

* βœ… fix up create request tests

* πŸ› fix protocol: /1.1 doesn't work ...

* πŸ› use_public_did must be false in accept-request

* βœ… working tests for accept-request

* 🎨 remove unused endpoint and update route names

* 🎨 update route names

* 🎨 accept reject reason sa body instead of param

* ⬆️ Use latest cloudcontroller

* ⬆️ Update lock files

* ✨ implement did-rotate endpoints

* πŸ”§ add max-positional-arguments to pylintrc

* ⬆️ use latest cloudcontroller

* ⬆️ Update lock files

* ✨ Use did-rotate/hangup in deletion of connection record (if using didexchange protocol)

* βœ… Fix deleting records when using oob connections

* βœ… assert connections are complete for both parties

* βœ… e2e tests for did-rotate

* ⬆️ Helmfile `0.169`, Helm `3.16.2`, Tailscale `1.76.0` (#1123)

* πŸ“Œ Pin `xk6` and plugin versions (#1124)

* `xk6-sse` isn't compatible with `k6>=0.53`
* Pin `xk6` and all plugins to the latest compatible versions
* Also bump Golang to `1.23`

* πŸ“Œ Explicitly pin k6 to `v0.52.0` (#1125)

* ⬆️ Update lock files

* 🎨

* βœ… 100% unit test coverage for new did-exchange and did-rotate methods

* βœ… fixed up delete connection test

* πŸ› Reconfigure ACAPY_AUTO_ACCEPT_REQUESTS for Faber after test completes

* βœ… add cleaning up of connection records, for regression fixtures not to get bloated

---------

Co-authored-by: Robbie Blaine <4052340+rblaine95@users.noreply.github.com>
ff137 added a commit that referenced this pull request Oct 17, 2024
* add max attempts env

* 🎨

* must be int

* reset to 15

* add temp debug log

* more temp debug logs

* dont reset nats

* revert reset nats

* remove temp debug logging

* add heartbeat to fetch

* import fetch time out error

* on fetch timeout continue

* on generic timeout re-subscribe

* update imports

* fix test

* add tests for health endpoints

* update health endpoints

* add check jetstream func for health checks

* fix test

* 🎨

* update endorser health endpoint

* ✨ Implement DID Exchange and DID Rotate methods and πŸ—‘οΈ deprecate connections protocol (#1119)

* πŸ—‘οΈ mark deprecated routes

* 🚧 initial implementation of new did-exchange routes

* 🎨 modify default extra settings example

* πŸ”§ Update default pylint config

* 🎨 update docstrings and available optional params

* 🚧 e2e test under construction

* βœ… fix up create request tests

* πŸ› fix protocol: /1.1 doesn't work ...

* πŸ› use_public_did must be false in accept-request

* βœ… working tests for accept-request

* 🎨 remove unused endpoint and update route names

* 🎨 update route names

* 🎨 accept reject reason sa body instead of param

* ⬆️ Use latest cloudcontroller

* ⬆️ Update lock files

* ✨ implement did-rotate endpoints

* πŸ”§ add max-positional-arguments to pylintrc

* ⬆️ use latest cloudcontroller

* ⬆️ Update lock files

* ✨ Use did-rotate/hangup in deletion of connection record (if using didexchange protocol)

* βœ… Fix deleting records when using oob connections

* βœ… assert connections are complete for both parties

* βœ… e2e tests for did-rotate

* ⬆️ Helmfile `0.169`, Helm `3.16.2`, Tailscale `1.76.0` (#1123)

* πŸ“Œ Pin `xk6` and plugin versions (#1124)

* `xk6-sse` isn't compatible with `k6>=0.53`
* Pin `xk6` and all plugins to the latest compatible versions
* Also bump Golang to `1.23`

* πŸ“Œ Explicitly pin k6 to `v0.52.0` (#1125)

* ⬆️ Update lock files

* 🎨

* βœ… 100% unit test coverage for new did-exchange and did-rotate methods

* βœ… fixed up delete connection test

* πŸ› Reconfigure ACAPY_AUTO_ACCEPT_REQUESTS for Faber after test completes

* βœ… add cleaning up of connection records, for regression fixtures not to get bloated

---------

Co-authored-by: Robbie Blaine <4052340+rblaine95@users.noreply.github.com>

* πŸ’© add sleep to avoid mysterious 500 error

---------

Co-authored-by: Mourits de Beer <31511766+ff137@users.noreply.github.com>
Co-authored-by: Robbie Blaine <4052340+rblaine95@users.noreply.github.com>
Co-authored-by: ff137 <ff137@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Implement DidExchange / DidRotate API
3 participants