aries-protocol-test-suite icon indicating copy to clipboard operation
aries-protocol-test-suite copied to clipboard

need tests for DID Exchange / Connection Protocol

Open dhh1128 opened this issue 5 years ago • 5 comments

All of the following tests are needed.

  • An overly long invitation is rejected since it can't be turned into a QR code?
  • Agent can be either inviter or invitee.
  • A public DID can be used as an implicit invitation.
  • A connection resp that is not signed by the key used in the invitation generates a graceful error.
  • A connection resp sent before a connection req generates a graceful error.
  • A connection resp or connection req that uses a different thread from the previous message generates a graceful error.
  • A connection resp or req that uses the same thread as previous, but an inconsistent state (e.g., different DID Doc or endpoint) is rejected.
  • DID Docs with extra fields are handled.
  • DID Docs lacking required fields are rejected.
  • DID Docs lacking public keys of type {Ed25519|Secp256k1|RSA} are either handled fully, or generate a graceful error.
  • A plaintext version of a connection request or connection response is gracefully rejected.

dhh1128 avatar Sep 11 '19 17:09 dhh1128

Progress:

  • [ ] An overly long invitation is rejected since it can't be turned into a QR code?
  • [x] Agent can be either inviter or invitee.
  • [ ] A public DID can be used as an implicit invitation.
  • [ ] A connection resp that is not signed by the key used in the invitation generates a graceful error.
  • [ ] A connection resp sent before a connection req generates a graceful error.
  • [ ] A connection resp or connection req that uses a different thread from the previous message generates a graceful error.
  • [ ] A connection resp or req that uses the same thread as previous, but an inconsistent state (e.g., different DID Doc or endpoint) is rejected.
  • [ ] DID Docs with extra fields are handled.
  • [ ] DID Docs lacking required fields are rejected.
  • [ ] DID Docs lacking public keys of type {Ed25519|Secp256k1|RSA} are either handled fully, or generate a graceful error.
  • [ ] A plaintext version of a connection request or connection response is gracefully rejected.

dbluhm avatar Nov 19 '19 00:11 dbluhm

A plaintext version of a connection request or connection response is gracefully rejected.

What would we consider a graceful rejection in this context? A 400?

dbluhm avatar Nov 19 '19 02:11 dbluhm

The condition that's triggering a graceful rejection is that the message trust context doesn't confer enough trust to proceed. I would expect a graceful rejection to be a problem report explaining that.

dhh1128 avatar Nov 19 '19 12:11 dhh1128

Given that there are no keys to figure out which connection sent the message, would we expect this message to be returned in plaintext to the active http connection?

dbluhm avatar Nov 19 '19 12:11 dbluhm

Actually, now that you point out that detail, I would be content with a 400

dhh1128 avatar Nov 20 '19 04:11 dhh1128