Closed arnabghose997 closed 1 year ago
@Vishwas1
The RPCs were tested on following test cases:
Create DID Tests
FAIL: Alice has a registered DID Document where Alice is the controller. Bob tries to register their DID Document by keeping both Alice and Bob as controllers, and by sending only his signature.
PASS: Alice has a registered DID Document where Alice is the controller. Bob tries to register their DID Document by keeping both Alice and Bob as controllers, and by sending only both Alice's and Bob's signatures.
PASS: Alice has a registered DID Document where Alice is the controller. She tries to create an organization DID, in which Alice is the only controller and it's verification method field is empty.
FAIL: Alice has a registered DID Document where Alice is the controller. Alice tries to register an Org DID Document where Alice is the sole controller, and there are two verification Methods, of type EcdsaSecp256k1RecoveryMethod2020, and Alice is the controller for each one of them. Signature is provided by only one of the VMs.
PASS: Alice has a registered DID Document where Alice is the controller. Alice tries to register an Org DID Document where Alice is the sole controller, and there are two verification Methods, of type EcdsaSecp256k1RecoveryMethod2020, and Alice is the controller for each one of them. Signature is provided by both VMs.
FAIL: Alice creates an Org DID where Alice is the controller, and she adds a verification method of her friend Eve. Only Alice sends the singature.
PASS: Alice creates an Org DID where Alice is the controller, and she adds a verification method of her friend Eve. Both Alice and Eve send their singatures.
Update DID Tests
FAIL: Alice creates an Org DID where alice is the controller, and Bob's VM is added to its VM List only. Bob attempts to update Org DID by sending his signature.
PASS: Alice creates an Org DID where alice is the controller, and Bob's VM is added to its VM List only. Alice attempts to update Org DID by sending her signature.
FAIL: Alice attempts to add George as controller of Org ID. Only George's Signature is sent.
FAIL: Alice attempts to add George as controller of Org ID. Only Alice's Signature is sent.
PASS: Alice attempts to add George as controller of Org ID. Both Alice's and George's Signatures are sent.
PASS: Alice attempts to remove George as controller of Org ID. Only Alice's Signature is sent.
PASS: Addition of George as a controller and simultaneous removal of Alice as a controller. Both alice's and george's signature are passed.
FAIL: Alice has already created two didDocs, each representing a wallet. Now, she creates a DID where she is the controller, and the VMs from two DIDDocs are just added in the VM List. Each of these VMs have different controllers. One of the VMs attempts to update DIDDoc.
PASS: Alice has already created two didDocs, each representing a wallet. Now, she creates a DID where she is the controller, and the VMs from two DIDDocs are just added in the VM List. Each of these VMs have different controllers. Alice attempts to update DIDDoc.
Alice tries to update her DID, be she doesn't bother changing anything in her DID.
PASS: Jenny creates herself a DID with empty Controller list. She then attempts to update the DIDDoc by changing the context field and passes her signature only
Deactivate DID
PASS: Alice creates an Org DID with herself and Bob being the Controller. Alice attempts to deactivate it.
PASS: Mike creates a DID for himself, but the controller list is empty. Mike attempts to deactivate it.
This PR intends to refactor
createDID
,deactivateDID
,updateDID
RPCs. Following are some of the major changes:While Registering a DID Document, signature of every controller and verification methods present in the DID Doc must be verified.
While Updating a DID Document
controller
attribute of DID Document), cannot perform any Update Operations of the DID DocumentWhile Deactivating a DID Document, at least one valid signature from any of the existing controllers or VMs are needed.
Verification method relationship field
authentication
is completely disassociated from Update operations of a DID Document.