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

Custom OAuth registers new accounts even if it was prohibited. #20671

Open
KodoGit opened this issue Feb 10, 2021 · 2 comments · May be fixed by #22564
Open

Custom OAuth registers new accounts even if it was prohibited. #20671

KodoGit opened this issue Feb 10, 2021 · 2 comments · May be fixed by #22564

Comments

@KodoGit
Copy link

KodoGit commented Feb 10, 2021

Description:

Custom OAuth (Keycloak) registers new accounts regardless of "Registration with Authentication Services" setting.

Steps to reproduce:

  1. Set up Custom OAuth for Keycloak
  2. Turn off "Registration with Authentication Services" setting in /admin/Accounts
  3. Log in using OAuth with account that does not exists in Rocketchat but is accepted by Keycloak.

Expected behavior:

Login denied.

Actual behavior:

New account is created in Rocketchat with user role "User".

Server Setup Information:

  • Version of Rocket.Chat Server: 3.9.7
  • Operating System: Ubuntu 18
  • Deployment Method: SNAP

Additional context

We map AD groups to RC roles like guest/user/admin. RC imports only members of the specified groups.
Any other account registration in RC is closed.

Keycloak(with Kerberos) OAuth is set to use the same AD to ease login.
But RC allows unauthorized access registering new accounts for AD users that are not members of groups mentioned above.
"Registration with Authentication Services" setting in /admin/Accounts is not respected.
"Default Roles for Authentication Services" setting still can be used as a workaround.

@ankar84
Copy link

ankar84 commented Feb 10, 2021

Duplicate of #15787 which assigned to @pierre-lehnen-rc

@LouisSung
Copy link

Can anyone confirm that whether this issue still exists in 4.3.1?
I haven't set up dev environment for months and hopefully someone could give it a try; otherwise, I'll do it when available

The patch in #22564 became conflicted after some version bumped : (

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 a pull request may close this issue.

3 participants