Expected behavior: We should be able to create a DID document which has a single external controller responsible for managing the DID document (updating, etc.) but not responsible for authentication operation.
Actual behavior: Getting error DID authentication is not valid: authentication does not match signatures: signature from key did:cheqd:testnet:...#key-x is missing.
Source of error:
|
externalControllersDocuments.concat(didDocument).flatMap((d) => (d ? normalizeAuthentication(d) : [])) |
(and the corresponding code in
esm)
In the line above, the external controller DID document is appended with the current DID document for counting the authentication key ids while validating signatures. This is wrong for a very specific case where:
Only the external controller will "sign" the did registration. But the new entity will "authenticate" itself in the future.
Below I am attaching the payload for cheqd which works with the CLI cheqd-noded but not with the SDK. As shown in the file, only the signature of the controller should be sufficient without needing another signature.
payload-for-creation.json
This issue seems to be very closely related to #473
Expected behavior: We should be able to create a DID document which has a single external controller responsible for managing the DID document (updating, etc.) but not responsible for authentication operation.
Actual behavior: Getting error
DID authentication is not valid: authentication does not match signatures: signature from key did:cheqd:testnet:...#key-x is missing.Source of error:
sdk/cjs/src/modules/did.ts
Line 1294 in d583cd7
(and the corresponding code in
esm)In the line above, the external controller DID document is appended with the current DID document for counting the authentication key ids while validating signatures. This is wrong for a very specific case where:
Only the external controller will "sign" the did registration. But the new entity will "authenticate" itself in the future.
Below I am attaching the payload for cheqd which works with the CLI cheqd-noded but not with the SDK. As shown in the file, only the signature of the controller should be sufficient without needing another signature.
payload-for-creation.json
This issue seems to be very closely related to #473