Repository navigation
docs(ocm): trim share creation status codes - #463
MahdiBaghbani wants to merge 2 commits into
Conversation
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
| a trusted service. | ||
| A 403 response status means the Sender is not authorized to create | ||
| shares. | ||
| A 403 response status means the Receiving Server refuses the request |
There was a problem hiding this comment.
As mentioned in the mailing list, it's fine to refer to the RFC as below, but here I'd keep both 401 and 403, wherever they apply: typically, a POST /ocm/invite-accepted without signature may yield HTTP 401, whereas e.g. a POST /ocm/notifications to 'RESHARE' may yield HTTP 403 to signify that the reshare operation is denied.
My guess is that the implementations out there already have logic to handle HTTP 401 vs 403, and it would be a regression to collapse everything to HTTP 403.
There was a problem hiding this comment.
Fair point, restored 401 for unauthenticated senders and 403 is now just "not authorized". One catch, which was Thibault's original concern: RFC 9110 says a 401 MUST come with a WWW-Authenticate header, and OCM doesn't define a scheme for it. Do we name one, or live with that gap?
| A 501 response status means either the Receiver does not support | ||
| incoming external shares, or the share type or the resource type | ||
| are not supported. | ||
| A 503 response status means that the Receiver is temporary unavailable. | ||
| Other status codes carry their ordinary HTTP semantics [RFC9110]. |
There was a problem hiding this comment.
Here we may well drop the 501 reference as it's "ordinary semantic" maybe, and just keep the new sentence.
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
glpatcern
left a comment
There was a problem hiding this comment.
Thanks, to me this is good enough!
This PR is part of cs3org/OCM-STA#57 and addresses point 7 of @thibmeu's review of draft-08.
Summary
Keep the Share Creation responses senders act on, 201, 400, 403 and 501, and leave other status codes to HTTP semantics.
Authentication failures use 403, since OCM defines no HTTP authentication scheme to challenge with
WWW-Authenticate. Notification responses were already reduced in #430.