Metabase SSO on Open Source: Sign-in Before the Login Page
Published on December 1, 2026   •   12 min read

Metabase SSO on Open Source: Sign-in Before the Login Page

Jarek CeborskiJarek Ceborski

Metabase Open Source signs people in with Google or LDAP. SAML, OIDC and JWT sign-in come with the Pro and Enterprise plans, as Metabase's authentication overview↗ lists them. Open Source can't turn off password login or put two-factor on it, and its login page and API answer anyone who finds the hostname. To keep Metabase to your team, put company sign-in in front of the whole hostname. Metabase keeps its own login behind it, Google Sign-in can make that second login a click, and strangers never reach Metabase's login page.

Which sign-in methods does Metabase Open Source include?

Google Sign-in and LDAP. Metabase's docs list them under "SSO for Metabase Open Source and Starter plans" and the rest under Pro and Enterprise. For Metabase 65, as of December 1, 2026:

Sign-in featureOpen SourcePro and Enterprise
Google Sign-in↗, one domainYesYes
Google Sign-in, several domainsNoYes
LDAP↗YesYes, plus a group membership filter and attribute sync
SAML↗NoYes
OIDC↗NoYes
JWT↗NoYes
Turn off password login (MB_ENABLE_PASSWORD_LOGIN↗)NoYes
Two-factor↗ for password and LDAP loginsNoYes

Google Sign-in decides how people log in to Metabase. Who gets an account is either everyone in one Google Workspace domain, who can then sign up on their own, or the people an admin adds one by one (Google Sign-in↗). Teams that want the sign-up without the whole domain have asked for it on the Metabase forum↗. Either way, password login stays on, and none of these settings keeps a stranger away from the login page.

What does a stranger see with nothing in front?

Metabase's login page, and part of its API. On a test server with nothing in front, Metabase answered /api/session/properties to a call with no session, and the answer named its exact version. This call ran next to Metabase, inside its container, where Metabase listened on port 3336:

Text
$ curl -s http://127.0.0.1:3336/api/session/properties | jq '{version: .version.tag, "site-url": ."site-url", "has-user-setup": ."has-user-setup", "enable-password-login": ."enable-password-login", "google-auth-enabled": ."google-auth-enabled", "ldap-enabled": ."ldap-enabled"}'
{
  "version": "v0.65.7",
  "site-url": "https://e2e-app.example.com",
  "has-user-setup": true,
  "enable-password-login": true,
  "google-auth-enabled": false,
  "ldap-enabled": false
}

An API that answers before sign-in also puts its flaws within a stranger's reach. On July 20, 2023, Metabase asked everyone self-hosting version 43 or later to upgrade at once, because "an unauthenticated attacker can run arbitrary commands with the same privileges as the Metabase server" (Metabase's advisory↗). Upgrading fixed that flaw, and upgrades stay your job with or without anything in front. A sign-in gate in front means requests from people who aren't signed in never reach Metabase at all.

What does a stranger see with company sign-in in front?

LocalCan Access puts Google, Microsoft, GitHub or your own OIDC sign-in, such as Keycloak, in front of a web app on your own server. With it in front, LocalCan answers every request from someone not signed in before Metabase sees it.

I ran Metabase 0.65.7↗, the latest Open Source release, behind Access on a test setup on December 1, 2026, which is why the hostname is e2e-app.example.com and the commands carry -k (the test setup has its own certificate). Each call also carried --connect-to to reach the test server, left out below. The output is trimmed to the headers that matter, and the location header is left out because it names the test setup's sign-in host. The commands and numbers come from my own runs.

A stranger's browser opening Metabase's login page gets a redirect to LocalCan's sign-in instead:

Text
$ curl -sk -o /dev/null -D - -H 'Accept: text/html' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Dest: document' https://e2e-app.example.com/auth/login
HTTP/2 303 
cache-control: no-store
server: LocalCan
x-robots-tag: noindex, nofollow

The settings call from above, made through the hostname, gets a 401 from LocalCan:

Text
$ curl -sk -i https://e2e-app.example.com/api/session/properties
HTTP/2 401 
content-type: application/json
server: LocalCan
www-authenticate: LocalCan-Access
x-localcan-auth: login

{"error":"authentication_required","login":"/.localcan/access/login"}

So does a script guessing a password. LocalCan answers it, and Metabase never sees the attempt:

Text
$ curl -sk -i -X POST -H 'content-type: application/json' -d '{"username":"owner@example.com","password":"guess"}' https://e2e-app.example.com/api/session
HTTP/2 401 
content-type: application/json
server: LocalCan
www-authenticate: LocalCan-Access
x-localcan-auth: login

