Metabase session timeout and password policy

Metabase session timeouts and password rules are set through environment variables on your self-hosted instance. This page explains which controls fit your access policy, how they interact, and what to confirm before you rely on them.

On this page

Why Metabase session timeout and password policy matter for your access policy

A self-hosted Metabase exposes settings for session age, inactivity timeout and password complexity, and the right combination depends on how people sign in. If your access policy sets limits on how long a session may last, how long an idle session may stay open, or how strong a password must be, you need to know which of those controls apply to your edition and which ones are replaced by your identity provider. Start by confirming your identity model, because that decision determines whether the password settings in this topic govern your users at all.

The open source edition supports local email and password accounts, and the password complexity setting for those accounts is the lever you control directly. The MB_PASSWORD_COMPLEXITY setting offers weak, normal, strong-enough (15 characters, the default) and strong levels, and Metabase blocks common passwords unless complexity is set to weak. Google sign-in and LDAP are available on the open source and Starter plans, while SAML, OIDC and JWT require Pro or Enterprise according to the Metabase pricing page. Confirm which plan you run before you promise an auditor that a control is enforced here.

Where SSO is in place, your identity provider usually owns password rules, lockout and most session behavior, so the Metabase settings become a second layer rather than the primary control. Map each requirement in your access policy to the system that enforces it, then check whether Metabase's session limits still need configuring for the parts the provider does not cover. Ask your identity team to document where password and session policy live, and test that a disabled account loses Metabase access within the window your policy requires.

Session and password settings and when each fits

This table compares the three session and password controls Metabase exposes, plus the choice between password logins and SSO-only sign-in. Read each row as a policy requirement, then check the trade-off column against how often your users sign in and how much support load your team can absorb.

Setting or choiceIntent and policy it maps toTrade-off to weigh
MAX_SESSION_AGECaps the total lifetime of a session regardless of activity, which maps to a maximum re-authentication interval in an access policy.Users re-enter credentials on a fixed schedule even while actively working, so expect more sign-in prompts and questions.
MB_SESSION_TIMEOUTEnds a session after a period of inactivity, which maps to idle-timeout requirements for shared or unattended workstations.Analysts who step away during long queries may be signed out and lose unsaved work, so confirm the timeout length with the analyst teams.
Using both session settings togetherWhen both are set, a session ends at whichever limit is reached first, so the stricter rule applies without extra configuration.Two limits are harder to explain to users and to test, so document both values and verify the sign-out behavior after changes.
MB_PASSWORD_COMPLEXITY set to weakAccepts simple passwords and does not block common passwords, which fits only where another control covers credential strength.Weak rules rarely satisfy a documented password policy, so most regulated reviews will expect a stronger setting.
MB_PASSWORD_COMPLEXITY set to normal or strong-enoughStrong-enough requires 15 characters and is the default, which is a common baseline for a password length requirement.Length rules increase password reset requests, so confirm the setting with your help desk and your written policy.
MB_PASSWORD_COMPLEXITY set to strongThe strictest option offered, suited to policies that require stronger composition rules than the default.Users may find passwords harder to create and remember, which raises reset volume; confirm the exact rules in Metabase's password documentation.
Password logins versus SSO-only sign-inCentralizes authentication, MFA and session control in your identity provider, which fits policies that require one place to enforce access.SSO depends on a working identity provider, and SSO features beyond the open source edition require a paid Metabase plan, so confirm plan fit before you disable passwords.

How to configure session and password settings in Metabase

