Skip to content
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

Refine assertions around 3xx redirect responses #246

Closed
benfrancis opened this issue Jul 14, 2022 · 3 comments
Closed

Refine assertions around 3xx redirect responses #246

benfrancis opened this issue Jul 14, 2022 · 3 comments
Assignees

Comments

@benfrancis
Copy link
Member

PR #194 added an assertion to section 7.2.8.3 Error Responses which disallows 3xx redirect responses by Web Things in order to close issue #151.

Disallowing 3xx responses altogether may conflict with assertions in section 7.1.2 Security Bootstrapping the WoT Discovery specification which defines circumstances under which 302 and 303 responses MUST be used.

I see that an Editor's Note was already added by @mmccool in 93ac9b4 which highlights this potential conflict, but I couldn't fine an issue tracking it, which is why I've filed this one.

Note that there's also an editor's note I previously added about 3xx redirect responses which will also need removing once this is resolved.

@benfrancis
Copy link
Member Author

Note that the assertions in WoT Discovery are in the context of security bootstrapping, which is about getting access to the Thing Description itself, rather than the endpoints described in Forms necessarily.

However, the same conflict could equally apply to any Thing which uses the OAuth2SecurityScheme with the code flow in its Thing Description, which would apply to the operation endpoints used in WoT Profile's protocol bindings.

It's possible there may be other use cases for 3xx responses too, such as the one I described in #194.

@mlagally
Copy link
Contributor

Arch call on July 20th:
Agree to remove the 3xx assertion in the current form, also the edititorial notes.
The discussion in this issue should still review whether the behavior of a consumer of 3xx is unambiguously specified in the HTTP spec.
"300 multiple choices" may need additional clarifications.
Check corresponding section in https://datatracker.ietf.org/doc/html/rfc7231

@benfrancis
Copy link
Member Author

Another valid use case of 3xx responses is redirects which strip a trailing slash from a URL, e.g. from /properties/ to /properties.

benfrancis added a commit to benfrancis/wot-profile that referenced this issue Aug 17, 2022
benfrancis added a commit to benfrancis/wot-profile that referenced this issue Aug 31, 2022
benfrancis added a commit to benfrancis/wot-profile that referenced this issue Aug 31, 2022
mlagally added a commit that referenced this issue Aug 31, 2022
Refine assertions around 3xx redirect responses - closes #246
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

No branches or pull requests

2 participants