Sequel-Ace / Sequel-Ace

MySQL/MariaDB database management for macOS
https://sequel-ace.com
Other
6.54k stars 247 forks source link

Protection Levels for Database #2027

Open d0sse opened 1 week ago

d0sse commented 1 week ago

Implement Protection Levels for Database

Introduce multiple protection levels to enhance security and control over database operations in SEQUEL Ace Editor. The proposed protection levels are:

  1. Read-Only: Users can only execute SELECT queries.
  2. Read-and-Write with Prompt Password: Users can execute all queries but need to enter a password for any write operations (INSERT, UPDATE, DELETE).
  3. Read-and-Write: Users can execute all queries without additional prompts.

User Interface:

Benefits:

Jason-Morcos commented 1 week ago

Question - why not do this by creating multiple user accounts on the database with varying appropriate permissions? You can then set up different connections with each account and toggle between them as necessary. This is what I personally do to ensure I can't accidentally write to prod. In this case, implementing this feature feels like it's re-implementing something mysql already has natively

samuelbradshaw commented 1 week ago

Related: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql