-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[docs] Add page on Multi-factor Authentication #14572
[docs] Add page on Multi-factor Authentication #14572
Conversation
c96b60c
to
7f83171
Compare
The API can still be used with 2FA by setting the The docs mention this in API Usage. |
Aah yes, I didn't spot that! I guess this still applies for the Git CLI though? |
Yes, currently over HTTP/S you would need an app token (or SSH). |
> It must be kept secure and should only be used as a last resort. | ||
|
||
The Gitea API supports providing the relevant TOTP password in the `X-Gitea-OTP` header, as described in [API Usage](https://docs.gitea.io/en-us/api-usage). | ||
This should be used instead of an access token where possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as api is for automation ... it's more secure to use a token than basic-auth + TOTP!
you only have to make sure to name access token on creation properly and only use it for one thing! (CI, GitNex, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you can precicely add and remove access application level based ...
## MFA Considerations | ||
|
||
Enabling MFA on a user does affect how the Git HTTP protocol can be used with the Git CLI. | ||
This interface does not support MFA, and trying to use a password normally will no longer be possible whilst MFA is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you mean Git CLI doesn't support MFA?
@jamesorlakin Are you still interested in this PR? If so, could you update it, as we recently changed our documentation system? This would involve a new file location and some changes inside frontmatter. |
Some contents are outdated, maybe we need to create a new PR or update this one. |
replaced by #26654 |
copy and modified from #14572 > Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token. I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
copy and modified from go-gitea#14572 > Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token. I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
Backport #26654 by @lunny copy and modified from #14572 > Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token. I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
Whilst debating enforcing MFA within our team, I realised there isn't a lot of context to the side effects of enabling it. Most of us use Git over HTTP and would need to add a token.
I plan to add another PR that adds a sentence to the UI about needing to generate a token when enabling MFA if HTTP is to be used.