Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISABLE_2FA parameter for disabling 2FA added #18481

Closed
wants to merge 1 commit into from

Conversation

pboguslawski
Copy link
Contributor

Gitea does not use 2FA when reverse proxy auth is enabled. 2FA is hardcoded
and cannot be disabled (i.e. when stronger authentication scheme is
implemented on reverse proxy). Leaving unused elements like 2FA in UI should
be avoided to make UI clean and to avoid unnecessarry maintanance
(questions/problems from users).

This mod introduces new DISABLE_2FA parameter in app.ini section
[security]. When disabled (default when parameter is not present) gitea
behaves as without this mod (2FA is available). When enabled, 2FA feature
and its UI elements are not avaiable.

This mod also hides those areas on Settings/Security page that are
disabled in config and hides menu link to Security page if all its areas
are disabled in config.

Related: #13129
Author-Change-Id: IB#1115243

Gitea does not use 2FA when reverse proxy auth is enabled. 2FA is hardcoded
and cannot be disabled (i.e. when stronger authentication scheme is
implemented on reverse proxy). Leaving unused elements like 2FA in UI should
be avoided to make UI clean and to avoid unnecessarry maintanance
(questions/problems from users).

This mod introduces new `DISABLE_2FA` parameter in app.ini section
`[security]`. When disabled (default when parameter is not present) gitea
behaves as without this mod (2FA is available). When enabled, 2FA feature
and its UI elements are not avaiable.

This mod also hides those areas on Settings/Security page that are
disabled in config and hides menu link to Security page if all its areas
are disabled in config.

Related: go-gitea#13129
Author-Change-Id: IB#1115243
@wxiaoguang
Copy link
Contributor

Should Enforce 2FA (#16880) be considered together ....

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 31, 2022
@techknowlogick techknowlogick added this to the 1.17.0 milestone Feb 2, 2022
@stale
Copy link

stale bot commented Apr 19, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions.

@stale stale bot added the issue/stale label Apr 19, 2022
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Jun 4, 2022
@lunny lunny modified the milestones: 1.17.0, 1.18.0 Jun 4, 2022
@lunny lunny modified the milestones: 1.18.0, 1.19.0 Oct 17, 2022
@stale stale bot removed the issue/stale label Oct 17, 2022
@lunny lunny modified the milestones: 1.19.0, 1.20.0 Feb 1, 2023
@wxiaoguang
Copy link
Contributor

I think we need a global design for Gitea's auth system, instead of patching too many "disable" options.

Such design would conflict with Enforce 2FA, which is required by a lot of people.

@wxiaoguang wxiaoguang closed this May 10, 2023
@GiteaBot GiteaBot removed this from the 1.20.0 milestone May 10, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants