News for hackers. Stuff that matters.
Re:How Silicon Valley destroyed Parler by swat535 on Tuesday January 12, 2021 @08:31PM (#25756793)
Off topic but what's wrong with using auto-increment?
Re:How Silicon Valley destroyed Parler by grzm on Tuesday January 12, 2021 @08:37PM (#25756836)
The most common criticism I'm aware of is that it leaks information about your system and its users. For example, you can gauge growth by how fast ids grow, and relative age of accounts. The former is potentially financially valuable. Often the latter is exposed properly through the UI, but the that can be a choice, rather than exposed due to an implementation detail. There are likely other criticisms as well.
Re:How Silicon Valley destroyed Parler by dralley on Tuesday January 12, 2021 @09:40PM (#25757325)
Re:How Silicon Valley destroyed Parler by grzm on Tuesday January 12, 2021 @09:44PM (#25757353)
That's a great example, isn't it? :)
Re:How Silicon Valley destroyed Parler by jfim on Tuesday January 12, 2021 @08:45PM (#25756914)
It makes it easy to crawl. If you're trying to get all of the user profiles for a given website and all of the URLs look like foo.com/user/123 it's easy to download all of them, whereas foo.com/user/1234-abcdef1234-1234 is much harder to guess.
Re:How Silicon Valley destroyed Parler by sonofhans on Tuesday January 12, 2021 @08:40PM (#25756865)
Auto-incrementing ids makes guessing subsequent or previous items trivial. There was a post here a few weeks ago about it -- https://news.ycombinator.com/item?id=25244872
Re:How Silicon Valley destroyed Parler by slavik81 on Tuesday January 12, 2021 @10:07PM (#25757524)
That doesn't seem like it would matter much on its own. You can pretty easily guess HN item IDs, too. e.g. https://news.ycombinator.com/item?id=25244871 and https://news.ycombinator.com/item?id=25244873
Re:How Silicon Valley destroyed Parler by sonofhans on Wednesday January 13, 2021 @12:15AM (#25758480)
Of course you’re right — nothing matters on its own. It’s one possible factor in a defense in depth strategy —- https://en.wikipedia.org/wiki/Defense_in_depth_(computing)
Re:How Silicon Valley destroyed Parler by h0l0cube on Tuesday January 12, 2021 @11:03PM (#25757936)
There's nothing particularly wrong about it. Twitter does something like this with a bit of timing thrown in the mix, which is why some smart-asses have made self-referencing tweets:

https://www.spinellis.gr/blog/20090805/

I believe they also for a long time had a public API^.. and I'm pretty sure they soft-delete posts (bonus that they could revive the tweet down the track if it was a 'mistake'). I don't think the Twitter team are amateurs though.

Having monotonically increasing IDs for non-distributed systems removes the possibility of duplicate IDs. In distributed systems ID conflicts are unavoidable, and you might have less conflicts if you generate random IDs, as well as it becomes difficult for an attacker to guess IDs.

^ likely it would have been rate-limited, which isn't a problem if you've got a large pool of users you can authenticate with

Re:How Silicon Valley destroyed Parler by SideburnsOfDoom on Wednesday January 13, 2021 @05:59AM (#25760520)
> Having monotonically increasing IDs for non-distributed systems removes the possibility of duplicate IDs.

In parler's case, having monotonically increasing ID typed as signed 32-bit integer _guaranteed_ duplicate IDs once they reached 2.1 billion unique items. This is well-known failure mode, and yet it took them by surprise.

https://twitter.com/adrianbowyer/status/1348761214428569602

Re:How Silicon Valley destroyed Parler by h0l0cube on Wednesday January 13, 2021 @08:49AM (#25761896)
Okay.. I concede, 32-bit is a rookie mistake. I didn't know that. Wow. Did they not account for millions of daily active users in a Twitter competitor...
Re:How Silicon Valley destroyed Parler by SideburnsOfDoom on Wednesday January 13, 2021 @04:14AM (#25759831)
> what's wrong with using auto-increment?

1) It invites resource enumeration attack

https://www.cequence.ai/use-cases/enumeration-attacks/

https://owasp.org/www-community/attacks/Forced_browsing

2) they ran out of ints. Stop me if you think you've heard this one before

https://twitter.com/sarahmei/status/1348474968527360001

https://twitter.com/adrianbowyer/status/1348761214428569602

Re:How Silicon Valley destroyed Parler by echelon on Tuesday January 12, 2021 @09:29PM (#25757231)
You can use auto-increment IDs as your internal keys, but don't expose them as external identifiers.