Skip to content

feat!: resolve multiple verifiers#381

Merged
fforbeck merged 1 commit intomainfrom
feat/multi-verifiers
Jun 1, 2025
Merged

feat!: resolve multiple verifiers#381
fforbeck merged 1 commit intomainfrom
feat/multi-verifiers

Conversation

@fforbeck
Copy link
Member

@fforbeck fforbeck commented May 29, 2025

Support Multiple Verifiers in DID Resolution

Added support for multiple verifiers in the DID Key resolution process. Previously, the config.resolveDIDKey method would resolve a single verifier, which is fine. However, if we decide to resolve did:key from a did:plc document, we need to resolve all verifiers traversed the returned list to find one that successfully verifies the signature.

Main Changes

  • Modified the verifyAuthorization function in packages/validator/src/lib.js to handle multiple verifiers returned by resolveDIDKey
  • Added support for iterating through multiple verifiers and attempting verification with each one
  • Added new test cases to verify the behavior with multiple verifiers

Related: storacha/project-tracking#463

@fforbeck fforbeck requested a review from alanshaw May 29, 2025 19:14
@fforbeck fforbeck self-assigned this May 29, 2025
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

Needs to be marked as a breaking change for interface and validator.

@fforbeck fforbeck force-pushed the feat/multi-verifiers branch from b4e4ea1 to 6c2b5ba Compare May 30, 2025 17:05
@fforbeck fforbeck requested a review from alanshaw May 30, 2025 17:06
@fforbeck fforbeck marked this pull request as ready for review May 30, 2025 17:06
@fforbeck fforbeck changed the title feat: resolve multiple verifiers feat!: resolve multiple verifiers May 30, 2025
Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +524 to +526
if (verificationResult.error) {
verificationErrResults.push(verificationResult.error)
}
Copy link
Member

Choose a reason for hiding this comment

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

If not ok then it is error...

Suggested change
if (verificationResult.error) {
verificationErrResults.push(verificationResult.error)
}
verificationErrResults.push(verificationResult.error)

Copy link
Member Author

Choose a reason for hiding this comment

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

error is optional in the result type.

@fforbeck fforbeck merged commit 6254993 into main Jun 1, 2025
49 checks passed
@github-actions github-actions bot mentioned this pull request Jun 1, 2025
fforbeck pushed a commit that referenced this pull request Jun 2, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>interface: 11.0.0</summary>

##
[11.0.0](interface-v10.3.0...interface-v11.0.0)
(2025-06-01)


### ⚠ BREAKING CHANGES

* resolve multiple verifiers
([#381](#381))

### Features

* resolve multiple verifiers
([#381](#381))
([6254993](6254993))
</details>

<details><summary>server: 11.0.0</summary>

##
[11.0.0](server-v10.2.0...server-v11.0.0)
(2025-06-01)


### ⚠ BREAKING CHANGES

* resolve multiple verifiers
([#381](#381))

### Features

* resolve multiple verifiers
([#381](#381))
([6254993](6254993))
</details>

<details><summary>validator: 10.0.0</summary>

##
[10.0.0](validator-v9.1.0...validator-v10.0.0)
(2025-06-01)


### ⚠ BREAKING CHANGES

* resolve multiple verifiers
([#381](#381))

### Features

* resolve multiple verifiers
([#381](#381))
([6254993](6254993))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

2 participants