[GH-ISSUE #898] Bug: Signups_domains_whitelist does not wrk #642

Closed
opened 2026-03-03 02:01:37 +03:00 by kerem · 8 comments
Owner

Originally created by @Brainscrewer on GitHub (Mar 9, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/898

Subject of the issue

The 'Allow signups only from this list of comma-separated domains'-feature does not work as intended. If you only have added '@company.com' as allowed e-mailadress you can still register with @gmail.com for example.

Your environment

  • Bitwarden_rs version: Version: 1.13.1-161cccca
  • Install method: Docker
  • Clients used:
  • Reverse proxy and version:
  • Version of mysql/postgresql:
  • Other relevant information:

Steps to reproduce

Default configuration.

Expected behaviour

@company.com should only be able to register if configured.

Actual behaviour

Any e-mailaddress can be used to register.

Relevant logs

Originally created by @Brainscrewer on GitHub (Mar 9, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/898 <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unneccessary for your issue, feel free to remove them. Remember to hide/obfuscate personal and confidential information, such as names, global IP/DNS adresses and especially passwords, if neccessary. --> ### Subject of the issue <!-- Describe your issue here.--> The 'Allow signups only from this list of comma-separated domains'-feature does not work as intended. If you only have added '@company.com' as allowed e-mailadress you can still register with @gmail.com for example. ### Your environment <!-- The version number, obtained from the logs or the admin page --> * Bitwarden_rs version: Version: 1.13.1-161cccca <!-- How the server was installed: Docker image / package / built from source --> * Install method: Docker * Clients used: <!-- if applicable --> * Reverse proxy and version: <!-- if applicable --> * Version of mysql/postgresql: <!-- if applicable --> * Other relevant information: ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start bitwarden_rs? --> Default configuration. ### Expected behaviour <!-- Tell us what should happen --> @company.com should only be able to register if configured. ### Actual behaviour <!-- Tell us what happens instead --> Any e-mailaddress can be used to register. ### Relevant logs <!-- Share some logfiles, screenshots or output of relevant programs with us. -->
kerem closed this issue 2026-03-03 02:01:38 +03:00
Author
Owner

@tomuta commented on GitHub (Mar 11, 2020):

I suspect this is a configuration issue. Domain names do not contain an '@' symbol. It is not an email address whitelist. See the examples in the documentation:

github.com/dani-garcia/bitwarden_rs@70f3ab8ec3/.env.template (L113-L115)

Can you share the exact value you're using for SIGNUPS_DOMAINS_WHITELIST?

<!-- gh-comment-id:597404665 --> @tomuta commented on GitHub (Mar 11, 2020): I suspect this is a configuration issue. Domain names do not contain an '@' symbol. It is not an email address whitelist. See the examples in the documentation: https://github.com/dani-garcia/bitwarden_rs/blob/70f3ab8ec3d6ccfd8ec8c71c888459de484d9b43/.env.template#L113-L115 Can you share the exact value you're using for `SIGNUPS_DOMAINS_WHITELIST`?
Author
Owner

@jjlin commented on GitHub (Mar 11, 2020):

@Brainscrewer Take a look at https://github.com/dani-garcia/bitwarden_rs/wiki/Disable-registration-of-new-users.

<!-- gh-comment-id:597405911 --> @jjlin commented on GitHub (Mar 11, 2020): @Brainscrewer Take a look at https://github.com/dani-garcia/bitwarden_rs/wiki/Disable-registration-of-new-users.
Author
Owner

@Brainscrewer commented on GitHub (Mar 11, 2020):

@tomuta @jjlin thanks for your reply. My config looks the following:

SIGNUPS_ALLOWED | false
INVITATIONS_ALLOWED | false
SIGNUPS_DOMAINS_WHITELIST | company.nl

Even with these values set, it's still possible to register an account using a Gmail-account.

<!-- gh-comment-id:597562644 --> @Brainscrewer commented on GitHub (Mar 11, 2020): @tomuta @jjlin thanks for your reply. My config looks the following: SIGNUPS_ALLOWED | false INVITATIONS_ALLOWED | false SIGNUPS_DOMAINS_WHITELIST | company.nl Even with these values set, it's still possible to register an account using a Gmail-account.
Author
Owner

@jjlin commented on GitHub (Mar 11, 2020):

@Brainscrewer Check whether you have a config.json file in your data dir. The values in this file override the values of any corresponding env vars you have set.

<!-- gh-comment-id:597805352 --> @jjlin commented on GitHub (Mar 11, 2020): @Brainscrewer Check whether you have a `config.json` file in your data dir. The values in this file override the values of any corresponding env vars you have set.
Author
Owner

@Brainscrewer commented on GitHub (Mar 12, 2020):

@jjlin Oh wow, thanks for poiting that out! Only after you poiting that out I actually found out that information is posted on the admin-page as well, doh. After changing the values to the correct values on the admin panel everything seems to be working. Closing this issue.

<!-- gh-comment-id:598068668 --> @Brainscrewer commented on GitHub (Mar 12, 2020): @jjlin Oh wow, thanks for poiting that out! Only after you poiting that out I actually found out that information is posted on the admin-page as well, doh. After changing the values to the correct values on the admin panel everything seems to be working. Closing this issue.
Author
Owner

@tbluemel commented on GitHub (Mar 12, 2020):

It feels like this should really be fixed. At a minimum I would expect either warnings or an startup error if bitwarden detects mismatches between config.json and the environment variables. Silently preferring one over the other may have severe security complications, e.g. the administrator thought they fixed a bad setup, but the change didn't actually get applied.

I feel like we either should re-open this bug or create a new one, and add code to check for configuration mismatch and reject running, or at a minimum log a big fat warning.

<!-- gh-comment-id:598275789 --> @tbluemel commented on GitHub (Mar 12, 2020): It feels like this should really be fixed. At a minimum I would expect either warnings or an startup error if bitwarden detects mismatches between config.json and the environment variables. Silently preferring one over the other may have severe security complications, e.g. the administrator *thought* they fixed a bad setup, but the change didn't actually get applied. I feel like we either should re-open this bug or create a new one, and add code to check for configuration mismatch and reject running, or at a minimum log a big fat warning.
Author
Owner

@mqus commented on GitHub (Mar 12, 2020):

I agree and want to add that a similar warning should be at the top of .env.template, too.

<!-- gh-comment-id:598370838 --> @mqus commented on GitHub (Mar 12, 2020): I agree and want to add that a similar warning should be at the top of `.env.template`, too.
Author
Owner

@Brainscrewer commented on GitHub (Mar 12, 2020):

Some additional checking and/or more explicit warnings would be nice, yes.

<!-- gh-comment-id:598424152 --> @Brainscrewer commented on GitHub (Mar 12, 2020): Some additional checking and/or more explicit warnings would be nice, yes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#642
No description provided.