Zitadel password hashing and imported hash algorithms

Zitadel password hashing choices affect security, login latency and migration effort. This page explains the algorithm options, hash upgrades, imported md5 and phpass verifiers and the checks to run before go-live.

On this page

Zitadel password hashing: what it controls and when teams need to set it

Hashing settings decide how stored passwords are protected and how imported credentials are verified, so they belong in the design phase of any move to self-hosted Zitadel, not after users have logged in. A team migrating users from another identity system, especially one that holds passwords in older hash formats, needs to know which algorithms the deployed Zitadel version accepts, how the hasher is configured, and what happens to existing hashes when parameters change. This page covers three jobs: configuring the password hasher, upgrading stored hashes when parameters change, and setting up verifiers for imported hashes. The platform team owns this work, and security sign-off should be recorded before any production import.

Exact algorithm defaults, supported parameter ranges and the list of importable hash formats differ between releases, so confirm each of them in the Zitadel documentation for the version you deploy before you write any configuration. Ask the vendor or your own test instance whether a given hash format can be verified without a forced password reset, and whether an imported hash is rehashed with current settings after a successful login. Those answers determine whether a migration can keep existing passwords working or must send users through a reset.

The self-hosting and migration guides are the natural starting points, and the Zitadel migration guides describe how imported credentials are handled for each source system. Record the hash formats you expect to receive, the source system's parameters, and the Zitadel settings you chose, because the security review and any later audit will ask how stored credentials are protected.

Hashing algorithm options and when each fits

This table compares the four password hashing families Zitadel can be configured for, plus imported md5 and phpass verifiers, by what you must decide: cost settings, memory and CPU load, login latency and compatibility with existing hashes. Read each row against the Zitadel version you run, because supported algorithms and parameter names can change between releases. The main takeaway is that the algorithm choice is mostly settled by your existing hashes and your hardware budget, and the tuning is where login latency is won or lost.

OptionWhat you decideTrade-offWhen it fits
bcryptWork factor (cost), set high enough to slow offline guessing on your hardwareWell understood and widely supported, but uses little memory, so GPU attackers have an easier time than with memory-hard optionsMigrating from a system that already stores bcrypt hashes, or when your Zitadel version offers no memory-hard option
argon2Memory, iteration and parallelism settings, confirmed against the variant your Zitadel version offersMemory-hard, which raises attacker cost, but each login uses more RAM on the Zitadel nodes, so concurrent logins need capacity planningNew deployments with no legacy hashes, and teams that can size memory per Zitadel pod
scryptCPU cost, block size and parallelization settingsMemory-hard like argon2, with a different tuning model, and less commonly chosen, so confirm Zitadel support and parameter names firstTeams with an existing scrypt policy or a requirement to match it, once support in your version is verified
pbkdf2Iteration count and hash function underneath itBroadly accepted and often required by policy, but not memory-hard, so it relies on iteration count alone to slow attackersEnvironments where a documented policy names PBKDF2, or where compatibility with an existing store matters most
Imported md5 verifierWhether to accept legacy md5 hashes at login and rehash them to the current algorithm after successLets users sign in without a reset, but md5 is weak, so the import must be time-limited and the stored legacy hash removed after rehashMigrating users from a legacy system where forcing resets is not practical, with a planned cutoff date
Imported phpass verifierWhether to verify existing phpass hashes from a PHP application and rehash on successful loginPreserves the user's existing password without a reset, but requires confirming the phpass format and iteration settings from the source systemMoving accounts from a PHP application such as an older WordPress or Drupal site into Zitadel

How to configure password hashing in a self-hosted Zitadel

This sequence takes a self-hosted Zitadel from an unknown hashing setup to a tested production configuration. It confirms the version and database prerequisites, chooses and measures cost settings in staging, and verifies that new logins and existing or imported passwords end up stored under the approved hash format.

  1. Confirm the version, hashers and database

    The platform engineer records the deployed Zitadel version and compares it with the entries on the Zitadel releases page. Confirm in the configuration reference for that version which password hashers and parameters it accepts, since option names and defaults can change between releases. Confirm that the PostgreSQL server runs a supported major version, 14 through 18, as listed in the Zitadel database documentation. Done when a written record lists the version, the hasher options it offers and the database version.

  2. Choose the algorithm and cost settings in staging

    The security lead and the platform engineer select an algorithm and its cost parameters in a staging instance built from the same Zitadel version as production. Higher cost settings make offline guessing of a stolen password database more expensive, but each login then uses more CPU and memory on the API nodes. If the instance must verify imported MD5 or phpass hashes, confirm which verifier the version provides for each format before choosing. Done when the chosen algorithm and settings are written down with the reason for each.

  3. Measure login latency under expected concurrency

    The team runs a load test against staging at the expected peak number of concurrent logins, repeating it at each candidate cost setting. The test records login latency at the median and at the high percentiles, along with CPU and memory on the Zitadel API pods or processes. Agree the latency ceiling with the application owners before the test, because the Zitadel documentation does not set one for this purpose. Done when a table shows latency and resource use for each candidate, and the chosen setting stays within the agreed ceiling.

  4. Apply the production configuration through change control

    The platform engineer sets the chosen hasher and parameters in the deployment source of truth, whether that is Helm values, a Docker Compose file or the binary's configuration file, and records the change in version control. The change goes through the same review and rollout process as other production changes, and the previous configuration is kept so it can be restored. Done when the running instance reports the new hasher settings and the change is traceable to an approved commit or ticket.

  5. Test a new login and the stored hash format

    In staging first, then in production with a dedicated test user, the tester sets a new password and signs in successfully. The tester then checks the stored password record, through database access or the administrative tooling that the installed version provides, and confirms that the hash prefix or format matches the algorithm selected in step two. Confirm with the vendor or the version documentation how the hash is exposed for inspection, since the method varies. Done when the login succeeds and the stored format is recorded in the test report.

  6. Verify the hash upgrade for existing and imported users

    The tester uses an existing user whose password was stored under the previous settings, and a user imported with an MD5 or phpass hash if the project has them. Each user signs in with the existing password. The tester then confirms the login succeeds and that the stored hash has been rewritten to the new algorithm and parameters. Confirm with the vendor whether the upgrade happens on login for every hasher, and whether an audit or log entry records it. Done when before and after hash records show the change and the login succeeds both times.

  7. Monitor logins and keep the rollback ready

    After the production rollout, the operations team watches login latency, login failure rates and resource use on the Zitadel nodes for a period agreed in advance with the application owners. They keep the previous configuration available so the change can be reversed if latency or failures exceed the agreed limits. The team also records how many accounts have been rehashed, if the version exposes that count. Done when the monitoring summary is filed with the change record and the rollback steps have been tested in staging.

How a login verifies, upgrades or rejects a stored password hash

The flow starts when a user submits a password at the login step. Zitadel reads the stored hash from PostgreSQL along with its algorithm identifier, then passes the password to the verifier that matches that algorithm. If the password does not match, the login fails and nothing is rewritten. If it matches and the stored hash uses older parameters or an imported scheme, the password is rehashed with the current settings and the new value is written back. Confirm the exact upgrade behavior for each algorithm against the Zitadel documentation before relying on it.

General flow to confirm against the Zitadel documentation for each hash algorithm.

Verifying imported md5 and phpass hashes without forcing password resets

Teams importing users from Auth0, Keycloak, Firebase or another Zitadel instance often cannot export plaintext passwords, so the imported records carry the source system's hashes. A legacy verifier lets Zitadel check a submitted password against the original hash at the user's next sign-in. If the check passes, the password is stored again under a current algorithm, and the user never has to reset it. The migration context matters here because each source system handles hashes differently, and the import method (for example, just-in-time migration or a bulk import) determines whether a verifier is needed at all. Confirm the exact hash formats each source exports, and whether the target supports verifying them, in the migration guide for that source before you plan the cutover. Migration guides are listed on the Zitadel migration documentation.

MD5 is a weak password hash. It is fast to compute, so an attacker who obtains an MD5 hash table can test guesses at a high rate. phpass and similar iterated schemes are stronger, but they still use older parameters than current guidance recommends. Treat an imported hash as a transitional state, not a permanent one. Record how many accounts still hold a legacy hash, set a deadline by which every account must have signed in or been forced through a reset, and track the count against that deadline. Dormant accounts are the main risk, because they will never trigger the rehash on their own. Decide in advance how you will handle them, such as expiring the credential, requiring a reset through your own recovery flow, or disabling the account after a defined period of inactivity. Those choices belong in your risk register, not in the import script.

