Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why I'm using NanoIDs for my database keys (brockherion.dev)
2 points by busymom0 51 days ago | hide | past | favorite | 2 comments


"...Changing that ID in a request to your API could fetch data that you’re not supposed to have access to...." By definition, the data that "you" are not supposed to have access to should be in a different table. Every time a business object goes through a process step, it becomes a different type, with a different set of permissions.


here’s a heretical thought: you should have some idea what uniquely distinguishes a entity in your database before you give it a key.

Because if the only thing is a arbitrary number you probably should just be using a symbol table instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: