▲ | 8organicbits 8 hours ago | |
You're mixing a couple things. The 32 bit random occurs in the Python implementation, which uses a millisecond counter. The numbers you provided are suspicious, but seem quite feasible to attack. 1M IDs in 4B means each guess has ~ 1-in-4000 chance. You can make 4000 requests in an hour at a one-per-second rate. A successful attack can guess one ID, it doesn't need to enumerate all of them. | ||
▲ | bearjaws 5 hours ago | parent [-] | |
Ah I was looking at the pg_uuidv7 python package. The backwards compatibility is a wild trade off. Either way my comment was hyperbole, but the concept is the same, 10000 records per millisecond and you get the point. For 99.999% of SQL use cases UUIDv7 is good. I only advocate for UUID so much because 3 separate times in my career I have been the one to have to add UUIDs so we don't leak number of patients, let users scrape the site by just incrementing (amongst other protections). So much easier to just UUID everything. |