How hashing cost changes login latency and capacity

Password hashing is deliberately expensive, so every successful login spends CPU and memory before Zitadel answers. The decisions below connect the hash parameters you choose to the latency users feel, the capacity your cluster needs and the one-time work of upgrading or importing existing hashes.

Per-login CPU and memory cost

Each password check runs the configured algorithm with its cost parameters, so the work scales with the parameters you set for bcrypt, argon2, scrypt or pbkdf2. Argon2 and scrypt also allocate memory per hash, which multiplies across concurrent logins. Measure one verification on the hardware you will run, at the parameters you plan to ship, and record CPU time and peak memory before you choose a setting.

Self-hosting docs

Peak login bursts

Login load is rarely flat. Start-of-shift sign-ins, a bulk SSO rollout or a customer launch can send many password checks within seconds, and each one holds a worker for the full hash duration. Ask how many concurrent verifications your peak requires, then compare that against the number of Zitadel replicas and the CPU each one can use before queueing starts to hurt users.

Cost of rehashing during migration

When you raise cost parameters or move to a new algorithm, existing hashes upgrade only as users log in, so the extra work arrives gradually and unevenly. Imported md5 or phpass hashes need a verifier and a rehash on first successful login. Plan how long both old and new hashes will coexist, and estimate the extra login load that rehashing adds during that window.

Migration guides

Latency budget for users

Set a target for how long a password login may take end to end, including the network, the browser redirect and the hash. Hashing usually sits inside that budget, so the cost parameters should be chosen to meet your security target without pushing the login past what your users will tolerate. Confirm the acceptable ceiling with product owners and the security team before tuning.

Load testing on the deployed topology

A benchmark on a laptop does not predict the cluster. Test against the same PostgreSQL, proxy, TLS termination and replica count you will run in production, with realistic mixes of password, passkey and token requests. Watch p95 and p99 login latency, error rates and queue depth, and repeat the test after every change to hash parameters or pod sizing.

Effect on Kubernetes resource limits

CPU limits that throttle a pod during a hash spike turn a slow login into a timeout, while memory limits that are too low can evict a pod that holds several argon2 computations at once. Set requests from measured steady-state use, set limits with headroom for bursts, and confirm the chosen values in the official Helm chart before rollout. Ask your platform team how autoscaling responds to login bursts.

Deployment overview

Questions teams ask about Zitadel password hashing and imports

How much does it cost to configure password hashing and import legacy hashes?

The cost depends on scope, the number of source systems, and how deep the testing goes, and no fixed figure applies to every project. The main components are the discovery of how each source stores hashes, the configuration of Zitadel's hash options, the verifier work for imported md5 or phpass hashes, the staging tests that prove logins still work, and the cutover and monitoring plan. Some of this is one-time work, while the ongoing parts are operating the system, retesting after parameter changes and patching. Ask any provider, including DeployOpen, for a written fixed-scope quote that lists each source system, the test cases, and the sign-off steps. DeployOpen does not publish a price list, and a quote follows from the agreed scope.

How long does a password hash migration take?

Timing is set by the number of imported sources, how cleanly each source exposes its hashes, and how many approval and test cycles your security team requires. Teams usually lose the most time when hash samples are hard to obtain, when the source system's hash format is undocumented, or when a staging environment is not available for realistic login tests. Confirm the timeline in writing with the provider and ask which milestones depend on your team's response times. Specific durations should come from the agreed plan rather than from general estimates.

What must our team provide before an engagement starts?

Expect to provide a staging Zitadel environment that matches production settings, representative hash samples from each source, read access to the source system's user store or export, and a named owner who can sign off on the hashing policy. Your security team should also confirm the minimum acceptable hash parameters and how long legacy hashes may remain in use. Ask the provider to list every input in the written scope so that delays can be traced to a specific dependency. Hash samples should be handled under your own data protection rules, and test accounts should not use real customer credentials.

Can our internal team configure hashing and imports without a partner?

A team with strong PostgreSQL, Zitadel and identity administration skills can often do the work alone, especially for a single source and a well-documented hash format. The harder parts are verifying that imported hashes behave correctly, testing that upgrades to stronger hashes do not lock out users, and documenting the decisions for auditors. Consider a partner if you have several legacy sources, limited time before a cutover, or no one who can run login tests against a staging instance. Whichever path you choose, confirm who owns the rollback plan.

Which hash algorithms should we choose for Zitadel?

Choose among the algorithms Zitadel documents for its hashing options, and pick parameters your security team has approved and tested on the target hardware. The trade-off is login latency: stronger memory or work-factor settings increase the cost of every password check, including during peak login periods. Measure login time under realistic concurrency in staging before you lock in parameters, and plan how existing hashes will be rehashed when those parameters change. Confirm the exact supported options and their settings against the current Zitadel documentation for your version.

How do we verify imported md5 or phpass hashes safely?

Imported md5 or phpass hashes should be verified once, then replaced by a hash that meets your current policy after a successful login. Keep the legacy verifier enabled only as long as your risk assessment allows, and log each rehash so you can track how many accounts still depend on the old format. Test with accounts that use each legacy format, including edge cases such as empty passwords or unusual characters, and confirm that failed logins do not reveal which format an account uses. Document the retirement date for each legacy verifier.

How do we request a fixed-scope quote for this work?

Ask for a written scope that names each source system and hash format, the Zitadel version and deployment model, the staging environment you will provide, the test cases and their depth, the handover documents, and the acceptance criteria. Also ask which items are one-time and which recur, such as retesting after a parameter change or a Zitadel upgrade. Request that the quote list assumptions and exclusions separately. Fixed-scope engagements at DeployOpen are agreed in writing before work starts, so a clear list of inputs makes the quote easier to compare with other offers.

Official Zitadel sources for password and migration settings

Before you change any password hashing or imported hash setting, read the Zitadel documentation for the exact release you run. The migration guides are the next read if you are importing users from another identity system, because they describe the just-in-time migration approach and the steps for each source, including how existing credentials are handled. Start with the Zitadel migration guides and locate the page for your source system. Note which hash format your source uses, whether the guide covers verifying those hashes at first login, and whether any step needs a particular Zitadel version. Record those answers in your migration plan so the team that runs the cutover is working from the same facts.

The self-hosting overview is the next read for everything around the hashing settings: deployment method, database support and the configuration that applies to your installation. Use the Zitadel self-hosting overview to confirm how your chosen deployment method reads configuration, and check the database page for the PostgreSQL versions the release supports. Zitadel publishes release notes on GitHub, and the zitadel/zitadel releases page is where you check for changes that affect password handling between your current version and the target. Treat any setting you copy from an example as provisional until you have confirmed its name and default in the documentation for your release.

How DeployOpen scopes and delivers Zitadel password hashing work

DeployOpen approaches Zitadel password hashing as a scoped piece of identity work: first the hashing choices and imported hash sources are inventoried, then the configuration is built and tested in your own infrastructure. The result is a written record your security and compliance teams can review, along with a handover your operations team can run.

How we scope

  • Inventory every password source, including current Zitadel hashing settings and any imported md5 or phpass hashes.
  • Agree which hash algorithm and cost parameters apply to new passwords and how login latency will be measured.
  • Record the scope, deliverables and timeline in writing before work starts, since most engagements are fixed-scope.

How we build

  • Configure the chosen hashing options in a non-production Zitadel instance that mirrors your deployment.
  • Set up verifiers for imported hashes and test that legacy logins succeed and upgrade to the current algorithm.
  • Test hash upgrades when parameters change, and check login behavior with passkeys and password fallback enabled.

How we hand over

  • Document the chosen algorithms, cost parameters, verifier settings and the steps to change them later.
  • Provide a runbook covering how to measure login latency after a change and how to roll back a parameter change.
  • Walk your identity and security teams through the configuration and the evidence they can use in reviews.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer, including review of hashing settings after Zitadel upgrades.
  • Retest the hashing configuration after parameter changes, Zitadel upgrades or changes to the imported password sources.
  • Confirm with your team who owns hashing decisions, since the trade-off between login latency and cost needs an ongoing owner.

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.