Defense in depth and least privilege
Two complementary principles
Defense in depth means combining safeguards so that one failure does not necessarily defeat every protection. Least privilege means granting a person or process only the access needed for its assigned work. Together these principles reduce opportunities for mistakes and limit potential harm. They do not guarantee perfect security; controls can share weaknesses or be poorly enforced.
Example: assign bookstore permissions
Assume each worker has a distinct account and defined duties. The catalog editor may edit book descriptions, not delivery addresses or refund records. The shipping worker may read delivery details for assigned orders, not change prices. The finance worker may approve refunds under the store’s rules, not edit the catalog. All three may read the public catalog. Unlisted actions are denied in this simplified policy. Real stores must define exceptions and review permissions when duties change.
Example: build layers
The bookstore checks staff identity at sign-in, checks the allowed action at each relevant request, records sensitive changes and maintains tested backups. If a catalog editor’s account is misused, enforced restrictions can limit which records are affected. Protected change records can support investigation, and a tested backup can support recovery. Backups cannot undo disclosure of information. A sign-in check and an action check have different purposes.
Test intended behavior, not just configuration
In a fictional policy review, an assigned shipping worker reading an assigned delivery address should be allowed. The same worker trying to edit a book description should be denied. The policy also denies reading unassigned delivery addresses. Checking both allowed and denied behavior helps reveal excessive restrictions and missing restrictions. This paper exercise tests a model only; an actual application needs implementation and authorized verification.
Practice: choose permissions and safeguards
A fictional library has a borrowing-desk worker and a catalog editor. Give each the minimum permissions needed to lend books or change book descriptions. Propose one preventive control, one way to detect incorrect changes and one recovery control. Write one expected allow case and one expected deny case. In the next chapter, learn how to define permission and scope before any real assessment.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Defense in depth and least privilege — Knowledge check
Apply the lesson concepts to fictional situations.
Which permission fits the catalog editor’s stated task?
Why combine identity checks and action-level permission checks?
Which test should the simplified bookstore policy deny?
Which safeguard helps recover data but cannot reverse a disclosure?
Why should you test an allowed action as well as a denied action?