mirror of
1
Fork 0
forgejo/services/auth
Gusted 51988ef52b
[GITEA] rework long-term authentication
- 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-pick from eff097448b)

Conflicts:

	modules/context/context_cookie.go
	trivial context conflicts

	routers/web/web.go
	ctx.GetSiteCookie(setting.CookieRememberName) moved from services/auth/middleware.go
2023-10-05 08:50:54 +02:00
..
source Improve LDAP group config documentation (#21227) (#26921) 2023-09-08 08:10:08 +02:00
auth.go [GITEA] rework long-term authentication 2023-10-05 08:50:54 +02:00
auth_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
basic.go Require repo scope for PATs for private repos and basic authentication (#24362) 2023-04-26 19:24:03 -05:00
group.go Fix the error message when the token is incorrect (#25701) (#25836) 2023-07-12 10:18:27 +00:00
httpsign.go refactor auth interface to return error when verify failure (#22119) 2022-12-28 13:53:28 +08:00
interface.go Improve template system and panic recovery (#24461) 2023-05-04 14:36:34 +08:00
middleware.go [GITEA] rework long-term authentication 2023-10-05 08:50:54 +02:00
oauth2.go Allow get release download files and lfs files with oauth2 token format (#26430) (#27378) 2023-10-03 14:48:40 +02:00
reverseproxy.go Do not send "registration success email" for external auth sources (#24632) 2023-05-10 10:49:47 +00:00
session.go refactor auth interface to return error when verify failure (#22119) 2022-12-28 13:53:28 +08:00
signin.go Modify OAuth login ui and fix display name, iconurl related logic (#25030) (#25161) 2023-06-09 10:59:18 +00:00
source.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
sspi_windows.go Fix SSPI auth panic (#25955) (#25969) 2023-07-24 07:58:56 +02:00
sync.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00