LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
Cybersecurity foundations
LESSON 2 OF 3 · ABOUT 14 MINUTES + EXERCISE

What do authentication, least privilege, and defense in depth protect?

THE IDEA

What it is

Authentication establishes identity; authorization limits allowed actions. Least privilege gives only the access needed for the task. Defense in depth uses complementary controls so a failure at one boundary does not automatically expose everything.

Why you need it

A strong password does not prevent a valid user from exploiting excessive permissions. Controls should cover different failure modes rather than simply repeat the same check.

How it works

  1. Identify the user or service requesting access.
  2. Restrict its capabilities and resource scope.
  3. Protect credentials and monitor sensitive actions.
  4. Reassess access as roles, sessions, and needs change.
Policy sketch

Permissions for a reporting service

Identity: reporting-worker
Allowed: read approved reporting views
Denied: change users, issue refunds, read credential tables
Credential: injected at runtime, rotated under policy
Evidence: access-denial tests and audited data exports

A service identity should not inherit broad administrator privileges merely because it runs on the backend. The precise permissions depend on the actual work it performs.

Good practices and why

  • Use separate identities for different workloads and review permissions against current needs.
  • Combine identity controls with resource authorization and useful audit evidence.

Common mistakes

  • Assuming MFA prevents every form of session theft.
  • Treating encryption as a replacement for access policy.
GUIDED IMPLEMENTATION

Try it yourself

Create a permission matrix for customer, support, and reporting-worker identities. Explain two denials that should remain even after successful authentication.

What a successful result looks like

Each identity receives only the actions and resource scope it needs, and sensitive exceptions are explicit.

0 / 6000 characters · Saved on this device. Do not include passwords or private data.

Check your understanding

Does encrypting a database replace authorization checks in the application?

Answer the understanding check correctly to record exercise completion.

PUT THE IDEA UNDER PRESSURE

Related interview practice

These scenarios add constraints and follow-up questions to the concepts you just learned.

Further reading

Selected primary references · reviewed 2026-10-09. Examples are educational; use your framework’s documented integration guidance when building a deployed system.

AlifBay Prep