This sequence confirms your plan and sign-in method, sets session and inactivity limits, applies a password complexity level, and then proves the settings work with sign-in and expiry tests. The result is a Metabase instance whose session and password behavior you can show matches your access policy.

  1. Confirm plan and sign-in method first

    Before changing anything, confirm which Metabase edition and plan you run and how users sign in. Password logins are the only method this configuration governs directly, so if users sign in through Google Sign-In, LDAP, or an SSO provider, record that now. SSO itself requires a Pro or Enterprise plan, and the pricing page lists it only on those plans. Ask your Metabase administrator or vendor to confirm whether your plan includes SSO, and decide whether password logins must be disabled for your policy. Done means you have a written note of edition, plan, and each sign-in method in use.

  2. Set session age and inactivity limits

    Set the session age limit with the MAX_SESSION_AGE environment variable and the inactivity limit with MB_SESSION_TIMEOUT, then restart Metabase so the values load. Your access policy determines the numbers, so take them from the policy owner rather than defaults. Check the session expiration documentation for the units and accepted formats for each variable in your version. Done means the running instance reports the values you set, and the configuration is stored in your deployment manifest or environment file rather than only in a shell session.

  3. Choose the password complexity level

    Set MB_PASSWORD_COMPLEXITY to one of the supported levels: weak, normal, strong-enough, or strong. The default is strong-enough, which requires 15 characters. Match the level to your written password standard, and confirm with your security team whether a stricter level is needed for administrator accounts. Record the chosen value alongside the session settings. Done means the variable is in the same configuration source as the session settings and the restart has applied it.

  4. Verify common passwords are blocked

    Metabase blocks common passwords unless complexity is set to weak. Create a test user in a non-production instance, or use a test account, and attempt to set a password from a widely used list at the level you chose. Then attempt a password that meets the length rule but is not common. Expect the first attempt to be rejected and the second to succeed. If a common password is accepted at a level other than weak, stop and check the running version and configuration before going further. Done means you have recorded both attempts and their results.

  5. Test sign-in and inactivity expiry

    Sign in with a test account, then leave the browser idle for longer than the inactivity limit you configured. Refresh the page or open a new Metabase action and confirm you are asked to sign in again. Log the time of sign-in and the time the session ended. Repeat with a session that stays active, using periodic activity, to confirm the inactivity timer resets as expected. Done means you have timestamps showing the session ended after the configured inactivity period.

  6. Test session age limit and which limit applies

    When both MAX_SESSION_AGE and MB_SESSION_TIMEOUT are set, a session ends at whichever limit is reached first. To test this, keep a session active with regular activity so the inactivity timer never expires, then confirm the session still ends when the session age limit is reached. Record which limit ended each session. Use illustrative values in a test environment if production limits are too long for a practical test. Done means you can show, with recorded timestamps, that the session ended at the earlier of the two limits.

  7. Confirm password logins are disabled if required

    If your access policy requires SSO only, confirm that password sign-in is turned off for users in your identity provider setup and that a test account cannot sign in with a password. Attempt a password sign-in with a non-administrator test account and record the result. Confirm with your Metabase administrator how administrator accounts are handled so a lockout does not occur. Done means the sign-in attempt is refused and the procedure for recovering administrator access is written down and tested.

  8. Document the evidence for your access review

    Save the final configuration values, the test results with timestamps, and the sign-in attempt records in your change record. Include the Metabase version, the plan, and the person who approved each setting. Your auditors or internal reviewers will ask how each setting maps to your access policy, so keep the mapping alongside the evidence. Done means a reviewer can trace each policy requirement to a configured value and a recorded test.

How the session limits interact when both are set

When both MAX_SESSION_AGE and MB_SESSION_TIMEOUT are set, a Metabase session ends at whichever limit is reached first. The two settings answer different policy questions, so the combination is usually the right design for a regulated organization. MAX_SESSION_AGE caps how long a session can exist from the moment it started, regardless of activity. MB_SESSION_TIMEOUT ends a session after a period without activity. Setting only one of them leaves a gap: an idle timeout alone lets an active session run indefinitely, and an absolute age alone can log out someone in the middle of a dashboard review. Setting both means an engaged user is still re-authenticated on a fixed schedule, and an unattended browser is closed sooner.

The practical effect is that the shorter applicable limit governs each session, and the policy owner should decide which one that will be in practice. Before choosing values, write down the intended behavior for three cases: a user who stops working for a while, a user who keeps the page open all day, and a user who signs out of the identity provider but still has a Metabase tab open. Then test those cases on a non-production instance after the change, because the behavior depends on how your identity provider and reverse proxy handle their own sessions. Confirm the exact units and accepted values for each setting in the session expiration documentation rather than assuming them.

For users, the experience is a sign-in prompt when a limit is hit, with no warning that a different limit would have applied. An inactivity logout feels like a normal timeout. An age-based logout can happen during active work, which generates support requests and sometimes lost unsaved questions. Tell users in advance which behavior to expect, and ask the platform team to report how often each limit triggers during the first weeks. Those counts show whether the values match the policy or whether they are interrupting legitimate analysis.

Security and operational considerations for password policy

Password rules and session limits only protect a Metabase instance when they match how people actually sign in and who can change them. The cards below cover the trade-offs that come after the settings are chosen: common password checks, the role of SSO, upgrade reviews, admin control, shared machines and keeping the policy auditable.

Common password blocking

Metabase blocks common passwords unless MB_PASSWORD_COMPLEXITY is set to weak. Choosing weak to make a rule easier to satisfy also removes that protection, so the setting is a security decision, not a convenience. Confirm which level your policy requires and test a known common password against a non-production instance before rollout.

Default strong-enough length
15 characters
Password docs

Password logins alongside SSO

If your identity provider already enforces MFA, lockout and password rotation, a separate Metabase password becomes a second credential to manage and a second place for attackers to try. Decide whether password login stays enabled for break-glass use, who holds that access, and how it is monitored. Plan this together with your SSO configuration rather than afterward.

Review settings after each upgrade

Upgrades run application database migrations automatically, and a new release may change defaults or the behavior of settings you depend on. Add a step to every upgrade change record that re-reads the session and password settings in the admin console and tests a login, a timeout and a password change. Record the release you tested against.

Control who changes instance settings

Session length, password rules and login methods are instance-wide settings that only administrators can change. Limit the admin group to a small named set of people, require a separate account for administrative work, and review membership on a fixed schedule. Anyone who can edit these settings can weaken the whole policy in one change.

Session limits on shared machines

A session that lasts a long time is convenient on a personal laptop but risky on shared kiosks, reception desks or jump hosts. When MAX_SESSION_AGE and MB_SESSION_TIMEOUT are both set, the session ends at whichever limit is reached first, so a short inactivity timeout protects shared machines even if the absolute limit is generous. Give administrator accounts the shortest sessions, since they reach the most data and settings.

Session docs

Keep the policy as configuration

Set session and password values through environment variables in your deployment definition, not only through clicks in the admin console. Stored in version control, each change has an author, a review and a history that an auditor can read. Compare the running instance against that file during reviews, because a setting changed in the console can drift from what was approved.

How a Metabase session is checked against both limits

The check starts when a user signs in and a session is created. On each request, Metabase asks whether the absolute session age has passed its limit, then whether the inactivity timeout has passed. If either limit is reached, the session ends and the user returns to sign-in. Whichever limit comes first governs, so confirm both settings are configured as your access policy requires.

Each request is checked against the age limit and the idle timeout.

Questions buyers ask before configuring Metabase session and password policy

What does it cost to set session and password controls in self-hosted Metabase?

Session and password settings are environment variables and application settings, so the software itself adds no license fee for them on the open source edition. The cost is labor: someone has to decide the policy, set the values, test them and document the result. Be aware of the licensing line. Single sign-on, which is usually how a policy like this gets enforced across an organization, is included only in the Pro and Enterprise plans according to Metabase's pricing page. Pro is listed at $575 per month or $517.50 per month billed yearly, with the first 10 users included. Enterprise is priced by quote, starting at $20,000 per year. Ask any partner for a quote that separates one-time policy design from any recurring retest or review work.

How long does configuring session timeouts and password rules take?

The settings themselves take little time to apply. Most of the effort goes into deciding the values and checking them against the organization's access policy, then verifying behavior in a staging instance. The main drivers are how many login paths exist (password, LDAP, Google Sign-In, SSO), whether the policy must differ by group or environment, and how much evidence the security team wants to keep. No duration is given here because none was supplied for this work. Ask your team or a partner to show the steps and the test cases they will run before agreeing a schedule.

What does the security and identity team need to provide?

They need to supply the written access policy, including required session length, inactivity limit, password strength expectations and whether password logins are allowed at all. They also need to confirm which identity provider is authoritative for each user population, because a password policy in Metabase does not govern accounts that sign in through an external provider. Identity teams should confirm how accounts are disabled when people leave, and security teams should confirm how exceptions are approved and logged. Agreeing these inputs before any change avoids reworking the configuration later.

Can an internal team configure this without outside help?

Yes, for a small instance with password logins only. The settings are documented, and the team needs someone comfortable editing the Metabase deployment configuration and restarting the service. Outside help is more useful when the policy has to map to several identity sources, when it must be evidenced for an assessment, or when the team lacks a test environment that matches production. Check that the internal owner can verify each setting, not just apply it.

Should a partner review our policy mapping before we roll it out?

