-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StatusForbidden in case of no registered device #88
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Petr Fedchenkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 [email protected]