Re:Why We Don't Trust the Database with Authentication
by vvanpo on Friday July 10, 2026 @08:41PM
(#48867239)
As explained in the article this wouldn't work, because changing your org means your stored hash is no longer valid (as the org is incorporated in the hmac), and you can't generated your own hashes because you're missing the pepper. So after changing your org all subsequent requests would fail.
[ Parent
| on HN ]
Re:Why We Don't Trust the Database with Authentication
by lsaferite on Friday July 10, 2026 @11:04PM
(#48868299)
But logging in gets you a new hash with your new org id, right?
Re:Why We Don't Trust the Database with Authentication
by tybit on Saturday July 11, 2026 @02:57AM
(#48869480)
Yeah, if user -> org tenancy is stored in the same database without any similar defence in depth then a fresh API key after updating org would work around this.
Would be a interesting topic for them to cover.
I think the same HMAC(pepper, user, org) as a validation column would work. Better yet, encryption with AAD on any tenancy data if you have a TPM available.