dwn-sdk-js icon indicating copy to clipboard operation
dwn-sdk-js copied to clipboard

Explicit check to ensure only 1 signer

Open bnonni opened this issue 2 years ago • 2 comments

Should we add an explicit check to ensure that there's only 1 signer?

https://github.com/TBD54566975/dwn-sdk-js/blob/fcea84929e12dd3e3ef0e8866b0e592a025786fa/src/interfaces/permissions/handlers/permissions-request.ts#L21-L28

bnonni avatar Jul 22 '22 11:07 bnonni

i can have a look at this with some guidance on how to get started

Cxxshyy avatar Oct 21 '22 13:10 Cxxshyy

The easiest thing to do is to just do a length check against jws.signatures.length, and throw if it's not 1. Bulk of the work is probably just right a test to prove that more than one signature initially was allowed, and no longer allowed.

thehenrytsai avatar Oct 27 '22 16:10 thehenrytsai

https://github.com/TBD54566975/dwn-sdk-js/pull/152

rajakash-dev avatar Nov 13 '22 16:11 rajakash-dev

Already addressed by: https://github.com/TBD54566975/dwn-sdk-js/blob/main/src/core/auth.ts#L45

thehenrytsai avatar Nov 21 '22 23:11 thehenrytsai