hyperledger-archives / aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
https://wiki.hyperledger.org/display/ARIES/aries-framework-go
Apache License 2.0
240 stars 160 forks source link

Validate incoming did comm msgs #303

Open fqutishat opened 5 years ago

talwinder50 commented 5 years ago

Possible validations as per the spec : https://github.com/hyperledger/aries-rfcs/tree/master/features/0023-did-exchange.

Exchange Request: unsupported DID method for provided DID Expired Invitation DID Doc Invalid Unsupported key type Unsupported endpoint protocol

Exchange Response: unsupported DID method for provided DID Expired Request DID Doc Invalid Unsupported key type Unsupported endpoint protocol Invalid Signature [issue-345]

@Baha-sk Question to Pack and unpack team . The inviter should check the information presented with the keys used in the wire-level message transmission to ensure they match.

Expires decorater might be related to expires invitation, request https://github.com/hyperledger/aries-rfcs/tree/master/features/0032-message-timing

Exchange Response Specific Validation. May need more grooming to understand.

Upon receipt, the signed attribute will be automatically unpacked and the signature verified. Signature information will be stored as message context, and the connection attribute will be replaced in it's original format before processing continues.

The signature data must be used to verify against the invitation's recipientKeys for continuity.