Cyberlium

Cybersecurity › Module 3 › Lesson 1

BeginnerModule 3Lesson 1/6

Authentication vs. Authorization

Who you are vs what you may do

15 min+24 XP3 quiz
Module progress1 of 6

Opening

The nightclub has two different jobs

People mix up Authentication and Authorization constantly — even in IT tickets and security incident reports. That mix-up is not a vocabulary nitpick. It causes real design failures: apps that prove who you are, then quietly trust every URL parameter you type afterward. Authentication is the bouncer checking your ID: "Are you who you claim to be?" Authorization is the VIP wristband: "Now that we know who you are, which rooms may you enter?" Module 2 taught Confidentiality as a CIA pillar. Access control is how Confidentiality is enforced in practice. Get AuthN vs AuthZ wrong, and the strongest password on earth still will not stop a logged-in user from reading someone else's payroll row.

1. Authentication: prove identity

Authentication (AuthN) answers one question: Who are you? You claim an identity — a username, email address, employee ID, device certificate, or service account name — then prove that claim with one or more factors. Proof can be a password, a one-time code from an authenticator, a hardware security key, a biometric unlock, or a cryptographic assertion from a trusted identity provider. Until proof succeeds, the system should treat you as a stranger.

A successful login means the system accepts the identity for this session. It does not mean you may do anything interesting yet. Think of AuthN as issuing a nametag. The nametag says "Alice." It does not say "Alice may approve wire transfers." That second decision is Authorization, and it must be checked again on every sensitive action — not only at the front door.

  • Claim

    I am [email protected] (or account #48291). Claims are cheap; anyone can type a name.

  • Proof

    Password, authenticator code, biometric, hardware key, or federated login assertion. Proof is what makes the claim believable.

  • Result

    System accepts the identity — you are "logged in." Permissions are still undecided. AuthN success ≠ AuthZ success.

2. Authorization: enforce permissions

Authorization (AuthZ) answers: What are you allowed to do? After login, every read, write, delete, transfer, export, or admin action should be checked against a policy. Policies may be role-based (RBAC: "professors may grade"), attribute-based (ABAC: "only owners of this record"), or a mix. The important idea for learners: the server — not the UI — must enforce the rule.

Greyed-out buttons are helpful UX, not security. A determined user can still call the API, change a URL, or replay a request. Secure systems authorize on the server for every sensitive object and every sensitive verb. "Can this session read object 1002?" is a different question from "Did this session log in successfully?"

  • Same login, different rights

    Intern and CFO both authenticate to the company portal. Only the CFO is authorized to open payroll. Same AuthN path; different AuthZ outcomes.

  • Object-level checks

    You may view your own bank account. You must not view account IDs that belong to other people — even if you guess or edit the number in the address bar.

  • Action-level checks

    You may read a document but not delete it. You may draft a payment but not approve it. AuthZ is about verbs as well as objects.

3. How the two controls chain in real apps

Healthy access control is a pipeline. First the identity provider authenticates you and issues a session token or cookie. Then each application request presents that session. Then the app (or API gateway, or policy engine) looks up who the session represents and asks whether that identity may perform this action on this resource. Fail any step → deny by default.

This pipeline is why "I logged in, so I should see everything" is a dangerous mental model. Login proves identity. Policies decide scope. When organizations skip the second step — or implement it only in the frontend — they create Broken Access Control, consistently ranked among the most damaging web application risks. Conceptual awareness only: never probe live systems you do not own or have written permission to test.

4. Wrong vs right: the IDOR failure mode

Worked failure mode — Broken Access Control (often discussed as IDOR: Insecure Direct Object Reference). Conceptual teaching only — never change IDs on real systems to peek at other people's data.

  • Wrong

    User logs in correctly (AuthN OK). App shows /account/1001. User changes the number in the URL to /account/1002 and the server returns another customer's balance with no ownership check. The nametag was real; the wristband check never happened. AuthZ failed.

  • Right

    Server ignores "trust the URL." It loads the session's authenticated user ID, then asks: "Is this session allowed to read object 1002?" If the object is not owned by (or shared with) that user — Access Denied. Strong AuthN plus object-level AuthZ on every sensitive read and write. UI hiding is optional; server enforcement is mandatory.

5. Practical: map AuthN vs AuthZ on paper

Use this checklist on any app you already use (email, school portal, bank, cloud drive). You are observing your own access boundaries — not attacking anything, not fuzzing IDs, not testing neighbors' accounts. The goal is vocabulary that sticks when you later design or review systems.

AuthN / AuthZ mapping (your accounts only)

# Fill for ONE app you already use — observation only
App name: ____________________

AUTHENTICATION (who am I?)
- What proves identity?  password / MFA / biometric / passkey / other: _______
- What happens if proof fails?  locked out / retry / reset flow
- Session clue: cookie, "signed in as", device trust prompt?

AUTHORIZATION (what may I do?)
- Actions I CAN do: ________________________________
- Actions blocked (Access Denied / greyed out / admin-only): ______
- Different roles you know exist (student vs teacher, member vs admin): ______

# Mental rule (memorize)
AuthN first  →  then AuthZ on EVERY sensitive action
Nametag ≠ wristband
UI grey-out ≠ server enforcement

# HARD STOP — ethical boundary
Do NOT change account numbers, user IDs, or document IDs in URLs
to see if another person's data appears. That is unauthorized testing
on systems you do not own. Learn the failure mode from this lesson —
do not reproduce it against live services.

Mission: spot one AuthZ boundary

Open one account you already own (school portal, cloud drive, or banking). Find one place the UI refuses an action (greyed button, Access Denied, or "admins only"). Write one sentence: "Authentication let me in; Authorization blocked ___." Do not change URLs or IDs to probe other people's data.

Stuck? Ask Cyberlium AI Mentor

If AuthN vs AuthZ still blur together, open Cyberlium AI Mentor and ask for a hint — not the full essay. Try: "Hint only: nightclub ID check vs VIP wristband — which is authorization?" Or: "Hint only: logged in but Access Denied — AuthN or AuthZ failed?" Reason first; Mentor second.

You now separate "prove who you are" from "decide what you may do," including why object-level checks matter after login and why broken access control is so dangerous. Next — Password Security — we harden the most common AuthN factor humans still get wrong: length, uniqueness, and the password manager vault.

Knowledge Check

1

APPLY: You log into the student portal with your password. You tap "Professor Gradebook" and see Access Denied. Which control blocked you?

Multiple choice

Knowledge Check

2

APPLY: A banking app lets any logged-in user open /accounts/48291 by editing the account number in the address bar, even when 48291 is not theirs. What failed?

Multiple choice

Knowledge Check

3

APPLY: True or False: A system can correctly decide file permissions before it verifies the user's identity.

True or False

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)