Commit Graph
7 Commits
Author SHA1 Message Date
6543andGitHub 4ba642d07d Revert "Support SAML authentication (#25165)" (#29358)
This reverts #25165 (5bb8d1924d), as there
was a chance some important reviews got missed.

so after reverting this patch it will be resubmitted for reviewing again

https://github.com/go-gitea/gitea/pull/25165#issuecomment-1960670242

temporary Open #5512 again
2024-02-24 12:18:49 +08:00
+2 5bb8d1924d Support SAML authentication (#25165)
Closes https://github.com/go-gitea/gitea/issues/5512

This PR adds basic SAML support
- Adds SAML 2.0 as an auth source
- Adds SAML configuration documentation
- Adds integration test:
- Use bare-bones SAML IdP to test protocol flow and test account is
linked successfully (only runs on Postgres by default)
- Adds documentation for configuring and running SAML integration test
locally

Future PRs:
- Support group mapping
- Support auto-registration (account linking)

Co-Authored-By: @jackHay22

---------

Co-authored-by: jackHay22 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: KN4CK3R <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-authored-by: morphelinho <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-authored-by: Yarden Shoham <[email protected]>
Co-authored-by: 6543 <[email protected]>
Co-authored-by: silverwind <[email protected]>
2024-02-23 00:08:17 +00:00
7047df36d4 Another round of db.DefaultContext refactor (#27103)
Part of #27065

---------

Co-authored-by: KN4CK3R <[email protected]>
2023-09-25 13:17:37 +00:00
silverwindandGitHub 88f835192d Replace interface{} with any (#25686)
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.

Basically the same [as golang did](https://github.com/golang/go/commit/2580d0e08d5e9f979b943758d3c49877fb2324cb).
2023-07-04 18:36:08 +00:00
e81ccc406b Implement FSFE REUSE for golang files (#21840)
Change all license headers to comply with REUSE specification.

Fix #16132

Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <[email protected]>
2022-11-27 18:20:29 +00:00
wxiaoguangandGitHub 4da1d97810 Refactor HTTP request context (#17979) 2021-12-15 14:59:57 +08:00
0981ec30c3 Add Option to synchronize Admin & Restricted states from OIDC/OAuth2 along with Setting Scopes (#16766)
* Add setting to OAuth handlers to override local 2FA settings

This PR adds a setting to OAuth and OpenID login sources to allow the source to
override local 2FA requirements.

Fix #13939

Signed-off-by: Andrew Thornton <[email protected]>

* Fix regression from #16544

Signed-off-by: Andrew Thornton <[email protected]>

* Add scopes settings

Signed-off-by: Andrew Thornton <[email protected]>

* fix trace logging in auth_openid

Signed-off-by: Andrew Thornton <[email protected]>

* add required claim options

Signed-off-by: Andrew Thornton <[email protected]>

* Move UpdateExternalUser to externalaccount

Signed-off-by: Andrew Thornton <[email protected]>

* Allow OAuth2/OIDC to set Admin/Restricted status

Signed-off-by: Andrew Thornton <[email protected]>

* Allow use of the same group claim name for the prohibit login value

Signed-off-by: Andrew Thornton <[email protected]>

* fixup! Move UpdateExternalUser to externalaccount

* as per wxiaoguang

Signed-off-by: Andrew Thornton <[email protected]>

* add label back in

Signed-off-by: Andrew Thornton <[email protected]>

* adjust localisation

Signed-off-by: Andrew Thornton <[email protected]>

* placate lint

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: 6543 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
2021-12-14 16:37:11 +08:00