Subject: [core] Should OSCOAP swallow all error conditions

From: Jim Schaad <[email-masked]>
Date: Thu, 16 Feb 2017 15:48:12 -0800

In the process of trying to setup to do some error tests for the OSCOAP
interop event, I have started thinking harder about the amount of times that
the current document is saying that a message should be silently ignored
rather than having a NAK or similar error code being transmitted.  Given the
re-try behavior that has been defined for CoAP, I am wondering if this is
really the behavior that is desired in many cases.  Currently if there is a
problem with how security is setup and the OSCOAP message does not decrypt
for any reason, then the same message will be received multiple times (once
for each retry plus the original) each of which will potentially try and
find the security context and decrypt the message.  A GENERIC security
conditions failed response to the first message would prevent the
re-transmissions from occurring and might be the preferred behavior.  As
part of this I would not want to change the currently defined behavior of
silently swallowing known re-plays (based on the sequence number) as there
might be issues of responses being re-ordered and a NAK message arriving
before a good response.

I think that a generic response of "Cryptographic Failure" which is defined
to have no body (and thus not be usable as an oracle) be defined and
returned in many of the current situations where a message is silently
consumed.

Jim

---

From: Göran Selander <[email-masked]>
Date: Fri, 17 Feb 2017 03:15:35 +0000

I think it is a good proposal to introduce a generic security error. It is
not always “cryptographic failure”, but some generic slogan would be good.
And, as you note, some failures should still be handled without error
response.

I filed an issue.
https://github.com/core-wg/oscoap/issues/59

Göran