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

Validate default homeserver config before loading the app #9496

Merged
merged 10 commits into from
May 10, 2019

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Apr 16, 2019

Reviewer: This is generally best reviewed as the final diff rather than the individual commits. Note that there's a TODO comment in the diff which has the intention of being followed up by a later PR - the PRs for this work item are getting a bit large, so this is being put up for review with a known deficiency.

The TODO comment affects those who happen to use https://riot.im/develop/#/login?hs_url=https://matrix.org instead of the other options. It may also affect people's ability to claim 3pid validations.

See #9290
Fixes #8826

Please review with matrix-org/matrix-react-sdk#2941 (the implementation)


Implements the process described here: #9290 (comment)

The expectation is that later layers (like the react-sdk) will make use of the validated_discovery_config option instead of interpreting the config themselves.

We intentionally block the UI from loading here to avoid races between discovery and the app loading.

Requires matrix-org/matrix-js-sdk#897 Merged.


Blocked on clarification regarding identity server behaviour. Going forward with this as-proposed with the intention of verifying that this is the correct behaviour.

We strive for not having defaults anymore, however the identity server is optional across the stack. Additionally, there is some concern that the federation is torn on whether or not .well-known should include an identity server:

Total servers: 966

Responses by discovery state
----------------------------
STATE               | COUNT | PERCENT
wk_not_found        | 463   | 47.93 %
has_identity_server | 101   | 10.46 %
no_identity_server  | 69    | 7.14 %
error               | 333   | 34.47 %

(sampled from #riot-web, #matrix, and #riot-web-announcements)

@turt2live turt2live requested a review from a team April 16, 2019 16:55
@turt2live
Copy link
Member Author

asking for code review to make sure that the approach is valid. The behaviour may change though

@bwindels bwindels requested review from bwindels and removed request for a team April 18, 2019 07:37
bwindels
bwindels previously approved these changes Apr 18, 2019
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

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

Approach looks good to me! Great improvement to lower confusion.

README.md Show resolved Hide resolved
src/vector/index.js Outdated Show resolved Hide resolved
@turt2live turt2live self-assigned this Apr 18, 2019
@turt2live turt2live removed the request for review from lampholder May 3, 2019 05:15
@turt2live
Copy link
Member Author

Right, I'm moving forward with the identity server behaviour as proposed - if we want to change it, it isn't terribly difficult but needs some thought. This part of the whole stack is also ready for review by someone.

@turt2live turt2live requested a review from a team May 3, 2019 05:20
@turt2live turt2live removed their assignment May 3, 2019
@turt2live turt2live dismissed bwindels’s stale review May 3, 2019 05:21

approving review is for the approach, not the code - dismissing so that github doesn't think this is approved

@turt2live
Copy link
Member Author

The tests are actually fairly sensitive to these changes, so I'm pulling this out of review until I can fix them.

@turt2live turt2live removed the request for review from a team May 3, 2019 06:18
Implements the process described here: #9290 (comment)

The expectation is that later layers (like the react-sdk) will make use of the `validated_discovery_config` option instead of interpreting the config themselves.

We intentionally block the UI from loading here to avoid races between discovery and the app loading.
It's usable as-is, and we can add things to it when we need to (ie: integrations).
Supply a server config to the component and adjust the wait logic to be less of a race. The Login component will noop onPasswordLogin if it is "busy", and it is busy when it requests the login flows.
@turt2live turt2live requested a review from a team May 3, 2019 22:32
@bwindels bwindels requested review from bwindels and removed request for a team May 7, 2019 07:57
Copy link
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

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

lgtm!

@turt2live turt2live self-assigned this May 8, 2019
@turt2live turt2live changed the base branch from develop to travis/feature/wellknown2 May 10, 2019 17:19
@turt2live
Copy link
Member Author

Changing the base to travis/feature/wellknown2 so that this can land with further PRs being reviewed against that branch. Will merge the feature branch to develop when it is safe.

@turt2live turt2live closed this May 10, 2019
@turt2live turt2live reopened this May 10, 2019
@turt2live
Copy link
Member Author

... also I'm going to press the right buttons

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