News for hackers. Stuff that matters.
Re:Millions of accounts compromised because there is no spec... by andrewstuart on Tuesday April 21, 2015 @09:49PM (#9418251)
OP here. It's a fairly simple concept - any wizards with a few spare hours willing to try to put a prototype together today?

From HN front page to solution within hours!

If it said "built with Golang" or "built with Rust" it would certainly hit the front page.

Re:Millions of accounts compromised because there is no spec... by danellis on Tuesday April 21, 2015 @10:10PM (#9418315)
It's a completely misguided concept. Database security doesn't mean having a completely different database implementation for each type of data you're using. There are already plenty of things you can do without going crazy like that:

* Put the user database behind a microservice

* Use a different connection with different credentials and put appropriate permissions on the tables

* Store password hashes using bcrypt, scrypt or PBKDF2

Not to mention that if you write a new database, what you're actually writing is brand new exploitable bugs.

Re:Millions of accounts compromised because there is no spec... by andrewstuart on Tuesday April 21, 2015 @10:14PM (#9418330)
Misguided? The microservice you suggest is precisely what the post suggests. The post suggests that the code of the microservice ensures that the correct hashing is used and that the data is stored correctly.

It's puzzling that you say this is "completely misguided" and describe exactly the same thing.

Re:Millions of accounts compromised because there is no spec... by danellis on Tuesday April 21, 2015 @10:20PM (#9418348)
OP called for "a specialized database". I was talking about using the same kind of database.
Re:Millions of accounts compromised because there is no spec... by derefr on Wednesday April 22, 2015 @04:09PM (#9423203)
I don't know if you're really thought about it, but a microservice API is a database.

A Postgres database, for example, with correctly-limited user permissions set, and a good set of views and triggers and stored procedures, is exactly equivalent in power and flexibility to putting some blobs of Sinatra API-routing and model code in front of Postgres-used-as-a-dumb-object-store.

RDBMSes were always meant to do, on their own, exactly what microservices are doing now. That's why they're so much more complicated than just being dumb object stores: you can encode within a RDBMS schema the constraints of the model, and the valid transformations you can make to any given piece of data, to create an API exactly as narrow and high-level as a given user needs.

I think it was just some quirk of their use in mainframe contexts which lead to their auth protocols never being hardened to work on the public Internet, which meant people started to believe there was something inherently insecure about letting users talk to an RDBMS.

There's not; a database, a real database, is a persistent micoservice server.

And now we're all the way around to reinventing them on top of themselves, but this time they're three separate process-spaces, random custom languages are required, and they don't understand questions phrased as relational algebra.

Re:Millions of accounts compromised because there is no spec... by jacquesm on Tuesday April 21, 2015 @11:53PM (#9418592)
He is the OP.
Re:Millions of accounts compromised because there is no spec... by wglb on Tuesday April 21, 2015 @11:53PM (#9418590)
The article is pretty unclear on some basic concepts, such as salting and hashing wrong. This is a pretty well solved problem with bcrypt and other framework-driven identity mechanisms.

And It should encrypt data internally really gives no protection other than physical theft of the disk drive, as in if the portion of the application is compromised that can access the data, the key is available at that point, and the attacker has free run of that corner of the universe.

Re:Millions of accounts compromised because there is no spec... by nedmcclain on Tuesday April 21, 2015 @11:51PM (#9418585)
My beta-quality Golang version of this with pluggable backends, including S3: https://github.com/nmcclain/glauth I would love suggestions/help.
Re:Millions of accounts compromised because there is no spec... by andrewstuart on Wednesday April 22, 2015 @12:31AM (#9418665)
Ned - would you mind replying to this with a list of the features specified in the blog post and a YES/NO to confirm which are supported by your code?

thanks

Re:Millions of accounts compromised because there is no spec... by nedmcclain on Wednesday April 22, 2015 @11:44AM (#9421234)
It should be accessible only via its specialised API which is designed to constrain the ways that it is accessed. YES - API is LDAPS.

It should not provide generalised database query functionality. YES - it only proivdes the subset of LDAP functionality necessary for authentication.

Its API should have password salting and hashing built in. NO - hashed but needs salting&scrypt.

Its API should throttle access with some sort of algorithm designed to prevent downloads of large quantities of user data. NO - todo.

It should encrypt data internally. YES (hashed not encrypted).

It should communicate only over encrypted connections. YES.

It should be distributed. YES.

It should not be run on any web server, should run "behind the scenes" and be accessible only via its API. YES.

It should include triggers and alerts based on uncommon access patterns or recognised nefarious access patterns. NO - todo.

It should have no other purpose. YES.