by jandrewrogers · 2y ago · 0 comments
If you are going to add semantic structure to an identifier, which is frequently useful and a good idea, best practice is usually to encrypt it before sending it to the external world. Encrypting a UUID-like structure is approximately free on modern computers.
The essense of a thing still changes afer it's meaningful identifier was assigned, yet it's a problem to change a things identifier.
The identifier should be nothing other than an identifier. It's properties are both infinite and mutable.
As a baby admin I had the genius idea to name servers after the state they were in once we started renting racks scattered around the country. Completely stupid. oh3 and pa6 etc continued to exist as entities long after they had been migrated or failed-over to their hot backups in other locations.
I'm thick, so I still didn't get it when I realized the state names were wrong, and so the next plan was hostnames/cnames based on roles instead of physical location. Exactly the same problem.
Super simple baby example, and applies the same to everything else. It wasn't only stupid for that one case and reasonable in other cases. It's the same wrong in all cases.
Been there. Problem is, now you can’t rotate your keys without breaking users and everyone and everything needs access to this key. This means the key is going to leak sooner or later. Also, someone will inevitably create an endpoint that does not encrypt, nay obfuscate, the identifier. Might as well not have bothered to obfuscate the ID to begin with.
Yeah, although encryption is basically a way of hiding semantics from the external world (or, everyone else but whoever generates them) no?