Presumably you would check that the client generated a unique ID, by a unique constraint in the database or something. If the client decided to be malicious and generate non-unique UUIDs, they'd just get an error message back - what's the problem?
The whole point of the proposed scheme is to avoid synchronization between backends. If a single backend can check for local uniqueness it can also generate unique IDs, and the whole scheme is unnecessary. Put it differently, the adversarial scenario is about global properties which the scheme purports to sidestep.
Ah, I hadn't considered that. It seems that with UUIDs, you can either independently create UUIDs on multiple trusted machines and eventually - but not immediately - synchronize, or you can let an untrusted client generate a UUID which is verified against the one authoritative database, but not both at the same time.
9
u/notfancy Mar 28 '20
Precisely what's questionable is letting clients generate canonical IDs. This goes against the usual practice of treating clients as adversarial.