RocketChat / RocketChat/Rocket.Chat

Can't login through SAML since updating to 4.1.0 when two factor auth is activated

Open
#23,606 1 comment 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:

When two factor authentication is enabled, I can't login through SAML. When I try to, I get back to the login page of rocket chat

Steps to reproduce:
  1. Enable Two factor authentication (administation -> accounts -> two factor authentication)
  2. log out and go to the login page
  3. click on "SAML" of whatever you labled the button and put in your credentials
Expected behavior:

I'm being redirected back to rocket chat and being asked for the authentication code that I got via mail

Actual behavior:

I'm being redirected back to recket chat's login page without being logged in. I get the mail with the authentication code, though.

Server Setup Information:
  • Version of Rocket.Chat Server: 4.1.0
  • Operating System: Ubuntu Server 18.04
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: wiredTiger (oplog Enabled)
  • NodeJS Version: 12.22.1
  • MongoDB Version: 4.2.17
Client Setup Information

I reproduced the issue on the Android app, Firefox Android, Firefox on Windows and Linux and Vivaldi on Windows and Linux

Additional context

It worked on 4.0.4. Not sure about 4.0.5

Btw. for me the solution is to just disable two factor as it doesn't make sense in the first place. I login via my google account and get the authentication mail to the very same google account. But I guess for people with different setups it could be a problem

To setup SAML i used this tutorial: https://blog.jarrousse.org/setting-up-saml-for-rocker-chat-with-g-suite/

Relevant logs:

No applicable server logs.

Client:

Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDocShell.domWindow] browsing-context.js:391
Unchecked lastError value: Error: Could not establish connection. Receiving end does not exist. 2 background.js:2455
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDocShell.domWindow] browsing-context.js:391

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

No source files or tests are named. First reproduce the SAML login with two-factor authentication on 4.1.0, then compare the flow with 4.0.4 and inspect the authentication redirect and code-verification path. Done means a successful SAML login reaches the two-factor code prompt and completes sign-in.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, docker, mongodb, node.js, typescript, ubuntu
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.