forgejo/modules
Gusted d955ab3ab0
[SECURITY] Rework long-term authentication
- This is a 'front-port' of the already existing patch on v1.21 and
v1.20, but applied on top of what Gitea has done to rework the LTA
mechanism. Forgejo will stick with the reworked mechanism by the Forgejo
Security team for the time being. The removal of legacy code (AES-GCM) has been
left out.
- The current architecture is inherently insecure, because you can
construct the 'secret' cookie value with values that are available in
the database. Thus provides zero protection when a database is
dumped/leaked.
- This patch implements a new architecture that's inspired from: [Paragonie Initiative](https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence#secure-remember-me-cookies).
- Integration testing is added to ensure the new mechanism works.
- Removes a setting, because it's not used anymore.

(cherry picked from commit e3d6622a63)
(cherry picked from commit fef1a6dac5)
(cherry picked from commit b0c5165145)
(cherry picked from commit 7ad51b9f8d)
(cherry picked from commit 64f053f383)
(cherry picked from commit f5e78e4c20)

Conflicts:
	services/auth/auth_token_test.go
	https://codeberg.org/forgejo/forgejo/pulls/2069
(cherry picked from commit f69fc23d4b)
2024-01-08 14:01:19 +01:00
..
actions [CI] Search .forgejo/workflows first 2024-01-08 13:37:01 +01:00
activitypub Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
analyze
assetfs
auth [SECURITY] default to pbkdf2 with 320,000 iterations 2024-01-08 14:01:17 +01:00
avatar
base Refactor some legacy code and remove unused code (#28622) 2023-12-28 09:38:59 +00:00
cache Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
charset Add option to disable ambiguous unicode characters detection (#28454) 2023-12-17 14:38:54 +00:00
container
context [SECURITY] Rework long-term authentication 2024-01-08 14:01:19 +01:00
contexttest Replace assert.Fail with assert.FailNow (#27578) 2023-10-11 11:02:24 +00:00
csv
doctor Add orphaned topic consistency check (#28507) 2023-12-18 15:32:08 +00:00
emoji
eventsource Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
generate
git Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
gitgraph More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
graceful Suggest to use Type=simple for systemd service (#28717) 2024-01-07 15:18:04 +00:00
hcaptcha
highlight Add option to disable ambiguous unicode characters detection (#28454) 2023-12-17 14:38:54 +00:00
hostmatcher Support allowed hosts for webhook to work with proxy (#27655) 2023-10-18 09:44:36 +00:00
html
httpcache
httplib
indexer [CI] disable meilisearch/elasticsearch test, no server yet in CI 2024-01-08 13:37:01 +01:00
issue/template
json
label
lfs Do not set Accept header twice (#28598) 2023-12-28 03:59:00 +00:00
log
markup Make cross-reference issue links work in markdown documents again (#28682) 2024-01-03 14:01:12 +08:00
mcaptcha
metrics Reduce usage of db.DefaultContext (#27073) 2023-09-14 17:09:32 +00:00
migration
nosql
options
packages Close all hashed buffers (#27787) 2023-10-25 21:24:24 +02:00
paginator
pprof
private [CLI] implement forgejo-cli 2024-01-08 13:37:00 +01:00
process Replace assert.Fail with assert.FailNow (#27578) 2023-10-11 11:02:24 +00:00
proxy
proxyprotocol
public Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00
queue [CI] disable redis test, no redis server yet in CI 2024-01-08 13:37:01 +01:00
recaptcha
references Make cross-reference issue links work in markdown documents again (#28682) 2024-01-03 14:01:12 +08:00
regexplru
repository Make offline mode as default to no connect external avatar service by default (#28548) 2023-12-21 07:42:16 +00:00
secret
session Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
setting [GITEA] add GetFile to config provider 2024-01-08 14:01:18 +01:00
sitemap
ssh Remove SSH workaround (#27893) 2023-11-03 15:21:05 +00:00
storage [CI] Forgejo Actions based CI for PR & branches 2024-01-08 13:37:01 +01:00
structs [FEAT] allow setting the update date on issues and comments 2024-01-08 14:01:18 +01:00
svg
sync
system Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
templates Render PyPi long description as document (#28272) 2023-12-05 15:02:01 +00:00
test
testlogger
timeutil Make template DateTime show proper tooltip (#28677) 2024-01-02 20:09:18 +01:00
translation
turnstile
typesniffer
updatechecker Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
upload
uri
user
util [DEADCODE] Add deadcode linter 2024-01-08 14:01:18 +01:00
validation
web Refactor CORS handler (#28587) 2023-12-25 20:13:18 +08:00
webhook