'ENABLE_BASIC_AUTHENTICATION: false" doesn't block login from browser if a password is set for an OpenID Connect (Entra ID) #13248

Closed
opened 2025-11-02 10:36:11 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @flotpg on GitHub (Jul 5, 2024).

Description

Hi,
I've setup a fresh instance which uses OpenID Connect via Entra ID / Azure Active Directory.
I noticed that a user who logged in via OpenID Connect is still able to set a password under /user/settings/account:
CleanShot 2024-07-05 at 21 50 46@2x

So I tried pushing to the repo using that manually set password which works and I thought it's a good idea to check, If we can disable this.

The only thing I found is this: https://docs.gitea.com/administration/config-cheat-sheet#service-service

[service]
ENABLE_BASIC_AUTHENTICATION: false

It somehow works - I can't git push anymore using that password but it doesn't block login from browser so the user can login using that manually set password which renders all security policies we provide by our IDP useless :)

CleanShot 2024-07-05 at 21 53 24@2x

How can I disable password login completely or better prevent openID users, to change or manually set a password?

Many thanks and best regards, Flo.

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22.04

How are you running Gitea?

binary

Database

MySQL/MariaDB

Originally created by @flotpg on GitHub (Jul 5, 2024). ### Description Hi, I've setup a fresh instance which uses OpenID Connect via Entra ID / Azure Active Directory. I noticed that a user who logged in via OpenID Connect is still able to set a password under /user/settings/account: ![CleanShot 2024-07-05 at 21 50 46@2x](https://github.com/go-gitea/gitea/assets/20798074/0d2ac5e5-e3fd-49c4-9f48-e95617757caa) So I tried pushing to the repo using that manually set password which works and I thought it's a good idea to check, If we can disable this. The only thing I found is this: https://docs.gitea.com/administration/config-cheat-sheet#service-service ``` [service] ENABLE_BASIC_AUTHENTICATION: false ``` It somehow works - I can't git push anymore using that password but it doesn't block login from browser so the user can login using that manually set password which renders all security policies we provide by our IDP useless :) ![CleanShot 2024-07-05 at 21 53 24@2x](https://github.com/go-gitea/gitea/assets/20798074/367e25c9-898d-4605-b15f-c15ae3769631) How can I disable password login completely or better prevent openID users, to change or manually set a password? Many thanks and best regards, Flo. ### Gitea Version 1.22.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Ubuntu 22.04 ### How are you running Gitea? binary ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 10:36:11 -06:00
Author
Owner

@charles7668 commented on GitHub (Jul 6, 2024):

Maybe related to #31535.

@charles7668 commented on GitHub (Jul 6, 2024): Maybe related to #31535.
Author
Owner

@kdumontnu commented on GitHub (Jul 6, 2024):

Maybe related to #31535.

Yes, I believe the PR you linked is intending to solve this issue and a step towards better SSO IDP management

@kdumontnu commented on GitHub (Jul 6, 2024): > Maybe related to #31535. Yes, I believe the PR you linked is intending to solve this issue and a step towards better [SSO IDP management ](https://github.com/go-gitea/gitea/issues/23794)
Author
Owner

@kdumontnu commented on GitHub (Jul 9, 2024):

Closed with https://github.com/go-gitea/gitea/pull/31535

(also potential dupe of https://github.com/go-gitea/gitea/issues/13606)

@kdumontnu commented on GitHub (Jul 9, 2024): Closed with https://github.com/go-gitea/gitea/pull/31535 (also potential dupe of https://github.com/go-gitea/gitea/issues/13606)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13248