The idea: the labels decide, not the owner

In discretionary access control (DAC) the owner of a file decides who may open it, with an access control list (ACL) or with rwx permission bits. In mandatory access control (MAC) the system decides. Every subject (a user, or a program running for that user) carries a level. Every object (a file) carries a level. A reference monitor compares the two labels on every read and every write. No owner can change the labels or switch the rule off.

The page has three levels, 3 above 2 above 1, three subjects (carol 3, alice 2, mallory 1) and three files (codes.txt 3, plan.txt 2, notes.txt 1). Two classic models give the levels a meaning. Bell-LaPadula protects confidentiality: the levels say how secret the data is. Biba protects integrity: the levels say how much the data can be trusted.

Two panels with three level bands each and alice on level 2. Left, Bell-LaPadula: on codes.txt, level 3, read is denied and write is allowed; on plan.txt, level 2, both are allowed; on notes.txt, level 1, read is allowed and write is denied; data may only flow up. Right, Biba: the opposite, read allowed and write denied on level 3, read denied and write allowed on level 1; data may only flow down.
What alice (level 2) may do. Biba is Bell-LaPadula turned upside down.

The small chips under each box show what data it holds, by the level the data came from. An allowed read copies the file's chips to the subject. An allowed write copies the subject's chips to the file, because a program may write anything it has read. A chip marked ↓ sits below its own level: a leak. A chip marked ↑ sits above its own level: taint.

Bell-LaPadula: no read up, no write down

Write L(x) for the level of x. Bell-LaPadula (1973) has two mandatory rules.

  • The simple security property: a subject s may read an object o only if L(s) ≥ L(o). This is no read up. alice (2) may read notes.txt (1), but not codes.txt (3) (Demo: Bell-LaPadula, read down and read up).
  • The *-property ("star property"): s may write o only if L(s) ≤ L(o). This is no write down. alice may write into codes.txt, a file she cannot read, but not into notes.txt (Demo: Bell-LaPadula, write up and write down).

No read up is the obvious rule. No write down is the clever one. alice is cleared for Secret data, so anything she writes might contain it, and a level-1 file can be read by level-1 subjects. With both rules, data can move only upwards, so the leak counter stays at 0 whatever the subjects do.

The model also keeps the owner's ACL as a third rule, the discretionary security property. An access must pass both checks. That is why the monitor on the page has two rows.

The Trojan horse that DAC cannot stop

mallory (level 1) wants plan.txt (level 2). Its ACL does not list her, so a direct read is denied. She gives alice a useful-looking program with hidden extra code: a Trojan horse. When alice runs it, the program acts as alice and has all of alice's rights. It reads plan.txt, which alice may read, and writes a copy into notes.txt, a file mallory owns and has opened for alice to write. Then mallory reads her own file.

Two rows with the same chain: plan.txt, Secret, is read by alice's program, which writes into notes.txt, Unclassified, which mallory reads. Top row, DAC only: read, write and read are all allowed, the plan reaches mallory, a leak. Bottom row, Bell-LaPadula: the write from level 2 down to level 1 is denied, notes.txt stays clean.
Under DAC all three steps are legal. Bell-LaPadula denies the middle one, the write down.

Under DAC every step is on an ACL, yet the plan has leaked: 2 leaks on the page, one chip in notes.txt and one held by mallory (Demo: Trojan horse under DAC, the leak). An ACL controls who opens a file. It says nothing about where the data goes next, and it cannot tell alice from a program that only pretends to work for her.

Under Bell-LaPadula the program still reads plan.txt. But its write into notes.txt goes from level 2 down to level 1, so the *-property denies it. mallory reads notes.txt and finds only her own data: 0 leaks (Demo: same Trojan horse under Bell-LaPadula). The rule does not need to know that the program is hostile. It looks only at the labels.

Biba: the same rules upside down

Secrecy asks "who may learn this?". Integrity asks "who may change this, and what may it be built from?". Biba (1977) uses integrity levels I(x): high means trusted. Bad data must not flow into trusted places, so the two rules flip.

Bell-LaPadula (secrecy)Biba (integrity)
read allowed ifL(s) ≥ L(o): no read upI(s) ≤ I(o): no read down
write allowed ifL(s) ≤ L(o): no write downI(s) ≥ I(o): no write up
data may flowup onlydown only
stopsleaks ↓taint ↑
does not stoptaint ↑leaks ↓

