RocketChat / RocketChat/Rocket.Chat

Custom OAuth registers new accounts even if it was prohibited.

Open
#20,671 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies /admin/Accounts and the “Registration with Authentication Services” setting, but no source file or test. Start by tracing Custom OAuth account creation for a new Keycloak user and verify how that setting is read. Done means login is denied when registration is disabled, while existing users can still authenticate.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.