gitea/models/migrations
wxiaoguang 0148d03f21
Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187)
Fix #880

Design:

1. A global setting `security.TWO_FACTOR_AUTH`.
* To support org-level config, we need to introduce a better "owner
setting" system first (in the future)
2. A user without 2FA can login and may explore, but can NOT read or
write to any repositories via API/web.
3. Keep things as simple as possible.
* This option only aggressively suggest users to enable their 2FA at the
moment, it does NOT guarantee that users must have 2FA before all other
operations, it should be good enough for real world use cases.
* Some details and tests could be improved in the future since this
change only adds a check and seems won't affect too much.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-28 15:31:59 -07:00
..
base Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
fixtures Remove If Exist check on migration for mssql because that syntax required SQL server 2016 (#30894) 2024-05-11 22:16:09 +08:00
v1_6 Enable more revive linter rules (#30608) 2024-04-22 11:48:42 +00:00
v1_7 Rename Sync2 -> Sync (#26479) 2023-08-13 21:17:21 +02:00
v1_8 Rename Sync2 -> Sync (#26479) 2023-08-13 21:17:21 +02:00
v1_9 Enable more revive linter rules (#30608) 2024-04-22 11:48:42 +00:00
v1_10 Rename Sync2 -> Sync (#26479) 2023-08-13 21:17:21 +02:00
v1_11 Enable more revive linter rules (#30608) 2024-04-22 11:48:42 +00:00
v1_12 Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
v1_13 Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
v1_14 Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
v1_15 Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
v1_16 Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
v1_17 Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
v1_18 Fix wrong table name (#30557) 2024-04-23 03:00:57 +00:00
v1_19 Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
v1_20 Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
v1_21 Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
v1_22 Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
v1_23 Explicitly not update indexes when sync database schemas (#34281) 2025-04-26 09:50:45 -07:00
v1_24 Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00
migrations_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
migrations.go Enforce two-factor auth (2FA: TOTP or WebAuthn) (#34187) 2025-04-28 15:31:59 -07:00