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

Allows CAS SSO flow to provide user IDs composed of numbers only #17098

Merged
merged 19 commits into from May 14, 2024

Conversation

agrimpard
Copy link
Contributor

@agrimpard agrimpard commented Apr 16, 2024

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

Signed-off-by: Aurélien Grimpard aurelien@grimpard.net

Why : We use CAS and we have user IDs with only numbers so we need a way to let them connect to Synapse with CAS

Allows CAS SSO flow to provide user IDs composed of numbers only which will be prefixed
Allows CAS SSO flow to provide user IDs composed of numbers only which will be prefixed
Allows CAS SSO flow to provide user IDs composed of numbers only which will be prefixed
Allows CAS SSO flow to provide user IDs composed of numbers only which will be prefixed
@agrimpard agrimpard requested a review from a team as a code owner April 16, 2024 15:58
@CLAassistant
Copy link

CLAassistant commented Apr 16, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:00 Active
@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:07 Active
Fix lint + miss c/p
@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:12 Active
Reformate proposed by lint test ...
@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:15 Active
unique def for test
@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:23 Active
Fix useless %
@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:26 Active
reformate proposed by lint test
@github-actions github-actions bot deployed to PR Documentation Preview April 16, 2024 16:30 Active
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

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

wasn't entirely meaning to review right now, but just an early look with a few comments, seems fine overall but I should look a bit more closely

synapse/config/cas.py Outdated Show resolved Hide resolved
docs/usage/configuration/config_documentation.md Outdated Show resolved Hide resolved
tests/handlers/test_cas.py Outdated Show resolved Hide resolved
@reivilibre reivilibre requested a review from a team April 16, 2024 16:47
@clokep
Copy link
Contributor

clokep commented Apr 16, 2024

I think for the other SSO providers we suggest using templates for this!

@agrimpard
Copy link
Contributor Author

I think for the other SSO providers we suggest using templates for this!

Are you thinking about user_mapping_provider ?
It is documented for OIDC but CAS is not inside OIDC and the parameter user_mapping_provider doesn't seems to be related to CAS.
https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#oidc_providers
https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#cas_config

@github-actions github-actions bot deployed to PR Documentation Preview April 18, 2024 09:19 Active
@github-actions github-actions bot deployed to PR Documentation Preview April 18, 2024 09:25 Active
Removed test, need real devops !
@github-actions github-actions bot deployed to PR Documentation Preview April 18, 2024 09:39 Active
Remove test, need real devops !
@github-actions github-actions bot deployed to PR Documentation Preview April 18, 2024 09:41 Active
lower case prefix for uid
@github-actions github-actions bot deployed to PR Documentation Preview April 18, 2024 11:47 Active
@clokep
Copy link
Contributor

clokep commented Apr 18, 2024

I think for the other SSO providers we suggest using templates for this!

Are you thinking about user_mapping_provider ? It is documented for OIDC but CAS is not inside OIDC and the parameter user_mapping_provider doesn't seems to be related to CAS. matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#oidc_providers matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#cas_config

Yes -- I wasn't suggesting it exists, but that there's benefit in doing things the same across the providers. You'll need to ask @reivilibre which way he prefers though!

lower case prefix uid
@github-actions github-actions bot deployed to PR Documentation Preview April 18, 2024 11:50 Active
Copy link
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 we're happy to land this as is

@erikjohnston erikjohnston merged commit 7d82987 into element-hq:develop May 14, 2024
40 checks passed
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.

None yet

5 participants