News for hackers. Stuff that matters.
Re:Kratos - Cloud native Auth0 open-source alternative (self... by otabdeveloper4 on Thursday November 13, 2025 @10:41AM (#45916191)
Storing auth data in MySQL or Postgres is insane and defeats the purpose of trying to be secure.

Note to self: if I ever need a retirement project, open sourcing a properly architected auth solution would be it.

Re:Kratos - Cloud native Auth0 open-source alternative (self... by mariusor on Thursday November 13, 2025 @12:18PM (#45917568)
For the rest of us that have less experience, what is the problem that you're seeing with that? You didn't really make an argument.
Re:Kratos - Cloud native Auth0 open-source alternative (self... by danudey on Thursday November 13, 2025 @01:06PM (#45918276)
My first read is that 'storing auth data in a relational database is bad' or 'storing critical auth data in a system where only one node can write' is bad, but thinking about the possibilities a bit it could be a factor of data-at-rest as well?

Two factors: the first, that (given the right system permissions) auth data could be fetched from a backup without having access to the system (MySQL/Postgres) directly. Theoretically not a problem if you're salting everything, etc., since you're presumably not storing auth data in plaintext anyway.

Second, no cryptographic verification that nothing has been tampered with? Theoretically possible for someone to e.g. modify the auth data on-disk for the DB to then read and allow auth when it shouldn't.

So I guess at that point the 'solution' would be some form of storage which provides cryptographic verification of its contents so that you can detect tampering, as well as a distributed system with consensus so that if auth data is changed out-of-band then it can be detected and corrected by the other nodes.

Re:Kratos - Cloud native Auth0 open-source alternative (self... by otabdeveloper4 on Thursday November 13, 2025 @04:03PM (#45920503)
Correct.

You wouldn't store plaintext passwords in a database, right? For the same reasons you don't want to store keys, tokens or authorization rules either.

Imagine ssh-agent but distributed with eventual consensus. You don't even need transactions, the data model is simple enough that you can get away with eventually consistent CRDT's.

Re:Kratos - Cloud native Auth0 open-source alternative (self... by exographicskip on Thursday November 13, 2025 @10:47AM (#45916288)
As long as they're salted hashes, they could be stored anywhere right?

Would sqlite be a better option?

Re:Kratos - Cloud native Auth0 open-source alternative (self... by otabdeveloper4 on Thursday November 13, 2025 @04:05PM (#45920527)
> As long as they're salted hashes, they could be stored anywhere right?

Unless you're doing something exceedingly simple, you don't just have hashes, you have things like tokens, keys and authorization rules too.

Re:Kratos - Cloud native Auth0 open-source alternative (self... by ilkhan4 on Thursday November 13, 2025 @10:53AM (#45916376)
Where else would you store them that's more secure?
Re:Kratos - Cloud native Auth0 open-source alternative (self... by esafak on Thursday November 13, 2025 @11:23AM (#45916805)
authn or authz?
Re:Kratos - Cloud native Auth0 open-source alternative (self... by otabdeveloper4 on Thursday November 13, 2025 @04:07PM (#45920543)
You want to keep both in the same place anyways. (Anybody who compromises authz can now compromise authn, and vice-versa.)
Re:Kratos - Cloud native Auth0 open-source alternative (self... by vinckr on Thursday November 13, 2025 @01:52PM (#45918915)
if you are a masochist that is a great retirement project!
Re:Kratos - Cloud native Auth0 open-source alternative (self... by nijave on Thursday November 13, 2025 @05:13PM (#45921335)
Both have options for column/field level encryption

Besides that, you can encrypt in the app regardless of the data storage

Re:Kratos - Cloud native Auth0 open-source alternative (self... by otabdeveloper4 on Friday November 14, 2025 @01:20AM (#45924375)
> Both have options for column/field level encryption

Cool. Now you just have to store the keys somewhere. And figure out how to authenticate/authorize access to them. :)

Re:Kratos - Cloud native Auth0 open-source alternative (self... by nijave on Friday November 14, 2025 @10:29AM (#45927754)
Sure, but you would have had to do that anyway if you didn't pick those RDBMS and rolled your own storage.

Luckily there's established patterns for key management and access control.