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

Contradictory information on User-Interactive Authentication for the /register endpoint #1980

Closed
joepie91 opened this issue Apr 29, 2019 · 1 comment · Fixed by #2055
Closed
Assignees
Labels
clarification An area where the spec could do with being more explicit client-server Client-Server API

Comments

@joepie91
Copy link

From here:

A request to an endpoint that uses User-Interactive Authentication never succeeds without auth. Homeservers may allow requests that don't require auth by offering a stage with only the m.login.dummy auth type, but they must still give a 401 response to requests with no auth data.

This can essentially be summarized as "any endpoint that supports UIA, must require that it is used in all cases".

However, this says:

This API endpoint uses the User-Interactive Authentication API.
[...]
auth: Additional authentication information for the user-interactive authentication API. Note that this information is not used to define how the registered user should be authenticated, but is instead used to authenticate the register call itself. It should be left empty, or omitted, unless an earlier call returned an response with status code 401.

... which suggests that it is optional for a client to engage in the UIA process, and that the server should be tolerant of that; and indeed, in version r0.0.0 of the specification, UIA is not present.

Both cannot be satisfied at the same time; either the server must strictly produce a 401 and demand UIA, or never produce any UIA-related responses (as the client is not permitted to attempt UIA unless it receives a 401).

Further, since the endpoint address is the same in both r0.4.0 and r0.0.0, a server that wants to support the latter would need to leave out the 401 responses.

Which is the correct thing to do here? Strictly requiring UIA would break clients that do not support it (if any of them still exist), but never requiring it would violate the specification.

@turt2live turt2live added clarification An area where the spec could do with being more explicit client-server Client-Server API labels Apr 29, 2019
@turt2live turt2live self-assigned this May 30, 2019
@turt2live
Copy link
Member

I think it's better to let go of the past: from a quick glance of the client space, it seems like they all support UIA, so might as well make that the standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification An area where the spec could do with being more explicit client-server Client-Server API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants