Setting a Synapse password policy before users sign in
On a self-hosted Matrix server, local passwords are a live login path from the first account you create, so the password policy has to be chosen before registration opens, not after. In Synapse, the password_config block in homeserver.yaml controls whether local password login is enabled at all and, when it is, the rules a password must meet, such as minimum length and character classes. Once Matrix Authentication Service (MAS) is in front of the homeserver, MAS takes over password hashing and storage for accounts it manages, so the rules you set in Synapse no longer decide what users can choose. Confirm in the current configuration manual and the MAS documentation exactly which settings still apply after a migration, because some Synapse options stop governing a password once MAS owns it.
Password rules are only one layer. A length requirement does nothing against a credential stuffing run that reuses leaked passwords, which is why rate limits on logins, SSO for the workforce, and pruning of stale devices belong in the same review. Treat the password policy as one control among several and record how each layer answers the same threat. The Synapse configuration manual is the reference to cite for each key you set. This page is written for operators who must justify these settings to a security reviewer, so the working rule is simple: for each setting, write down the threat it addresses, the owner who will enforce it, and the check that proves it still holds after an upgrade.
Password options and when each fits
This table compares the three ways a Synapse and MAS deployment can handle passwords: local rules in Synapse's password_config, passwords managed by MAS, and SSO-only sign-in with local passwords disabled. Read each row against your identity setup to see who enforces the rule and what it leaves uncovered. The main takeaway is that an SSO-only setup moves password strength to your identity provider, so its policy must be confirmed there.
| Option | What the control does | Who enforces it | What it does not cover | Signal that favors it |
|---|---|---|---|---|
| Local rules in Synapse password_config | Sets local password requirements such as minimum length and character classes for accounts Synapse authenticates itself, when password login is enabled. | Synapse, at password set and change time on the homeserver. | Accounts that sign in through SSO or external providers, and any password reuse outside your server. Confirm the exact keys in the configuration manual for your release. | Few users, no existing identity provider, and a need for simple local accounts during a pilot. |
| MAS-managed local passwords | MAS takes over password hashing and login after migration, so password storage and checks move to the authentication service. | MAS, which holds the password store and login flow. Confirm which password rules MAS applies itself in your version. | Strength rules may not match Synapse's former settings. Verify the policy you expect is actually enforced after migration. | You are moving to MAS for OIDC login but still need local accounts for some users. |
| SSO only, local passwords disabled | Users authenticate only through an upstream OpenID Connect provider such as Keycloak, Microsoft Entra ID, Google or Authentik, so no local password is accepted. | The upstream identity provider sets and enforces password, MFA and lockout rules. | Account recovery, break-glass admin access and service accounts still need a path. Confirm how your provider handles lockout and MFA. | You already run a central identity provider, need one place for MFA and offboarding, and can accept dependence on that provider's uptime. |
| SAML-based identity provider | SAML is not supported directly by MAS, so a bridge such as Dex is needed to put a SAML source in front of MAS. | The bridge and the upstream SAML identity provider. | Additional component to operate and patch. Confirm bridge support and maintenance status before choosing it. | Your organization standardizes on SAML and cannot add a native OpenID Connect provider. |
| Local passwords with external directory | Passwords live in a directory such as LDAP, reached through a bridge, instead of a homeserver-owned store. | The directory and the bridge, not Synapse or MAS. Confirm the supported integration path in current MAS documentation. | Directory policy, lockout and audit logging depend on the directory team and may not match Matrix admin logs. | Your directory already holds staff credentials and access reviews run there. |
| Password policy in an audit or assessment | Assessors look for a written rule, its enforcement point and evidence that it runs on every login path. | Your compliance owner, with evidence from the enforcing system. | A written policy does not prove enforcement. Test each login path, including admin and service accounts. | An assessment is coming and you must show which system enforces password controls. |
Where password checks happen in a MAS and Synapse login
The login starts at the Matrix client, which is sent to Matrix Authentication Service (MAS) for both password and upstream OpenID Connect logins. MAS hands the user to an upstream identity provider such as Keycloak or Microsoft Entra ID, which holds the credentials in the SSO case. The trust boundary sits between the upstream provider and your homeserver stack, so the question to answer is which component checks the password in your migration state. Review that boundary before you decide to disable local passwords, because after that point Synapse no longer checks any password itself.
Password checks move from Synapse to MAS or the upstream provider depending on migration state.
How to tighten password rules step by step
This sequence moves a Synapse or Matrix Authentication Service deployment from its current login setup to stricter password rules without locking out existing users unexpectedly. Each step ends with a check you can run and record.
Inventory login methods and existing accounts
Before changing anything, list how users sign in today: local passwords, SSO through an upstream provider, or both. Record whether password login is enabled in your Synapse configuration, whether MAS is in front of it, and how many accounts hold local passwords. Identify which accounts are service or bot accounts, since they may rely on password login. Confirm the current settings in the configuration file and in your identity provider. The step is done when you have a written list of login paths and account types that a reviewer can check against the live server.
Set password rules on a test homeserver
Copy your production configuration to a test homeserver that uses a restored or non-sensitive database. In the password_config section, set the minimum length, the character class requirements, and whether password checks apply to local accounts only. Review the configuration documentation for the exact keys supported by your Synapse version before editing, because option names and defaults change between releases. Restart the test instance and confirm it starts without configuration errors. The step is done when the test server runs with the new settings and the file is saved in version control.
Confirm which rules apply to new and existing passwords
Determine how the new rules behave for accounts that already have a password. Password rules generally govern passwords set or changed after the rule takes effect, so existing passwords may keep working until a user changes them. Test this directly: create one account with a password that predates the change, log in, and attempt a password change. Note whether the server enforces the new rules at that point. Confirm the answer against the documentation for your version rather than assuming it. The step is done when you have a short record stating which password actions trigger the new rules.
Plan the MAS migration if MAS is in use
If you run Matrix Authentication Service, password hashing and storage move to MAS after migration, so Synapse password_config no longer governs those accounts in the same way. Read the MAS migration documentation for your version and list which accounts will be migrated, which upstream identity provider will handle sign-in, and where password rules must be set on the MAS side. Ask your MAS maintainers to confirm the rule settings and whether they apply to upstream SSO users. The step is done when you have a migration plan that names where each password rule lives after migration.
Verify rejected passwords on test accounts
Create a set of test accounts and attempt registrations and password changes with passwords that should fail: too short, missing required character classes, and any other rule you configured. Record the error message each attempt returns. Then try passwords that meet every rule and confirm they succeed. Repeat the same tests through any client your users rely on, such as Element, because client error handling can differ from the API. The step is done when every expected rejection produces the expected message and every compliant password is accepted, and the results are saved as a test log.
Roll out the change to production
Apply the tested configuration to production during a window your change process approves. Keep a copy of the previous configuration so you can revert. Restart Synapse and any MAS instance according to your deployment method, then check the logs for configuration warnings. Run one login and one password change with a test account on production. If your environment includes a reverse proxy or identity provider, confirm they still pass authentication correctly. The step is done when production starts cleanly, the test login succeeds, and the rollback copy is stored.
Document the policy and the verification
Write a short policy record that states the rules in force, the accounts they cover, the date of the change, and the test results from the verification step. Include the location of the configuration in version control and the name of the person who approved it. Give the record to your security and compliance team, and ask them to confirm it meets the control requirements that apply to you. Schedule a recurring check that the configuration on the server still matches the record. The step is done when the record is stored, reviewed by the owners of the policy, and linked from your operations runbook.
How MAS takes over password hashing after migration
Once users are migrated to Matrix Authentication Service (MAS), MAS becomes the owner of local password storage and hashing, which changes where your password policy is enforced. Synapse's password_config no longer governs how a migrated user's password is stored or checked, because sign-in runs through MAS's OAuth 2.0 and OpenID Connect flows. Treat the migration as a transfer of policy ownership, and do not assume the length and complexity values you set in Synapse carry over. Read the MAS migration documentation and its password settings, then confirm which rules MAS applies to new passwords and password changes. For users who authenticate through an upstream provider, the MAS upstream identity provider guide explains how that provider's login becomes the sign-in path.
Three things need confirmation before cutover. First, hash compatibility: establish whether MAS can verify the password hashes already stored for your users, and test that with a sample of accounts in a staging copy, since a user who cannot sign in after cutover is the most visible failure. Second, accounts with no password: SSO-only users, service accounts and any account created without a local credential have no hash to migrate, so list them and decide how each one will sign in afterward. Third, whether Synapse-side rules still apply: check whether any path, such as admin tooling or an API still in use during the transition, reads password_config or relies on it. Record the answer for each path so no team assumes a control exists when it does not.
Run the cutover in staging first and record which system enforces each password rule after the move. Create test accounts with short, reused and long passwords, then attempt sign-in, password change and account creation, noting each result. Keep the Synapse and MAS settings side by side in your change record so reviewers can see where each control lives. If a user also signs in through an upstream provider such as Keycloak or Microsoft Entra ID, confirm that the upstream provider's policy is the rule that user actually meets. Before changing anything, read the Synapse upgrade notes for your version, because they warn that rolling back can be difficult after database schema changes.
When to drop local passwords for SSO only
Turning off local passwords is a decision about where identity lives, not only a setting in Synapse or MAS. The factors below connect upstream identity, non-interactive access, emergency access and support load, and each one needs an answer from your own environment before you change anything.
Does an upstream OIDC provider already hold identity?
If Keycloak, Microsoft Entra ID, Google or Authentik already runs your staff accounts, MAS can delegate sign-in to it through an upstream provider. Check whether that provider enforces MFA, lockout and offboarding, because once local passwords are off, MAS inherits those controls. Confirm who owns the provider configuration and who can change its client settings.
Upstream provider setupDo SAML users need a bridge?
MAS does not support SAML directly and recommends a bridge such as Dex for SAML or LDAP sources. If your workforce signs in through SAML, decide whether the bridge becomes a new component you must patch, monitor and back up. Without a bridge, the choice may be to keep local passwords for those users, so map every user population to a sign-in path before you disable anything.
Which bot and service accounts need non-interactive access?
Bridges, bots and integration scripts usually cannot complete an interactive SSO login. Identify each service account, how it authenticates today and whether it needs a password, an access token or a dedicated flow. Removing local passwords without this inventory can break bridges mid-operation, so confirm the authentication method for every non-human account in writing.
How will break-glass admin access work?
If the upstream provider fails, a locked-out or departed administrator can leave the server unmanageable. Decide which administrator accounts keep a recovery path, where its credentials are stored and who approves their use. Test the recovery path on a staging server, record each use in your audit trail and confirm that the procedure does not depend on the same identity provider it is meant to back up.
What will users lose when passwords stop working?
Every user who signs in with a password today needs a clear replacement path, including people on shared devices, contractors and users without a managed identity. Estimate how many support requests a cutover generates and who answers them. Plan the communication and a rollback window, and confirm with the identity team whether accounts for leavers are disabled upstream so they stop working on the homeserver too.
Questions buyers ask about Synapse and MAS password policy
What drives the effort of changing Synapse password rules?
The effort depends mostly on whether you are only tightening the rules for new passwords or also changing how existing accounts are checked. Changing password_config in Synapse is a configuration edit, but the work around it is what takes time: agreeing the policy with your security team, checking which login paths use local passwords, testing the change against clients and bridges that set or send passwords, and writing the user communication. If you run MAS, the hashing and password rules move to MAS, so the review covers both systems. Ask any partner to split the quote into policy design, configuration and testing, and user rollout.
Are existing users forced to reset their passwords?
Not by a rule change alone. Tightening password requirements in Synapse generally applies to new passwords set after the change, so existing users keep working until they choose to change their password. Forcing a reset is a separate decision that needs its own process, such as expiring passwords, notifying users, and handling accounts that never log in. Confirm the exact behavior for your Synapse version in the configuration manual before you promise users anything, and decide in advance how you will treat users who depend on bots or service accounts with local passwords.
How long does a MAS migration take for our user count?
No duration can be stated from the researched facts, so treat any timeline you receive with caution. The main variables are the number of local accounts, how many login paths and clients depend on them, how many environments you must test (staging, production, and any federated test server), and whether your identity provider is ready to act as the upstream. Migration also depends on the Synapse and MAS versions you run, so check the upstream migration steps for your versions and ask the partner for a plan that lists the test cycles and the rollback point before you agree on dates.
Can our own team do the password policy work alone?
A capable Synapse operations team can change password_config and read the upgrade notes without outside help. The harder parts are usually the ones that touch other systems: deciding whether to keep local passwords at all, wiring MAS to an upstream identity provider, and proving the change to auditors. If your team has no one who has run Synapse in production or who owns the identity provider, a fixed-scope engagement can cover those pieces while your staff keep operational ownership. Compare the internal estimate with the written scope, not with a generic figure.
What do we need from our identity and security staff?
Identity staff are needed to decide where accounts are authoritative, which identity provider MAS will use, how group membership maps to Matrix access, and how joiners and leavers are handled. Security staff are needed to set the target password standard, review how it fits your broader authentication controls, and approve the evidence you will keep. Ask for named owners on both sides before work starts, because password policy changes often stall when the identity team and the Matrix team each assume the other owns the decision.
Does dropping local passwords for SSO only require a MAS migration?
It depends on how your deployment is set up. Moving to SSO-only sign-in means users no longer authenticate with a Synapse-held password, so you need a working upstream provider, a tested login path, and a plan for accounts that must remain available during an identity outage, such as admin and break-glass accounts. Check the MAS upstream identity provider documentation for the supported providers and confirm with your identity team that the provider can meet your session and recovery needs before you remove local password login.
Which compliance evidence does a password policy change produce?
The useful evidence is the approved policy, the configuration as deployed, the test results showing the rules are enforced, the change record, and the user communication. Where a compliance framework is in scope, the independent auditor decides what is sufficient. DeployOpen prepares systems, controls and evidence for compliance assessments, but does not issue audit reports or certifications. Ask your auditor which controls they expect to see before the work starts.
How DeployOpen scopes password policy work
DeployOpen scopes password policy work as a written engagement before any setting changes. The first step is a review of every current login path on the Synapse homeserver and, where it is in use, the Matrix Authentication Service (MAS): local password logins, registration flows, SSO providers and any admin tooling that creates accounts. That inventory shows which accounts can still authenticate with a local password and which settings, such as the password_config block in Synapse, actually govern them. The output is a short scope document listing what is in and out of the engagement, who approves each decision and which environments the work touches.
The policy itself is agreed with the client's security team, not decided by the implementer. The team needs to settle minimum length, complexity rules, whether local passwords stay for administrators or break-glass accounts, and whether users move to SSO-only sign-in through an upstream OpenID Connect provider. Changes are then implemented and tested in the client's own infrastructure, in a staging environment first where one exists, with test accounts that cover each login path. Testing confirms that existing users, service accounts and bridges still behave as expected, and that the change is recorded in the configuration under version control.
DeployOpen prepares controls and evidence for compliance reviewers, including configuration exports, test results, change records and access decisions. It does not issue audit reports, attestations or certifications; independent auditors and certification bodies make those determinations. Quotes follow from the written scope, so the depth of the login review, the number of environments and the amount of retesting are the main inputs the client should expect to see priced. Ask for the scope document, the test plan and the evidence list before approving work.