{"error":"authentication_required","login":"/.localcan/access/login"}

A Metabase I run in production behind Access looks the same from outside: its hostname is a CNAME to its own .cname.localcan.dev target, and a browser that opens it gets a redirect to LocalCan's sign-in. Its Access app offers Google only, and with one sign-in method LocalCan sends people straight to it (sign-in methods):

Google's Sign in page reading Sign in to continue to LocalCan Access, with an empty Email or phone field, where a stranger lands after opening a Metabase behind LocalCan Access
Where a stranger lands after opening my production Metabase behind Access, which has Google as its only sign-in method.

Does Metabase work behind a sign-in proxy?

In the test run, yes. Each of these went through Access:

  • Metabase's own setup created its admin account and session.
  • A SQL question on the Sample Database ran, counted 18,760 orders and saved, and Metabase made a public link for it.
  • No response was a 5xx, no redirect dropped https, no LocalCan error page appeared, and Metabase's pages opened no WebSocket.
A saved Metabase question named Orders on the Sample Database showing 18,760, opened through LocalCan Access
A saved question in Metabase 0.65.7, opened through Access.

The run's browser was let in with a service token instead of a Google sign-in, so the run covers Metabase's traffic through Access and leaves out the sign-in itself, which the Grafana post's sign-in walkthrough shows.

One setting and one limit matter behind Access:

  • MB_SITE_URL, the address people open. Metabase uses it for "links in emails, auth redirects, and in some embedding scenarios" (environment variables↗). In the run it was https://e2e-app.example.com, and Metabase reported that address back as its site-url, as the output above shows.
  • The request header limit. Every request from a signed-in person carries a signed identity header of at most 4 KB, even to an app that ignores it. Metabase accepts 8,192 bytes of request headers by default (MB_JETTY_REQUEST_HEADER_SIZE↗), which leaves about half for cookies and other headers. This one comes from the docs, not the run: requests with a service token carry no identity header.

They ask for sign-in too. The Metabase OSS preset makes no path public, so everything on the hostname needs a signed-in person or a service token (public paths). In the test run, a stranger opening the question's public link got the same redirect as the login page:

Text
$ curl -sk -o /dev/null -D - -H 'Accept: text/html' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Dest: document' https://e2e-app.example.com/public/question/41272250-1e41-46e2-82d0-ad0b9c293ddf
HTTP/2 303 
cache-control: no-store
server: LocalCan
x-robots-tag: noindex, nofollow

People outside your team can still open a shared link. Add each person's email address as a rule, and they sign in with their own Google, Microsoft or GitHub account, whichever of those the app offers (rules). A dashboard meant for anyone on the internet, such as one embedded in your public website, has no one to sign in, so it belongs on a Metabase outside this setup.

What does LocalCan see of Metabase's traffic?

LocalCan's servers end HTTPS for the hostname, since they hold its certificate. They see each request in plaintext, pass it on to the connector, and stream Metabase's response back without keeping it.

For requests to Metabase's address they log one line per request, with the method, host, path, the names of query parameters but not their values, the status, the duration and the visitor's IP address. A sign-in, a sign-out, a refused request or a service-token call adds a line with the outcome, the host and the IP address, plus the token's ID for a service-token call (never its secret). They never log other headers, cookies, user agents or any part of a body, so query results and the passwords people type into Metabase stay out of LocalCan's logs (what LocalCan can see). Separately, your team's access log lists each sign-in with the time, person, app and IP address, and keeps it 90 days (access log).

What happens if LocalCan can't be reached?

LocalCan is in the path of every request. If LocalCan's sign-in service can't be reached, people already signed in keep their session for up to 60 minutes after its last successful check, and new sign-ins wait until it is back (how fast a change takes effect). Metabase is reachable through the hostname only while LocalCan is, and it keeps running on your server the whole time.

How do you put company sign-in in front of Metabase?

Access is in Preview and priced per app, not per person: Starter is $29 a month for 3 apps, every tier includes unlimited viewers under fair use, and Access pricing lists the other tiers. You can set up 3 apps before you pay. The steps follow the quick start, which also lists what to have first: Access on your team and an owner or admin account with two-factor sign-in.

1. Add the app. In the dashboard, open LocalCan Access → Apps, select Add app and choose the Metabase OSS preset. It fills in no public paths and the upstream http://metabase:3000, which works when the connector shares Metabase's Docker network (metabase is the service name in Metabase's own Compose example). Enter the hostname people will open, such as metabase.example.com. For a first app, choose New connector on this server. Creating the app shows the connector key once, so copy it before you close the dialog.

