StatusForbidden in case of no registered device#88
StatusForbidden in case of no registered device#88giggsoff wants to merge 1 commit intolf-edge:masterfrom
Conversation
Signed-off-by: Petr Fedchenkov <giggsoff@gmail.com>
deitch
left a comment
There was a problem hiding this comment.
Can you please explain the change in more detail?
The existing behaviour does the following:
- if I cannot connect to the manager OR the device doesn't exist: return an error
- if I can connect AND the device exists: return 200
It looks like this change duplicates some of the code from checkCertAndRecord(), but not all of I, and then maybe does something different if the device does not exist?
Please explain the old logic, the new logic, and why it needs to change.
|
Inside ping section you can find:
|
|
Where in that does its that it must return a 403 instead of a 401 for a The spec says:
It doesn't say I should return a 403, instead of a 401. The text of ping says: "MUST use the Device certificate", i.e. anything else (including an onboard certificate) is invalid and should return a 401. More fundamentally, why do I care? The point of |
According to docs we should check onboard certificate for ping endpoint.
Signed-off-by: Petr Fedchenkov giggsoff@gmail.com