identity.rs icon indicating copy to clipboard operation
identity.rs copied to clipboard

[Bug] Resolution of DID Documents fails when the controller's DID method is not "iota"

Open UMR1352 opened this issue 6 months ago • 0 comments

Bug description

When a document stored on the iota network (i.e. an IotaDocument) has its controller property set to a DID with a DID method different that "iota" (e.g. did:key:....), resolution of such DID document fails.

IOTA Identity version

latest

Expected behaviour

Resolution of such a document should not fail, producing a valid IotaDocument. Further operation on the document that expect the document's controller to have a certain DID method should fail instead.

Actual behaviour

The document can't be resolved, failing with DIDSyntaxError as they expect the controller to be a did:iota DID.

This error originates in StateMetadataDocument, a structure used internally upon deserialization of a DID document from a Stardust AliasOutput's state_metadata property. Fixing this should be as simple as parsing the document's controller property into a CoreDID instead of an IotaDID.

UMR1352 avatar Jul 29 '24 13:07 UMR1352