The Add app form of the LocalCan dashboard with the Metabase OSS preset chosen, its note that Metabase keeps its own login and needs MB_SITE_URL set, the upstream http://metabase:3000 and no public paths
The Metabase OSS preset fills in the upstream and leaves public paths empty.

2. Tell Metabase its address. Set MB_SITE_URL on Metabase's service in your Compose file, as in the test run:

YAML
services:
  metabase:
    environment:
      MB_SITE_URL: https://metabase.example.com

3. Run the connector next to Metabase. The connector runs on Linux, with Docker, Docker Compose or systemd. Save the key in a file that the connector's user owns:

Bash
sudo install -d -m 0755 /etc/localcan
sudo install -m 0400 -o 65532 -g 65532 /dev/stdin /etc/localcan/connector.key
# paste the key, press Enter, then Ctrl-D

Then add the connector to the Compose file that runs Metabase:

YAML
services:
  localcan-connector:
    image: ghcr.io/localcan/connector:1
    restart: unless-stopped
    environment:
      LOCALCAN_CONNECTOR_KEY_FILE: /run/secrets/connector_key
    secrets:
      - connector_key
    volumes:
      - localcan-connector:/data

secrets:
  connector_key:
    file: /etc/localcan/connector.key

volumes:
  localcan-connector:

Metabase's own Docker Compose example↗ puts Metabase on a named network, metanet1, and a service with no networks: key joins the project's default network instead, where the name metabase doesn't resolve. If your Metabase service lists a network, give the connector the same one, as the quick start's Docker Compose steps also say:

YAML
services:
  localcan-connector:
    networks:
      - metanet1

Remove Metabase's published port, the 3000:3000 entry under ports: in that example, and close any other way in, such as a reverse proxy that still answers for another name, so the hostname is the only path to Metabase.

4. Point the hostname at LocalCan. The app's Domain section shows a CNAME target that ends in .cname.localcan.dev. Add a CNAME record from your hostname to it at your DNS provider. LocalCan gets the certificate from Let's Encrypt once the record resolves and the connector is connected.

5. Choose who may sign in. A new app lets nobody in. Add a rule under Who may sign in: your company's Google Workspace domain, a Microsoft tenant, exact email addresses, or a group from your own OIDC provider, such as Keycloak. Sign-in methods and rules lists what each method can check.

6. Open the address. LocalCan sends you to your sign-in method and back, and then Metabase shows its own login page. The first time someone signs in to the app with Google, Microsoft or GitHub, a LocalCan page shows them what the team will see and asks them to continue.

Do people sign in twice?

Yes, though for a Google Workspace team Metabase's own Google Sign-in can make the second one a click. Grafana and apps that check the identity header sign people in from it, as in Grafana sign-in with a company account, but Metabase keeps its own login behind LocalCan Access. People sign in to LocalCan first, with their work account, and to Metabase second:

Metabase's own Sign in to Metabase page with Email address and Password fields, shown after LocalCan Access let the person through
Metabase's own login page, which only people your rules allow ever reach.

Open Source has three ways to handle the second step:

  • Google Sign-in, for a Google Workspace team. Existing users signed in to a matching Google account sign in "with just a click" (Google Sign-in↗), and the Domain field lets people from your domain create their own account. Behind Access, only the people your rules allow, such as a list of exact addresses, ever see that button, so the domain-wide sign-up reaches only them.
  • LDAP, when your accounts live in a directory.
  • Passwords. Only people your rules allow can reach the login page, so a stranger never gets to try one.

n8n behind company sign-in and Open WebUI behind company sign-in work the same way: their own login stays, and Access decides who gets to see it. On Metabase Pro or Enterprise, Metabase's own SAML or OIDC sign-in, set up with the identity provider your Access app uses, such as Google Workspace, Microsoft Entra ID or Okta, makes both steps use the same work account.

How do scripts and MCP clients reach Metabase behind Access?

With a service token. Metabase's API takes an API key in the X-API-Key header (API keys↗), and Open Source includes API keys. Behind Access, a script also sends a service token, which travels in two headers of its own, LC-Access-Client-Id and LC-Access-Client-Secret. LocalCan removes both before the request reaches Metabase, and the API key passes through. A script with no token gets the 401 shown above, and a wrong, revoked or expired token gets a 401 with the code LC2004.

Metabase's MCP server, which every Metabase plan includes, signs clients in with Metabase's own OAuth (MCP server↗). Clients that send custom headers only on MCP requests need Metabase's OAuth paths public, and public paths for MCP servers lists them. Keep /api/ itself behind sign-in, or all of Metabase's API is back within a stranger's reach. With Claude Code and Codex, a service token alone works, and no path has to be public.

More posts