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

Clarify guest accounts and auth usage on /register #2055

Merged
merged 2 commits into from
Jun 7, 2019

Conversation

turt2live
Copy link
Member

Fixes #1980
Fixes #1984

@turt2live turt2live added the Matrix 1.0 Spec PRs that need review for 1.0 label May 30, 2019
@turt2live turt2live requested a review from a team May 30, 2019 03:03
api/client-server/registration.yaml Show resolved Hide resolved
@@ -194,6 +198,18 @@ paths:
The homeserver requires additional authentication information.
schema:
"$ref": "definitions/auth_response.yaml"
403:
Copy link
Member

Choose a reason for hiding this comment

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

grim that this is 403, but if it's what synapse does then it's what the spec needs to say. :(

Copy link
Member Author

Choose a reason for hiding this comment

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

sadly, it is what synapse does.

Copy link
Member

Choose a reason for hiding this comment

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

what do you think it should be?

I don't necessarily think that, just because synapse does it, that the spec needs to say so. Any client currently relying on it being a 403 is prone to being broken anyway due to relying on unspecified behaviour, so we have the option of making the spec right and fixing synapse later.

Copy link
Member Author

@turt2live turt2live Jun 7, 2019

Choose a reason for hiding this comment

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

speaking of clients which rely on unspecified behaviour:

           if (e.httpStatus === 403 && e.errcode === "M_UNKNOWN") {
                this.setState({
                    errorText: _t("Registration has been disabled on this homeserver."),
                });
            }

thanks, react-sdk.

I've also spent a fair amount of time re-reading the http spec, and 403 seems like the most correct answer. It doesn't feel right, but a different error code seems more wrong.

@turt2live turt2live requested a review from dbkr June 5, 2019 16:41
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

lgtm, although a server-side person probably ought to take a look too.

@turt2live turt2live requested a review from a team June 6, 2019 15:01
@turt2live
Copy link
Member Author

asking for server-side review

@@ -194,6 +198,18 @@ paths:
The homeserver requires additional authentication information.
schema:
"$ref": "definitions/auth_response.yaml"
403:
Copy link
Member

Choose a reason for hiding this comment

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

what do you think it should be?

I don't necessarily think that, just because synapse does it, that the spec needs to say so. Any client currently relying on it being a 403 is prone to being broken anyway due to relying on unspecified behaviour, so we have the option of making the spec right and fixing synapse later.

@@ -29,7 +29,8 @@ paths:
post:
summary: Register for an account on this homeserver.
description: |-
This API endpoint uses the `User-Interactive Authentication API`_.
This API endpoint uses the `User-Interactive Authentication API`_, except in
Copy link
Member

Choose a reason for hiding this comment

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

I'm not entirely convinced that we should be forbidding UIA for guest registration. Why would we not want to allow servers to present a captcha for guest registration?

Copy link
Member Author

Choose a reason for hiding this comment

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

only that synapse doesn't permit it, and clients expect to be able to get a guest account without login UX (see: riot registering one in the background for the last N years).

Copy link
Member

Choose a reason for hiding this comment

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

I'm still a bit unconvinced, but ok.

@turt2live turt2live merged commit 906d3cd into master Jun 7, 2019
@turt2live turt2live deleted the travis/1.0/registration-clarification branch June 7, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Matrix 1.0 Spec PRs that need review for 1.0
Projects
None yet
3 participants