A second review is worthwhile when the written policy and the technical settings are maintained by different teams. Reviewers check each policy clause against a specific Metabase setting, note which clauses Metabase cannot enforce on its own, and flag clauses that depend on the identity provider. DeployOpen prepares systems and evidence for compliance assessments, but it does not issue audit reports or certifications. Independent auditors and certification bodies make those determinations, so ask any reviewer to state what they do and do not attest to.

What changes when the organization moves to single sign-on?

Once users sign in through SAML, OIDC or another external provider, the identity provider usually controls the password, lockout and session rules that matter most. Metabase password complexity settings then apply mainly to any accounts that still log in with a local password, so those accounts should be reviewed or disabled. Session timeout settings in Metabase still apply to the Metabase session itself, so both layers need to agree. Confirm the sign-in path for each user group before disabling password logins, and keep a documented break-glass account process.

How do session age and inactivity timeout interact in Metabase?

When both the maximum session age and the session timeout are set, a session ends at whichever limit is reached first. This means the shorter limit governs in practice, so a long absolute lifetime does not extend a session that is idle beyond the inactivity limit. Test both limits in staging by leaving a session idle and by keeping it active past the absolute age. Record the values used so auditors and operators can see what applies.

What DeployOpen confirms with your security team

Before any change is made, DeployOpen walks through the written access policy with your security team and maps each requirement to a specific Metabase setting. Session age is controlled by MAX_SESSION_AGE, inactivity by MB_SESSION_TIMEOUT, and password strength by MB_PASSWORD_COMPLEXITY, which accepts weak, normal, strong-enough (15 characters, the default) or strong. Where both session limits are set, a session ends at whichever limit is reached first, so the policy should state the intended values for each, not just one. The team also confirms whether password logins should be disabled entirely in favor of an identity provider, since that decision changes which settings matter and which controls must be provided by the identity provider instead of Metabase.

DeployOpen tests the behavior in a non-production instance built to match the target configuration. The test plan covers a sign-in that stays valid within the age limit, a session that expires after the inactivity window, a session that ends at the first limit reached, password rejection for common passwords and for passwords that fail the chosen complexity level, and the outcome when password logins are turned off. Results are recorded against each policy line, including the Metabase version tested. Your team should confirm which Metabase edition and plan the production instance will run, because the settings and the way access is granted depend on it.

DeployOpen documents the configuration, the test cases, the expected and observed results, and the change record as evidence your security and compliance staff can review. This documentation supports your own assessment of access controls. It does not constitute an audit, an attestation or a certification. Independent auditors and certification bodies issue those, and DeployOpen does not claim otherwise. Ask your auditor in advance which evidence format and sampling approach they expect, so the test records meet their needs without rework.

How DeployOpen works on this

DeployOpen plans, configures and documents session length, inactivity limits and password rules for a self-hosted Metabase, so they match your access policy and can be reviewed by your security team. Engagements are fixed-scope, with the settings, tests and handover agreed in writing before any change is made.

How we scope

  • Record your access policy requirements for session age, inactivity timeout and password complexity before any configuration starts.
  • Confirm which login methods must stay enabled, including whether password logins can be disabled for SSO users.
  • Agree in writing which Metabase version, deployment method and environments are covered, and who approves each setting change.
  • Ask for the scope to state whether an identity provider or two-factor authentication work is included or handled separately.

How we build

  • Set the session limits and password complexity level in a staging instance, then test expiry behavior with real login and logout cycles.
  • Verify that the shorter of the absolute and inactivity limits ends the session, using test accounts across each user group.
  • Check that common-password blocking behaves as the chosen complexity level requires before enabling the setting in production.
  • Review how changes are applied in your deployment method so that configuration is versioned and repeatable.

How we hand over

  • Deliver a written configuration record listing each setting, its value, the reason for it and the owner who approved it.
  • Provide test evidence showing session expiry, inactivity timeout and password rules working as documented.
  • Document the steps to change these settings later, including the effect on existing sessions and users.
  • Walk your administrators through the settings so they can answer audit questions without relying on the original build team.

How we support

  • Review session and password settings after each Metabase upgrade, since defaults and options can change between releases.
  • Retest access controls on a schedule agreed with you, with findings reported and fixes verified.
  • Offer ongoing support, upgrades and continuous testing as a retainer if your policy needs regular review.
  • Ask any support provider to confirm response expectations and change control in writing before work begins.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.