Skip to content

docs(ocm): trim share creation status codes - #463

Open
MahdiBaghbani wants to merge 2 commits into
developfrom
ocm-spec-share-status-codes
Open

MahdiBaghbani wants to merge 2 commits into
developfrom
ocm-spec-share-status-codes

Conversation

@MahdiBaghbani

Copy link
Copy Markdown
Member

This PR is part of cs3org/OCM-STA#57 and addresses point 7 of @thibmeu's review of draft-08.

  1. Section 7.2 (HTTP status codes). This section presents a lot of status codes without a clear motivation for their scope. For instance, 401 would require WWW-Authenticate [5]. It may be enough to specify only the errors that interoperable clients depend on and leave the rest to ordinary HTTP semantics (which I suspect is most of them).

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.

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
Comment thread IETF-OCM.md Outdated
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread IETF-OCM.md Outdated
Comment on lines +1812 to +1815
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].

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we may well drop the 501 reference as it's "ordinary semantic" maybe, and just keep the new sentence.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, dropped it.

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>

@glpatcern glpatcern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, to me this is good enough!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants