Skip to content

Ensure that SSO users are registered before trying to UI auth them.#990

Merged
clokep merged 4 commits into
developfrom
clokep/cas-localpart-gen
Dec 16, 2020
Merged

Ensure that SSO users are registered before trying to UI auth them.#990
clokep merged 4 commits into
developfrom
clokep/cas-localpart-gen

Conversation

@clokep
Copy link
Copy Markdown
Member

@clokep clokep commented Dec 10, 2020

We have some tests for UI auth + SSO, but they're performed with users who aren't actually logged in via SSO, so the resulting authentication flows don't really make sense.

This modifies the UI auth + SSO tests to log the users in via SSO, not via normal login. (This allows a homeserver to know that they're an SSO user, not user that logs in via a password.)

The diff here is pretty awful, but I pretty much abstracted the "Can login with new user via CAS" to a sub (matrix_login_with_cas) that then gets used in multiple places. It also pulls the cas_login_fixture into the UI auth tests as well and adds a new sub generate_cas_response instead of hard-coding the same XML in many places.

@clokep clokep requested a review from a team December 10, 2020 13:08
@clokep clokep self-assigned this Dec 10, 2020
@clokep
Copy link
Copy Markdown
Member Author

clokep commented Dec 10, 2020

This is necessary for matrix-org/synapse#8856

Copy link
Copy Markdown
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

I think this looks broadly sane?

Comment thread tests/10apidoc/13ui-auth.pl Outdated
Comment thread tests/10apidoc/13ui-auth.pl Outdated
@clokep clokep merged commit 5a63b76 into develop Dec 16, 2020
@clokep clokep deleted the clokep/cas-localpart-gen branch December 16, 2020 14:16
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