DefGuard / DefGuard/defguard

Design: Disable "Add device" if 2FA for a location is enabled

Open
#554 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2.8k
Forks
115
Avg merge
1d 4h
Merged PRs (30d)
51

Description

**Describe the bug**
The user can still create a manual/vanilla WG config even if 2FA enforced.

This allows to connect without having to use TOTP

**To Reproduce**
Steps to reproduce the behavior:
1. Create a location with required MFA
2. Add some user
3. Add TOTP to the user
4. Add a new device
5. Create a manual WG client
6. User can connect without using TOTP

**Expected behavior**
That users cannot connect without using TOTP -> Do not allow to add vanilla WG configs

**Version information**
- Defguard Core version: v0.9.0
- On any browser

**Screenshots**
image
![image](https://github.com/DefGuard/defguard/assets/28839553/56ce8fcd-6740-47b8-a619-45850482bef9)

**Additional context**
I'm not familiar with React (or ts/js at all), but it _seems_ to me that having some sort of check in: https://github.com/DefGuard/defguard/blob/c6f2d94fe033048c63141d0cbf70663f674c28b0/web/src/pages/addDevice/steps/AddDeviceSetupMethodStep/AddDeviceSetupMethodStep.tsx#L94 to not show the card if MFA is enabled should work.

Maybe a cleaner approach is just to skip to the next step if MFA is required with the "remote desktop activation" already selected for you and skip that step altogether

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.