best-plumber-65600
04/11/2025, 6:22 AMbrief-egg-61061
04/11/2025, 6:22 AMbrief-egg-61061
04/11/2025, 6:23 AMbest-plumber-65600
04/14/2025, 3:10 AMbrief-egg-61061
04/14/2025, 3:10 AMbrief-egg-61061
04/14/2025, 3:11 AM{
"id": 4000032,
"text": "The password must be at least 6 characters long, but got 5.",
"type": "error",
"context": {
"actual_length": 5,
"min_length": 6
}
}
[The password must be at least 6 characters long](https://www.ory.sh/docs/kratos/concepts/ui-messages#the-password-must-be-at-least-6-characters-long-but-got-5-4000032) 3. Kratos uses PostgreSQL as its database in production deployments, but the specific tables for password policy storage aren't mentioned in the provided knowledge sources. [Deploy to production](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example) The knowledge sources don't contain enough information to identify the specific database table where password policies are stored in Ory Kratos. You might want to check the Ory Kratos database schema documentation or ask in the Ory community forums for more specific information about the database structure.best-plumber-65600
04/14/2025, 4:11 AMbrief-egg-61061
04/14/2025, 4:11 AMbrief-egg-61061
04/14/2025, 4:11 AMory patch identity-config "$PROJECT_ID" \ --replace '/selfservice/methods/password/config/haveibeenpwned_enabled=false'
[Password policy](https://www.ory.sh/docs/concepts/password-policy) explains that this feature is enabled by default but can be toggled off. ### Identifier Similarity Check You can also disable the similarity check that prevents users from choosing passwords too similar to their identifiers (like email or username): ory patch identity-config "$PROJECT_ID" \ --replace '/selfservice/methods/password/config/identifier_similarity_check_enabled=false'
[Password policy](https://www.ory.sh/docs/concepts/password-policy) mentions this feature is enabled by default but can be disabled. ### Minimum Password Length While you can't completely disable the minimum password length requirement, you can modify it: ory patch identity-config "$PROJECT_ID" \ --replace '/selfservice/methods/password/config/min_password_length=12'
The default minimum length is 8 characters according to [Password policy](https://www.ory.sh/docs/concepts/password-policy). ### Important Security Consideration It's worth noting that disabling these security features will "significantly decrease the security of the service and not follow [NIST guidelines](https://pages.nist.gov/800-63-3/sp800-63b.html)" as mentioned in [Host your own breached password detection API](https://www.ory.sh/docs/kratos/guides/hosting-own-have-i-been-pwned-api). If you're concerned about external API calls to HiBP, you can also host your own HiBP API instance instead of completely disabling the feature.best-plumber-65600
04/14/2025, 4:40 AMbrief-egg-61061
04/14/2025, 4:40 AMbrief-egg-61061
04/14/2025, 4:40 AMbest-plumber-65600
04/14/2025, 5:53 AMbrief-egg-61061
04/14/2025, 5:53 AMbrief-egg-61061
04/14/2025, 5:53 AMselfservice: flows: settings: after: password: hooks: - hook: revoke_active_sessions
[Revoke other active user sessions after changing the password](https://www.ory.sh/docs/kratos/session-management/revoke-sessions-hook) There is no mention in the provided knowledge sources of a feature to track password history and prevent reuse of previous passwords. If this feature is important for your use case, you might need to implement it through custom logic using webhooks or other integration points, but it's not available as a built-in configuration option in Ory Kratos based on the provided documentation.best-plumber-65600
04/14/2025, 5:54 AMbrief-egg-61061
04/14/2025, 5:55 AMbrief-egg-61061
04/14/2025, 5:55 AM{
"id": 4000033,
"text": "The password must be at most 72 characters long, but got 80.",
"type": "error",
"context": {
"actual_length": 80,
"max_length": 72
}
}
[The password must be at most 72 characters long](https://www.ory.sh/docs/kratos/concepts/ui-messages#the-password-must-be-at-most-72-characters-long-but-got-80-4000033) This limitation is further explained in the troubleshooting documentation: > BCrypt hashed passwords and secrets have a 72 character limit. This is a limitation of the BCrypt algorithm and the Golang BCrypt library. [BCrypt hashed passwords and secrets have 72 character limit](https://www.ory.sh/docs/troubleshooting/bcrypt-secret-length) The Golang BCrypt library has a maximum password length of 73 bytes, but Ory enforces a 72 character limit. Any password longer than this will be rejected with the error message shown above.best-plumber-65600
04/14/2025, 5:55 AMbrief-egg-61061
04/14/2025, 5:55 AMbrief-egg-61061
04/14/2025, 5:56 AM{
"id": 4000033,
"text": "The password must be at most 72 characters long, but got 80.",
"type": "error",
"context": {
"actual_length": 80,
"max_length": 72
}
}
[The password must be at most 72 characters long](https://www.ory.sh/docs/kratos/concepts/ui-messages#the-password-must-be-at-most-72-characters-long-but-got-80-4000033) While the documentation shows how to configure the minimum password length using the Ory CLI: ory patch identity-config "$PROJECT_ID" \ --replace '/selfservice/methods/password/config/min_password_length=12'
[Password policy](https://www.ory.sh/docs/concepts/password-policy) There is no equivalent command or configuration option mentioned for setting a custom maximum password length below the default 72 characters. If you need to enforce a maximum length of 30 characters, you might need to implement this validation in your own UI layer before submitting to Kratos, as the knowledge sources don't indicate this is configurable within Kratos itself.best-plumber-65600
04/14/2025, 5:58 AMbrief-egg-61061
04/14/2025, 5:58 AMbrief-egg-61061
04/14/2025, 5:58 AMjson { "authentication_methods": [ { "method": "password", "aal": "aal1", "completed_at": "2023-02-03T15:41:22.898346346Z" } ] }
[Session Checks](https://www.ory.sh/docs/kratos/bring-your-own-ui/custom-ui-basic-integration#session-checks) 2. There's an open GitHub issue (#3037) discussing the implementation of features for "Throttling repeated login requests & account lock" which proposes creating a new table to store login history: Create a new table to store the login history of a specific identity. The schema is as follows: - id (uuid, primary key) - identity_id (foreign key referencing identities.id) - login_time (datetime) - login_status (enum: 'success', 'failure')
[Throttling repeated login requests & account lock](https://github.com/ory/kratos/issues/3037) However, this is an open issue, not a currently implemented feature. 3. Kratos does track some device information for sessions, including IP address, user agent, and location: json "devices": [ { "id": "3d4af645-002a-40ee-af42-f81ec2c614ac", "ip_address": "", "user_agent": "curl/7.81.0", "location": "Munich, DE" } ]
Based on the available information, while you can access the timestamp of the current session's authentication, there doesn't appear to be a built-in way to track or query the history of past successful password logins in the current version of Kratos. If you need this functionality, you might need to implement it yourself by: 1. Using webhooks to capture login events 2. Implementing your own tracking system 3. Waiting for the account lockout feature (issue #3037) to be implemented, which would include login history tracking The knowledge sources don't contain information about any configuration options for enabling such tracking.