-
Notifications
You must be signed in to change notification settings - Fork 726
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
Add option to disable local auth form #2752
Conversation
c3c978c
to
5a4d85c
Compare
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.
Can you please update the man page with the new config option.
Done |
This only checks against if an OAuth provider is configured…what about Edit: Probably out of scope of this PR, but it would be nice if there was a way to clear a password if one had been set in the past, that way only API keys can work. Edit 2: Never run random SQL you find online, but if you're brave, password-clearing isn't too bad: UPDATE users SET password='' WHERE username='theUsernameToClearPasswordFor'; |
I've never used miniflux with Clearing a previously set password is definitely out of scope for this PR. |
There's nothing I can think of off the top of my head (but I am by no means an expert). The only two keys for proxy-based authentication are:
Much like OIDC/OAuth…if you don't have the authentication configured right elsewhere, you're not going to be able to get in anyway. (Or you'll let anyone in if you didn't configure your reverse proxy to require authentication for Miniflux. :-P ) Edit: If you like reading too much, here are some pages that provide some idea on how ForwardAuth/proxy-based auth would be setup: |
I definitely understand how |
This is a good point. At least one external authentication must be configured when I'm also assuming that |
ce8b6c2
to
f1d694f
Compare
f1d694f
to
0481859
Compare
I have expanded the check to allow |
Do you follow the guidelines?
What: This adds a config option to indicate that user auth should only happen via oauth2. Setting
DISABLE_LOCAL_AUTH=1
will remove the username/password form from the login screen, and remove the password change/oauth link/unlink options from the user settings screen. It also makes the login form target refuse to validate credentials, and makes the oauth2 unlink endpoint refuse to unlink, instead redirecting back to the login screen.Why: I'd like my users not to be confused about how to login. The (non-functional) form asking for a username and password is very confusing. My users don't know how the login system works and they shouldn't need to. #2649 discusses some other reasons this may be a desirable configuration. I decided to hide the password change and oauth account unlink settings to prevent users from thinking they changed their oauth password or accidentally breaking their miniflux account by unlinking it.
Other things to note:
DISABLE_LOCAL_AUTH
is enabled and no oauth provider is configured.DISABLE_LOCAL_AUTH
. MaybeDISABLE_PASSWORD_AUTH
or something? I'm also not a huge fan of the double negative, maybe it should be something likeENABLE_PASSWORD_AUTH
with a default value of true.DISABLE_LOCAL_AUTH
hides the UI elements to set/change user password, but does not disable the endpoint/internal logic to do it.