-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Cannot disable pre-registered OAuth2 applications #29074
Labels
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Milestone
Comments
lunny
added
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
and removed
type/bug
labels
Feb 7, 2024
-> Fix oauth2 builtin application logic #30304 |
lunny
pushed a commit
that referenced
this issue
Apr 8, 2024
Fix #29074 (allow to disable all builtin apps) and don't make the doctor command remove the builtin apps. By the way, rename refobject and joincond to camel case.
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Apr 8, 2024
Fix go-gitea#29074 (allow to disable all builtin apps) and don't make the doctor command remove the builtin apps. By the way, rename refobject and joincond to camel case.
wxiaoguang
added a commit
that referenced
this issue
Apr 8, 2024
Backport #30304 by wxiaoguang Fix #29074 (allow to disable all builtin apps) and don't make the doctor command remove the builtin apps. By the way, rename refobject and joincond to camel case. Co-authored-by: wxiaoguang <[email protected]>
AvengerMoJo
pushed a commit
to AvengerMoJo/gitea
that referenced
this issue
Apr 8, 2024
Fix go-gitea#29074 (allow to disable all builtin apps) and don't make the doctor command remove the builtin apps. By the way, rename refobject and joincond to camel case.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
In #26291, pre-registered OAuth applications were added to gitea.
In my case, we would like to disable them (or rather OAuth2 capabilities in general), but this does not seem to be possible.
A) If I set
DEFAULT_APPLICATIONS
to an empty value, it will be ignored and both of the pre-configured applications will be enabled. Setting the config value to any other option will raise an error on startup, as there is no pre-configured application with that name. Am I missing something here? Setting this setting to an empty value probably should disable all the pre-configured applications, right?B) In addition, setting
ENABLE = false
in the[oauth2]
section in app.ini has no effect. It's not possible to view OAuth2 applications, but it's still possible to use the pre-defined applications to log-in, e.g. when usinggit-credential-manager
. I'd expect the OAuth2 login endpoint to be completely disabled if the settingENABLE
is set tofalse
, i.e. if this is set tofalse
, logging-in with OAuth2 should be completely disabled, also for the predefined applications.How to reproduce:
For A):
DEFAULT_APPLICATIONS =
in[oauth2]
section inapp.ini
ENABLE = true
in[oauth2]
section inapp.ini
Expected behaviour:
Observed behaviour:
git-credential-manager
as well asgit-credential-oauth
applications are presentFor B):
ENABLE = false
in[oauth2]
section inapp.ini
git-credential-manager
, e.g. by cloning a repo via HTTPSExpected behaviour:
Observed behaviour:
ENABLE
is set totrue
Please let me know if you need any other info. I greatly appreciate the work done here, and I can just block these requests on the reverse proxy, but I still wanted to bring this issue to attention. Have a nice day!
Gitea Version
v1.21.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/Adrian-Hirt/0f1c5a26892018ac90a04f6aa1f5a4c0
Screenshots
No response
Git Version
No response
Operating System
Fedora 37
How are you running Gitea?
I'm running the binary from the download page.
Database
MySQL/MariaDB
The text was updated successfully, but these errors were encountered: