1
0
kopia lustrzana https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-15 17:37:22 +01:00
Wykres commitów

257 Commity

Autor SHA1 Wiadomość Data
David Duque
f47cdbaee1 External DNS: Add some margin between dropdown and buttons 2021-02-01 01:29:23 +00:00
David Duque
4829e687ff Merge changes from master 2021-01-31 16:20:15 +00:00
Joshua Tauberer
b1d703a5e7 Disable Backblaze B2 backups until #1899 is resolved 2021-01-31 08:33:56 -05:00
Josh Brown
879467d358 Fix typo in users.html (#1895)
lettters -> letters
fixes #1888
2021-01-05 21:12:01 -05:00
Hilko
8664afa997 Implement Backblaze for Backup (#1812)
* Installing b2sdk for b2 support
* Added Duplicity PPA so the most recent version is used
* Implemented list_target_files for b2
* Implemented b2 in frontend
* removed python2 boto package
2020-11-26 07:13:31 -05:00
David Duque
ef116f13de system-status: Make system status cover the whole page width 2020-11-21 02:41:37 +00:00
David Duque
a35b885fac Replace dead glyphicons (with FontAwesome alternative) 2020-11-21 02:27:52 +00:00
David Duque
4fcde9223e modal: Reorder header positions 2020-11-21 02:02:43 +00:00
Victor
b85b86e6de Add download zonefile button to external DNS page (#1853)
Co-authored-by: Joshua Tauberer <jt@occams.info>
2020-11-16 06:03:41 -05:00
David Duque
a67a57913d Merge upstream v0.51 2020-11-15 18:30:19 +00:00
Joshua Tauberer
6a979f4f52 Add TOTP two-factor authentication to admin panel login (#1814)
* add user interface for managing 2fa

* update user schema with 2fa columns

* implement two factor check during login

* Use pyotp for validating TOTP codes

* also implements resynchronisation support via `pyotp`'s `valid_window option

* Update API route naming, update setup page

* Rename /two-factor-auth/ => /2fa/
* Nest totp routes under /2fa/totp/
* Update ids and methods in panel to allow for different setup types

* Autofocus otp input when logging in, update layout

* Extract TOTPStrategy class to totp.py

* this decouples `TOTP` validation and storage logic from `auth` and moves it to `totp`
* reduce `pyotp.validate#valid_window` from `2` to `1`

* Update OpenApi docs, rename /2fa/ => /mfa/

* Decouple totp from users table by moving to totp_credentials table

* this allows implementation of other mfa schemes in the future (webauthn)
* also makes key management easier and enforces one totp credentials per user on db-level

* Add sqlite migration

* Rename internal validate_two_factor_secret => validate_two_factor_secret

* conn.close() if mru_token update can't .commit()

* Address review feedback, thanks @hija

* Use hmac.compare_digest() to compare mru_token

* Safeguard against empty mru_token column

* hmac.compare_digest() expects arguments of type string, make sure we don't pass None
 * Currently, this cannot happen but we might not want to store `mru_token` during setup

* Do not log failed login attempts for MissingToken errors

* Due to the way that the /login UI works, this persists at least one failed login each time a user logs into the admin panel. This in turn triggers fail2ban at some point.

* Add TOTP secret to user_key hash

thanks @downtownallday
* this invalidates all user_keys after TOTP status is changed for user
* after changing TOTP state, a login is required
* due to the forced login, we can't and don't need to store the code used for setup in `mru_code`

* Typo

* Reorganize the MFA backend methods

* Reorganize MFA front-end and add label column

* Fix handling of bad input when enabling mfa

* Update openAPI docs

* Remove unique key constraint on foreign key user_id in mfa table

* Don't expose mru_token and secret for enabled mfas over HTTP

* Only update mru_token for matched mfa row

* Exclude mru_token in user key hash

* Rename tools/mail.py to management/cli.py

* Add MFA list/disable to the management CLI so admins can restore access if MFA device is lost

Co-authored-by: Joshua Tauberer <jt@occams.info>
2020-10-31 10:27:38 -04:00
Joshua Tauberer
545e7a52e4 Add MFA list/disable to the management CLI so admins can restore access if MFA device is lost 2020-10-31 10:23:43 -04:00
Joshua Tauberer
ac9ecc3bd3 Rename tools/mail.py to management/cli.py 2020-10-29 15:41:54 -04:00
Joshua Tauberer
5509420637 s/Days/Retention Days/ on the backup settings page 2020-10-15 14:11:43 -04:00
Felix Spöttel
4dced10a3f Fix handling of bad input when enabling mfa 2020-09-28 21:06:59 +02:00
Joshua Tauberer
b80f225691 Reorganize MFA front-end and add label column 2020-09-27 08:31:23 -04:00
David Duque
7de99aa690 Merge v0.50 from upstream 2020-09-26 10:21:01 +01:00
Felix Spöttel
7d6427904f Typo 2020-09-12 16:38:44 +02:00
Felix Spöttel
dcb93d071c Add TOTP secret to user_key hash
thanks @downtownallday
* this invalidates all user_keys after TOTP status is changed for user
* after changing TOTP state, a login is required
* due to the forced login, we can't and don't need to store the code used for setup in `mru_code`
2020-09-12 16:34:06 +02:00
Felix Spöttel
ee01eae55e Decouple totp from users table by moving to totp_credentials table
* this allows implementation of other mfa schemes in the future (webauthn)
* also makes key management easier and enforces one totp credentials per user on db-level
2020-09-03 19:07:21 +02:00
Felix Spöttel
89b301afc7 Update OpenApi docs, rename /2fa/ => /mfa/ 2020-09-03 13:54:28 +02:00
Felix Spöttel
6594e19a1f Autofocus otp input when logging in, update layout 2020-09-02 20:30:08 +02:00
Felix Spöttel
8597646a12 Update API route naming, update setup page
* Rename /two-factor-auth/ => /2fa/
* Nest totp routes under /2fa/totp/
* Update ids and methods in panel to allow for different setup types
2020-09-02 19:41:06 +02:00
Felix Spöttel
3c3683429b implement two factor check during login 2020-09-02 17:23:32 +02:00
Felix Spöttel
a7a66929aa add user interface for managing 2fa
* update user schema with 2fa columns
2020-09-02 16:48:23 +02:00
Richard Willis
c50170b816 Update "Remove Alias" modal title (#1800) 2020-07-29 10:01:20 -04:00
David Duque
311e6c63e8 Render the 'Backup now' buttons even if there are already backups 2020-07-21 19:25:48 +01:00
David Duque
515a74ba11 Render the lsb_release at flask init time
Don't change the index.html file at setup time
2020-07-14 11:51:25 +01:00
David Duque
b562e7eefa Hide the 'Create Backup' buttons when backups are turned off 2020-07-11 15:45:50 +01:00
David Duque
af9ef186b3 Add manual backup option 2020-07-10 15:48:37 +01:00
David Duque
e6102eacfb AXFR Transfers (for secondary DNS servers): Allow IPv6 addresses (#1787) 2020-07-08 18:26:47 -04:00
David Duque
199c2c50ba Backups: Fix backup target selector width 2020-07-08 19:32:24 +01:00
David Duque
5d6c23cff9 Finalize php configuration 2020-06-21 15:18:46 +01:00
David Duque
d01069f7f2 Automatically agree to ToS on SSL provision 2020-06-12 09:27:08 +01:00
David Duque
1513655bc4 Make sure that the OS in the admin panel matches the actual system OS 2020-05-17 02:45:35 +01:00
David Duque
ad9979f9c6 Make the Show More link an actual button 2020-04-25 04:26:24 +01:00
David Duque
e75d89113a Test 2020-04-25 04:17:55 +01:00
David Duque
7984d103a4 Test 2020-04-25 04:13:46 +01:00
David Duque
4309a6a875 Swap show-button order 2020-04-25 03:51:38 +01:00
David Duque
d9567c0035 Use proper emojis for status checks 2020-04-24 15:50:01 +01:00
David Duque
858251045d Cleanup 2020-04-17 23:39:52 +01:00
David Duque
430f6dab38 Actual implementation of the Relay setup daemon 2020-04-16 22:16:02 +01:00
David Duque
7ffc889c08 Bump web dependencies (#1)
- Bootstrap: 3.3.7 -> 4.4.1
- - New admin panel style and respective corrections applied.

- JQuery: 2.1.4 -> 3.5.0
2020-04-16 19:52:01 +01:00
David Duque
785280c86b Submission 2020-04-16 17:01:49 +01:00
David Duque
fcf5544fc8 WIP 2020-04-16 14:09:24 +01:00
David Duque
03472788fd WIP 2020-04-16 12:45:55 +01:00
David Duque
7b60c0850c Merge remote-tracking branch 'up/master' 2020-04-15 18:03:50 +01:00
David Duque
68768ed112 Fix attempt 2020-04-15 18:01:33 +01:00
David Duque
21196620b6 Code debug 2020-04-15 15:02:20 +01:00
David Duque
bb26a2d12c Push script zone to the end of the document 2020-04-14 10:08:11 +01:00