Comparison
Column-level securityvsPrinciple of least privilege
Column-level security
everyone can query the customer table and only three people can select the date-of-birth column.
Access control applied per column rather than per table. It is what makes broad access to a wide table safe, and it pairs naturally with classification tags so the policy is written once against the tag. Its practical limitation is that derived tables do not inherit it — a model selecting a protected column into a new table has quietly laundered the control unless the platform propagates tags.
Full entry →Principle of least privilege
you give the service a database user that can only read the two tables it needs, rather than the one that can drop everything.
Granting only the permissions needed for the task, for as long as they are needed. It does not prevent compromise; it bounds what a compromise reaches. The common violations are boring and universal: an admin credential in CI, a service account with wildcard permissions, a token that never expires.
Full entry →