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

option to disable email login, either globally or per user #3136

Closed
snarfed opened this issue Aug 5, 2016 · 15 comments
Closed

option to disable email login, either globally or per user #3136

snarfed opened this issue Aug 5, 2016 · 15 comments
Labels
Administration/Auth Google Auth, LDAP, pw+email login Type:New Feature

Comments

@snarfed
Copy link

snarfed commented Aug 5, 2016

mostly applies to instances with existing users that then turn on google SSO. originally mentioned here.

thanks in advance! we're already loving google SSO.

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

@23ranjan
Copy link

23ranjan commented Nov 15, 2017

Any idea when this is going to be released ?

@drewB
Copy link

drewB commented Mar 20, 2018

I am a big fan of this request. It kind of defeats the purpose of using google for MFA if you can still sign in with a simple username and password.

@jwhitcraft
Copy link

This is huge for security, is there any update on this?

@flamber
Copy link
Contributor

flamber commented Jun 11, 2019

You can block requests to /api/session, since that's where regular logins are handled, whereas Google SSO is done via /api/session/google_auth - any negative side effects, I don't know.
On Nginx you would add the following before location / { ... } - I have not tested this, so you might need to adjust/test yourself:

location = /api/session {
  limit_except DELETE {
    return 404;
    break;
  }
}

@jwhitcraft
Copy link

@flamber thanks for posting the workaround, in AWS land I just added a rule to the load balancer to 404 that path and it worked great.

@kikocastro
Copy link

Hi guys,

Do you know how can @flamber 's solution can be achieved on a heroku running metabase instance?

@salsakran
Copy link
Contributor

This is part of our enterprise Auth offering. Closing since this gets into "a million knobs" territory on the OSS side

@Zhann
Copy link

Zhann commented Sep 1, 2020

You can block requests to /api/session, since that's where regular logins are handled, whereas Google SSO is done via /api/session/google_auth - any negative side effects, I don't know.

as for side effects, we tried this, and it gave us warnings that we didn't have sufficient permissions, viewing the main page.

@jonathanrhodes
Copy link

You can block requests to /api/session, since that's where regular logins are handled, whereas Google SSO is done via /api/session/google_auth - any negative side effects, I don't know.

Tried this today and it did effectively block password login...but if you block the whole path then it also seems to block logout, which appears to be implemented as DELETE /api/session.

@tamvm
Copy link

tamvm commented Jan 18, 2022

For ones who don't use with nginx, we can create firewall rule on Cloudflare and block exact url /api/session

@YouveGotMeowxy
Copy link

You can block requests to /api/session, since that's where regular logins are handled, whereas Google SSO is done via /api/session/google_auth - any negative side effects, I don't know. On Nginx you would add the following before location / { ... } - I have not tested this, so you might need to adjust/test yourself:

location = /api/session {
  limit_except DELETE {
    return 404;
    break;
  }
}

I get this error when trying that block:

nginx: [emerg] "return" directive is not allowed here in /config/nginx/proxy-confs/dashboard.subdomain.conf:20

I'm trying to use Authelia for my credential handling and would like to disable the native login handling; has anyone figured out how to do this yet?

@meyerovb
Copy link

Why is this closed? The workaround isn't a stable or acceptable solution.

@paoliniluis
Copy link
Contributor

@meyerovb this is a feature in the product (global feature)

@fedeisas
Copy link

fedeisas commented Aug 2, 2023

You can block requests to /api/session, since that's where regular logins are handled, whereas Google SSO is done via /api/session/google_auth - any negative side effects, I don't know. On Nginx you would add the following before location / { ... } - I have not tested this, so you might need to adjust/test yourself:

location = /api/session {
  limit_except DELETE {
    return 404;
    break;
  }
}

I get this error when trying that block:

nginx: [emerg] "return" directive is not allowed here in /config/nginx/proxy-confs/dashboard.subdomain.conf:20

I'm trying to use Authelia for my credential handling and would like to disable the native login handling; has anyone figured out how to do this yet?

I'm using:

  location = /api/session {
    if ($request_method != 'DELETE') {
      add_header Content-Type application/json always;
      return 401 '{"errors":{"password":"Password authentication is disabled."}}';
    }
    
    proxy_pass ....
 }

@meyerovb
Copy link

meyerovb commented Aug 2, 2023

I'm trying to use Authelia for my credential handling and would like to disable the native login handling; has anyone figured out how to do this yet?

thx for the recommendation on url blocking. To use a non google oauth provider on free metabase set up google cloud identity with passthrough oauth to your provider. I made it work with azure accounts just fine. U probably need a domain and a single paid google account but that’s it. U get 50 free cloud identities but can just ask for more. They upped me to 1k, but we also pay a lot for google translate so there’s that…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Administration/Auth Google Auth, LDAP, pw+email login Type:New Feature
Projects
None yet
Development

No branches or pull requests