8000 feat: manage mediator access lists via Trust Tasks by maindotdev · Pull Request #268 · affinidi/affinidi-tdk-dart · GitHub
[go: up one dir, main page]

Skip to content

feat: manage mediator access lists via Trust Tasks - #268

Merged
maindotdev merged 6 commits into
mainfrom
feat/mediator-trust-tasks
Oct 19, 2026
Merged

maindotdev merged 6 commits into
mainfrom
feat/mediator-trust-tasks

Conversation

@maindotdev
Copy link
Copy Markdown
Contributor

Affinidi mediators 0.31 and later no longer support the mediator/1.0/acl-management protocol and reject it with 501 Not Implemented. This breaks the Atlas client at startup and the setup of the mediator client, VDSP and VDIP integration tests. Access lists are now managed with Trust Tasks (AccessListUpdateTask sent with sendTrustTask), which didcomm 2.4.0 adds.

Changes

  • build(deps): raise didcomm to ^2.4.0 in affinidi_tdk_didcomm_mediator_client.
  • feat: deprecate sendAclManagementMessage, AclManagementMessage and AccessListAddMessage, pointing to DidcommMediatorClient.sendTrustTask.
  • test: TestConfig.configureAcl now uses AccessListUpdateTask, so the integration test setup works against current mediators.
  • docs: the README and acl_example.dart use Trust Tasks.
    • Mediators 0.25 and later answer every delivery refusal with the same e.p.delivery.refused report, so the example accepts that report.
    • A comment notes that the example can no longer tell an access-list denial from other refusals.
  • fix: the Atlas client's configureAcl now sends AccessListUpdateTask instead of the acl-management message.

Compatibility

  • Not a breaking change for the published packages. The deprecated APIs remain and still work against older mediators.
  • The access-list calls now require a mediator that supports Trust Tasks: the Atlas client (unpublished) and the integration tests. I chose this deliberately instead of adding a fallback.
    • The Atlas mediator is run by Affinidi and comes from Atlas's own DID document, so users aren't affected.
    • CI and the examples need to point to a current mediator.

