dwn-sdk-js
dwn-sdk-js copied to clipboard
Reduce complexity and increase privacy by retooling variable locations/values
To ensure contacts/relationship information is not leaked to unprivileged querying callers, retool the message structure and contextual/ID logic to incorporate the following:
{ // message
PROCESSING: {
nonce: "12345675344578547565332537545587978",
recipients: [Bob],
descriptorCid: "QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnz"
},
AUTHZ: {
author: Alice,
target: Carol // If not present, implied storeAt/target can be Alice
}
}
- Remove target/recipient from
descriptor, to avoid contact leakage. - Move target to AUTHZ
- To enable storage in different destinations without touching the
descriptor. - Computed message/canonical ID remains the same even if AUTHZ is a different JWS.
- To enable storage in different destinations without touching the
- Consider making context/canonical ID the CID of the PROCESSING object.
- Nonce in PROCESSING protects against iterability of the author and the recipient(s) by outside querying parties who are given the
contextId