Password Policy

The Enterprise Stack checks every new email or username password before it stores anything. Rejected passwords never create an account, identifier, or authentication record.

Applies to: email and username passwords for Enterprise accounts, including super admins, whenever a new password is set through the API, a super admin registration token, or development seeding.

Does not apply to: signing in with an existing password, login-time hash upgrades, API keys, accounts that sign in through an external identity provider, or X-Dev-Mode-Token values.

Requirements

A new password must:

  • Be 15–128 characters long. Characters are counted as Unicode code points, so ä or an emoji counts as one.
  • Contain no control characters (including tabs and line breaks) and no malformed Unicode.
  • Not be a common password from the bundled offline list.
  • Not be the account's email address, the part of the email before @, or its username.
  • Not be a walt.id service name (walt.id enterprise or waltid enterprise).

These comparisons ignore case and surrounding spaces, and only reject whole matches. A passphrase such as password lantern walt.id river is accepted.

There are no composition rules: uppercase letters, digits, and symbols are optional. Spaces and Unicode are allowed. The password is hashed exactly as sent, without trimming, case conversion, or Unicode normalization, so users must sign in with exactly the same characters.

Length is the main protection. The common-password list is a bundled offline copy of Django's list, and most of its entries are shorter than 15 characters. No password is sent to an external breach-checking service. Encourage users to choose a long, unique passphrase, ideally generated and stored by a password manager.

Where the Policy Applies

Source of the new passwordWhere it is documented
POST /v1/account/register (when account-registration is enabled)Create Account
POST /v1/admin/account/registerCreate Account
POST /v1/admin/account/auth/{id}/add-initialAPI reference
POST /v1/admin/account/auth/stored-data/addAPI reference
password of a token in superadmin-registration.conf, checked by POST /v1/superadmin/create-by-tokenActivate Super Admin
exampleAccountPassword, used by POST /v1/dev/add-example-dataDev Mode Access

Always send the password in plaintext in the password field over HTTPS. Requests or configurations that contain passwordHash are rejected, even when password is also set, because a hash cannot be checked against the policy.

Rejection Response

A rejected password returns 400 Bad Request with the ID NewPasswordRejectedException. The message names the failed requirement and never includes the password:

{
  "exception": true,
  "id": "NewPasswordRejectedException",
  "status": "Bad Request",
  "code": "400",
  "message": "Use a password with at least 15 characters. A longer passphrase is welcome."
}

Possible messages:

  • Use a password with at least 15 characters. A longer passphrase is welcome. — Too short.
  • Use a password with no more than 128 characters. — Too long.
  • Passwords may contain spaces and Unicode, but not control characters or malformed Unicode. — Invalid characters.
  • Choose a less predictable password. Common passwords, your account identifier and service names are not allowed. — Common password, identifier, or service name.
  • Supply a plaintext password for new password authentication. Supplied passwordHash values cannot be validated. — passwordHash was supplied.
  • This password is too long for this service. Use a shorter password. — Exceeds the bcrypt byte limit. See Auth.

The policy runs before the duplicate check, so a weak password for an existing identifier returns the policy 400.

Compatibility: API clients that previously supplied weak new passwords or password hashes must update their requests. Existing passwords/login and login-time hash upgrades are unchanged. Configured superadmin/token bootstrap passwords follow the same policy when creating an account. Update weak passwords or supplied hashes in unused bootstrap configurations before activation. Development example seeding also applies the policy; direct database/import writes remain outside it. No forced reset or expiry is added.

Next Steps

Last updated on November 26, 2026