jargon

Comparison

Defence in depthvsPrinciple of least privilege

Defence in depth

the validation was bypassed and the database constraint caught it anyway.

Assuming any single control will eventually fail and putting independent ones behind it. It applies well beyond security: a rate limit at the gateway and in the service, validation at the edge and in the schema, a review gate and a canary. The requirement people miss is independence — three checks that all read the same misconfigured flag are one control wearing three hats.

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 →

Related comparisons