Dependencies / before merging

  • didcomm 2.4.0 with Trust Tasks is published (affinidi/affinidi-didcomm-dart#).
  • The hosted Atlas mediator and the mediators CI uses support Trust Tasks.

TrustTaskMessage, AccessListUpdateTask and MediatorClient.sendTrustTask
first ship in didcomm 2.4.0; with ^2.3.4 the mediator client, atlas
client and integration tests fail to resolve them.
Affinidi mediators 0.31 and later removed the mediator/1.0/acl-management
protocol and answer it with 501. Point callers to the Trust Tasks sent via
DidcommMediatorClient.sendTrustTask, since this package hides
MediatorClient from its exports.
The acl-management message used by configureAcl is rejected by mediators
0.31 and later, failing the mediator client, VDSP and VDIP integration
test setup.
Show AccessListUpdateTask with sendTrustTask instead of the deprecated
acl-management message. Mediators 0.25 and later answer every refusal
with the same delivery.refused problem report, so the example accepts it
and notes that it cannot single out access-list denials.
Atlas client init sends the acl-management message, which mediators 0.31
and later reject with 501, so initialisation fails against them.
@maindotdev
maindotdev requested a review from a team as a code owner October 12, 2026 07:22
CI's TEST_MEDIATOR_DID still points to a pre-0.31 mediator that does not
support Trust Tasks. TEST_TRUST_TASKS_MEDIATOR_DID lets CI target a newer
mediator temporarily without breaking branches that still use it.
@github-actions
Copy link
Copy Markdown

Coverage after merging feat/mediator-trust-tasks into main will be

69.21%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib/src/exceptions
   consent_storage_exception.dart100%100%100%100%
   vault_restore_exception.dart100%100%100%100%
lib/storages
   flutter_secure_vault_store.dart100%100%100%100%
   flutter_secure_consent_storage.dart86.11%100%100%86.11%122, 124–128, 131, 137, 154, 63
packages/auth_provider/lib/src
   auth_provider.dart24%100%100%24%100–102, 108, 112–113, 116–117, 120–121, 123–126, 129, 132–133, 136–137, 50, 63–64, 68–69, 71, 73, 81–84, 87, 90–91, 93–96, 99
   iam_client.dart0%100%100%0%16–19, 22–23, 26, 28–29, 32, 8–9
   jwt_helper.dart94.59%100%100%94.59%174, 187, 62, 66
packages/claim_verifiable_credential/lib/src
   oid4vci_claim_verifiable_credential.dart100%100%100%100%
packages/claim_verifiable_credential/lib/src/api_service
   oid4vci_claim_verifiable_credential_api_service.dart64.52%100%100%64.52%117–118, 46–47, 51, 55–56, 58–60, 63
packages/claim_verifiable_credential/lib/src/dto
   claim_verifiable_credential_error_response.dart100%100%100%100%
   error_response.dart82.35%100%100%82.35%52, 66–67
packages/claim_verifiable_credential/lib/src/exceptions
   tdk_exception_type.dart75%100%100%75%102
packages/claim_verifiable_credential/lib/src/extensions
   dio_exception_extension.dart100%100%100%100%
   tdk_exception_extension.dart89.13%100%100%89.13%100–102, 58–59
packages/claim_verifiable_credential/lib/src/models
   oid4vci_claim_context.dart100%100%100%100%
   oid4vci_credential_offer.dart78.95%100%100%78.95%86–87, 90, 92
   oid4vci_issuer_metadata.dart68.75%100%100%68.75%62–63, 66, 68, 77
packages/cryptography/lib/src
   cryptography_service.dart36.59%100%100%36.59%114, 116, 121, 123, 137, 141, 146, 148, 153, 155, 160, 162, 180, 182, 189, 191, 198, 200, 207, 209, 236, 242, 49, 53, 74, 78
packages/cryptography/lib/src/cryptography
   base_cryptography_service.dart45.28%100%100%45.28%121, 168, 170–171, 174, 176–177, 218, 223–224, 226, 228, 231, 234, 236–237, 240, 242–243, 246, 248–249, 252, 257, 260, 263–264, 266, 273, 279, 287–289, 294–295, 297, 300, 304–305, 308, 374, 377–378, 381–382, 385–386, 390, 393, 398–399, 401, 405–408, 410, 418, 421, 423, 426, 428–429, 432, 441, 444, 447, 45, 451, 454, 459–460, 462, 465, 469, 47, 470, 473, 478, 486–487, 489, 493–494, 496, 51, 53
packages/cryptography/lib/src/models
   verify_jwt_result.dart100%100%100%100%
packages/didcomm/vdip/lib/src
   vdip_holder.dart75%100%100%75%162, 202–203, 222, 226, 229, 23, 232–234, 239, 242, 247, 249–250, 252, 255–256, 258, 261, 263, 28, 30, 92
   vdip_issuer.dart86.92%100%100%86.92%104, 118, 277, 285, 29, 300, 35, 38, 52, 58, 90–91, 97–98
packages/didcomm/vdip/lib/src/messages/issued_credential
   vdip_issued_credential_body.dart43.75%100%100%43.75%33, 37–38, 46, 50–51, 72, 76–77
   vdip_issued_credential_body.g.dart100%100%100%100%
   vdip_issued_credential_message.dart100%100%100%100%
packages/didcomm/vdip/lib/src/messages/request_issuance
   credential_meta.dart0%100%100%0%24, 27–28, 31
   credential_meta.g.dart0%100%100%0%10–15, 17–18, 21–27, 9
   vdip_request_issuance_body.dart100%100%100%100%
   vdip_request_issuance_body.g.dart88.89%100%100%88.89%27–28, 46
   vdip_request_issuance_message.dart100%100%100%100%
packages/didcomm/vdip/lib/src/messages/switch_context
   vdip_switch_context_message.dart90.91%100%100%90.91%30
   vdip_switch_context_message.g.dart100%100%100%100%
packages/didcomm/vdip/lib/src/models
   assertion_validation_result.dart100%100%100%100%
   request_credentials_options.dart100%100%100%100%
   token_validation_result.dart100%100%100%100%
packages/vault/lib/src
   digital_credential.dart100%100%100%100%
   in_memory_vault_store.dart100%100%100%100%
   item_permission.dart24.39%100%100%24.39%100–104, 108, 110, 40, 43, 54–58, 70, 77–82, 85, 88–95, 98
   item_permissions_policy.dart64.71%100%100%64.71%20, 26, 29, 69, 85–86, 90–91, 95–98
   passphrase_policy.dart100%100%100%100%
   profile.dart100%100%100%100%
   vault.dart87.79%100%100%87.79%144–146, 185–186, 279–281, 314, 317, 338, 344–345, 360–362, 365–366, 377, 383–384, 386, 388, 391, 393, 395, 398–399, 401–403, 647
   vault_storage_usage.dart20%100%100%20%10–11, 14–15
   backup.dart94%100%100%94%145, 156, 162, 172, 188, 201
   backup_data.dart100%100%100%100%
   profile_repository_handle.dart100%100%100%100%
   vault_restore_plan.dart92.75%100%100%92.75%161, 61, 75, 80–81
packages/vault/lib/src/dto
   shared_item_dto.dart100%100%100%100%
   shared_profile_dto.dart100%100%100%100%
packages/vault/lib/src/exceptions
   passphrase_policy_exception.dart100%100%100%100%
   vault_backup_exception.dart80%100%100%80%22, 24
   vault_restore_exception.dart93.75%100%100%93.75%42, 46
   vault_exception.dart80%100%100%80%27–28, 30, 53, 55
packages/vault/lib/src/extensions
   set_extensions.dart100%100%100%100%
packages/vault/lib/src/helpers
   file_utils.dart0%100%100%0%102–104, 25, 28–29, 32, 38, 4, 43–44, 46–47, 49, 5, 53, 57–58, 62–63, 67–68, 72, 74–76,

1 similar comment
@github-actions
Copy link
Copy Markdown

Coverage after merging feat/mediator-trust-tasks into main will be

69.21%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib/src/exceptions
   consent_storage_exception.dart100%100%100%100%
   vault_restore_exception.dart100%100%100%100%
lib/storages
   flutter_secure_vault_store.dart100%100%100%100%
   flutter_secure_consent_storage.dart86.11%100%100%86.11%122, 124–128, 131, 137, 154, 63
packages/auth_provider/lib/src
   auth_provider.dart24%100%100%24%100–102, 108, 112–113, 116–117, 120–121, 123–126, 129, 132–133, 136–137, 50, 63–64, 68–69, 71, 73, 81–84, 87, 90–91, 93–96, 99
   iam_client.dart0%100%100%0%16–19, 22–23, 26, 28–29, 32, 8–9
   jwt_helper.dart94.59%100%100%94.59%174, 187, 62, 66
packages/claim_verifiable_credential/lib/src
   oid4vci_claim_verifiable_credential.dart100%100%100%100%
packages/claim_verifiable_credential/lib/src/api_service
   oid4vci_claim_verifiable_credential_api_service.dart64.52%100%100%64.52%117–118, 46–47, 51, 55–56, 58–60, 63
packages/claim_verifiable_credential/lib/src/dto
   claim_verifiable_credential_error_response.dart100%100%100%100%
   error_response.dart82.35%100%100%82.35%52, 66–67
packages/claim_verifiable_credential/lib/src/exceptions
   tdk_exception_type.dart75%100%100%75%102
packages/claim_verifiable_credential/lib/src/extensions
   dio_exception_extension.dart100%100%100%100%
   tdk_exception_extension.dart89.13%100%100%89.13%100–102, 58–59
packages/claim_verifiable_credential/lib/src/models
   oid4vci_claim_context.dart100%100%100%100%
   oid4vci_credential_offer.dart78.95%100%100%78.95%86–87, 90, 92
   oid4vci_issuer_metadata.dart68.75%100%100%68.75%62–63, 66, 68, 77
packages/cryptography/lib/src
   cryptography_service.dart36.59%100%100%36.59%114, 116, 121, 123, 137, 141, 146, 148, 153, 155, 160, 162, 180, 182, 189, < 10BC8 a href="https://github.com/affinidi/affinidi-tdk-dart/blob/3e65fbedb7b82f196adbd90f53326932db272615/packages/cryptography/lib/src/cryptography_service.dart#L191">191, 198, 200, 207, 209, 236, 242, 49, 53, 74, 78
packages/cryptography/lib/src/cryptography
   base_cryptography_service.dart45.28%100%100%45.28%121, 168, 170–171, 174, 176–177, 218, 223–224, 226, 228, 231, 234, 236–237, 240, 242–243, 246, 248–249, 252, 257, 260, 263–264, 266, 273, 279, 287–289, 294–295, 297, 300, 304–305, 308, 374, 377–378, 381–382, 385–386, 390, 393, 398–399, 401, 405–408, 410, 418, 421, 423, 426, 428–429, 432, 441, 444, 447, 45, 451, 454, 459–460, 462, 465, 469, 47, 470, 473, 478, 486–487, 489, 493–494, 496, 51, 53
packages/cryptography/lib/src/models
   verify_jwt_result.dart100%100%100%100%
packages/didcomm/vdip/lib/src
   vdip_holder.dart75%100%100%75%162, 202–203, 222, 226, 229, 23, 232–234, 239, 242, 247, 249–250, 252, 255–256, 258, 261, 263, 28, 30, 92
   vdip_issuer.dart86.92%100%100%86.92%104, 118, 277, 285, 29, 300, 35, 38, 52, 58, 90–91, 97–98
packages/didcomm/vdip/lib/src/messages/issued_credential
   vdip_issued_credential_body.dart43.75%100%100%43.75%33, 37–38, 46, 50–51, 72, 76–77
   vdip_issued_credential_body.g.dart100%100%100%100%
   vdip_issued_credential_message.dart100%100%100%100%
packages/didcomm/vdip/lib/src/messages/request_issuance
   credential_meta.dart0%100%100%0%24, 27–28, 31
   credential_meta.g.dart0%100%100%0%10–15, 17–18, 21–27, 9
   vdip_request_issuance_body.dart100%100%100%100%
   vdip_request_issuance_body.g.dart88.89%100%100%88.89%27–28, 46
   vdip_request_issuance_message.dart100%100%100%100%
packages/didcomm/vdip/lib/src/messages/switch_context
   vdip_switch_context_message.dart90.91%100%100%90.91%30
   vdip_switch_context_message.g.dart100%100%100%100%
packages/didcomm/vdip/lib/src/models
   assertion_validation_result.dart100%100%100%100%
   request_credentials_options.dart100%100%100%100%
   token_validation_result.dart100%100%100%100%
packages/vault/lib/src
   digital_credential.dart100%100%100%100%
   in_memory_vault_store.dart100%100%100%100%
   item_permission.dart24.39%100%100%24.39%100–104, 108, 110, 40, 43, 54–58, 70, 77–82, 85, 88–95, 98
   item_permissions_policy.dart64.71%100%100%64.71%20, 26, 29, 69, 85–86, 90–91, 95–98
   passphrase_policy.dart100%100%100%100%
   profile.dart100%100%100%100%
   vault.dart87.79%100%100%87.79%144–146, 185–186, 279–281, 314, 317, 338, 344–345, 360–362, 365–366, 377, 383–384, 386, 388, 391, 393, 395, 398–399, 401–403, 647
   vault_storage_usage.dart20%100%100%20%10–11, 14–15
   backup.dart94%100%100%94%145, 156, 162, 172, 188, 201
   backup_data.dart100%100%100%100%
   profile_repository_handle.dart100%100%100%100%
   vault_restore_plan.dart92.75%100%100%92.75%161, 61, 75, 80–81
packages/vault/lib/src/dto
   shared_item_dto.dart100%100%100%100%
   shared_profile_dto.dart100%100%100%100%
packages/vault/lib/src/exceptions
   passphrase_policy_exception.dart100%100%100%100%
   vault_backup_exception.dart80%100%100%80%22, 24
   vault_restore_exception.dart93.75%100%100%93.75%42, 46
   vault_exception.dart80%100%100%80%27–28, 30, 53, 55
packages/vault/lib/src/extensions
   set_extensions.dart100%100%100%100%
packages/vault/lib/src/helpers
   file_utils.dart0%100%100%0%102–104, 25, 28–29, 32, 38, 4, 43–44, 46–47, 49, 5, 53, 57–58, 62–63, 67–68, 72, 74–76,

@affinidi-appsecurity-bot
Copy link
Copy Markdown

🛡️ AI Agentic Security Code Review

1 finding needs a human to review/validate.

Mandatory to check: 🔒 Security Code Review Report — Security tab ↗

📊 Summary & findings
✅ Confirmed ⚠️ Must-Review-By-Human
0 1

Finding details (titles, evidence + remediation) are in the 🔒 Security tab ↗ — visible to maintainers / code owners only.

@maindotdev
maindotdev merged commit 6338715 into main Oct 19, 2026
7 of 14 checks passed
@maindotdev
maindotdev deleted the feat/mediator-trust-tasks branch October 19, 2026 07:01
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

0