No read down: alice (Medium) may not read notes.txt (Low), because untrusted input could mislead her. No write up: she may not write into codes.txt (High), because she could corrupt it (Demo: Biba, the rules upside down).

One model, one property

Each model guards one thing only. Under Bell-LaPadula, mallory writes notes.txt, alice reads it and then writes into codes.txt. Every step is legal, and level-1 data now sits inside the level-3 file: taint 3, leaks 0 (Demo: Bell-LaPadula lets bad data flow up). Biba denies the last two steps of the same chain: taint 0 (Demo: Biba blocks the same chain). But in the Biba demo alice freely copies level-2 data down into notes.txt, which is a leak.

Using both models with the same levels leaves only reads and writes on the subject's own level. Real systems use separate labels for secrecy and integrity, or pick one. SELinux has a multi-level security (MLS) policy in the Bell-LaPadula style. Windows gives every process and object an integrity level and by default blocks writes from a lower level to a higher one, which is Biba's no write up. That is how a sandboxed browser tab is kept from changing your files. Who gets which role or attribute is a different question, see RBAC vs ABAC; what goes wrong when the checks are missing in a web app is on OWASP: broken access control.

See also SQL GRANT and REVOKE in MariaDB for discretionary access control, where the holder of a privilege decides who else gets it.

See also STRIDE Threat Modelling, which finds disclosure and tampering threats on every element of a web app's data-flow diagram at design time.

What the page leaves out

Real labels are a level plus a set of categories (compartments such as NUCLEAR or CRYPTO), and "≥" becomes "dominates" in a lattice; the page uses three plain levels. Bell-LaPadula's tranquility rule (labels do not change while in use), trusted subjects that may write down to declassify data, a subject's current level versus its maximum level, and the stricter "write only at your own level" variant are not shown. Biba also has low-water-mark and ring policies; only strict integrity is drawn. Covert channels, where a high process signals a low one through timing or shared resources without any read or write, are outside both models. Clark-Wilson and Chinese Wall are other classic models that this page does not cover.

On the mind map

Open the Web & Security mind mapWeb & SecurityCrypto building blocks: keys, hashes, signaturesCrypto building blocksStoring passwords: slow salted hash, never plaintextStoring passwordsBrowser rules: which request carries whatBrowser rulesRequest attacks: trick a browser or a serverRequest attacksLogin & identity: prove who you areLogin & identityOWASP Top 10 2025: common flaws, then the fixOWASP Top 10 2025OWASP: supply chain & ops: dependencies, logs and error pathsOWASP: supply chain & opsOAuth 2.0 with PKCEOAuth 2.0 with PKCEapp gets a scoped token, not the passwordJWT vs session cookieJWT vs session cookieJWT: signed, stateless, hard to revokeKerberosKerberosTGT from the KDC, then a ticket per serviceMutual TLSMutual TLSboth sides show and prove a certificateEmail SPF, DKIM, DMARCEmail SPF, DKIM, DMARCDMARC: SPF or DKIM must align with From:TOTP two-factor codesTOTP two-factor codesHMAC(secret, time/30s) → 6 digitsRBAC vs ABACRBAC vs ABACRoles grant rights; attributes decide liveBell-LaPadula and BibaNo read up, no write down; Biba flips itGRANT and REVOKEGRANT and REVOKEMariaDB REVOKE never cascadesOpen the Web & Security mind mapWeb & Securityprove who you areLogin & identityOAuth 2.0 with PKCEOAuth 2.0 with PKCEapp gets a scoped token, not the passwordJWT vs session cookieJWT vs session cookieJWT: signed, stateless, hard to revokeKerberosKerberosTGT from the KDC, then a ticket per serviceMutual TLSMutual TLSboth sides show and prove a certificateEmail SPF, DKIM, DMARCEmail SPF, DKIM, DMARCDMARC: SPF or DKIM must align with From:TOTP two-factor codesTOTP two-factor codesHMAC(secret, time/30s) → 6 digitsRBAC vs ABACRBAC vs ABACRoles grant rights; attributes decide liveBell-LaPadula and BibaNo read up, no write down; Biba flips itGRANT and REVOKEGRANT and REVOKEMariaDB REVOKE never cascades
This page on the Web & Security mind map · 37 pages in 7 branches · open it to see the whole map and test yourself in recall mode.