I've got a CS problem: let's say you're writing a networked service that wants to allow clients to create posts. In a naive centralized system, you'd generate UUID4s (or maybe UUID7s, if you're nasty) on the back end. But, for idempotence, you really want the *client* to generate the IDs, so that it can safely resubmit any requests. But, clients, being clients, are untrusted, and you don't want malicious clients to be able to create ID collisions.
Is there a best practice for this scenario?