SQL Privileges And Access Control

Guides the standard SQL access-control model — `GRANT` adds privileges, `REVOKE` removes them, roles are the grant targets (a role is a user or a group), and access is default-deny so every privilege must be explicitly granted. Drives toward least privilege — the application connects as a dedicated login role holding ONLY the privileges it needs (`SELECT/INSERT/UPDATE/DELETE` on specific tables), never as a superuser (which bypasses all permission checks) and never with `GRANT ALL` broadly. Auto-invokes when writing or editing `GRANT`/`REVOKE`/`CREATE ROLE`/`CREATE USER`, designing database user/role setup, deciding which credentials an application connects with, or on "least privilege" / "who can access this" / "set up a database user" requests.

ctoth 1435f66 3 files · 26.3 KB Updated

File contents

ctoth/sql-skills-plugin/tree/main/plugins/sql/skills/sql-privileges-and-access-control commit 1435f6649c

Frequently asked questions

npx skillmds@latest add ctoth/sql-privileges-and-access-control