We build Kratos and Oathkeeper self-hosted for our customers as part of our products. Some customers insist on running air-gapped from the Net so we cannot use HaveIBeenPawned directly. We also don't want to download the complete Pawned database and query it locally.
To add a little more protection against silly passwords I have added a call to a simple entropy based validator https://github.com/wagslane/go-password-validator/blob/main/README.md
Would Ory accept a PR?
s
steep-lamp-91158
01/09/2025, 1:33 PM
I think the approach does add at least some benefit over not doing anything, although hibp definitely adds a lot more confidence. I'd be open to add this to Kratos.
steep-lamp-91158
01/09/2025, 1:36 PM
Although maybe it would be better to just implement this as a custom pw validation webhook instead?
s
some-bear-63847
01/09/2025, 2:02 PM
Though I like the concept of plugability, I am not so keen on cleartext passwords being passed to webhooks.
s
steep-lamp-91158
01/09/2025, 3:35 PM
sure, in your case couldn't you run all the stuff locally so it cannot really leak?
s
some-bear-63847
01/15/2025, 12:16 PM
I have read more on this subject and realised I was being rather naive. I don't feel entropy is a useful measure.
Without HiBP I think the best I can do is require longer passwords (14-16 chars) and attempt to educate users about good password choices.
Thanks, and sorry for the noise.
s
steep-lamp-91158
01/15/2025, 12:20 PM
yeah it might provide some useful measure, but I think it is rather small tbh
steep-lamp-91158
01/15/2025, 12:21 PM
it would have to include also different keyboard layouts for different languages, and so forth....
steep-lamp-91158
01/15/2025, 12:21 PM
that's why hibp is such a great source of passwords to check against, because they are real 😅