Remix.run Logo
charcircuit 19 hours ago

Why is deleting the whole database a valid operation? The system should make that impossible.

Tangurena2 16 hours ago | parent | next [-]

Hackers would do it from the operating system level - stop the database executable, then delete the files used to store the database. Likewise, many organizations store the backups on a network share, where a hacker could delete the files.

Permissions inside the database should be segregated. The credential used by the webserver should not have enough permissions to DROP DATABASE. Just the appropriate selects/updates/inserts.

Likewise, if you are storing backups on the same network (as opposed to a tape backup), network permissions should allow writes/creates but not deletes.

daneel_w 19 hours ago | parent | prev [-]

Why is deleting a row in a table a valid operation? Why is deleting a table in a schema a valid operation? Most likely they had full privileged access to the database.

charcircuit 18 hours ago | parent [-]

>had full privileged access to the database

Why does full access include the ability to delete read only data that should never ever be deleted for the rest of time?

It's like building a self destruct button that ignites the physical records. It's an unnecessary risk to make such a dangerous thing.

daneel_w 17 hours ago | parent [-]

Well, you don't understand databases. Or software.

charcircuit 16 hours ago | parent [-]

I understand that many software projects don't understand the principle of least privilege and make god users that can do anything including deleting everything.