THINK FIRST·CODE LATER

← All labs

Multilevel security: Bell–LaPadula and Biba

Problem

Input: the model (BLP or BIBA), the number of levels and their names from lowest to highest, then lines subject NAME LEVEL, object NAME LEVEL, and requests SUBJECT read|write OBJECT.

Rules:

  • BLP (confidentiality): read allowed iff level(subject) ≥ level(object) ("no read up"); write allowed iff level(subject) ≤ level(object) ("no write down").
  • BIBA (integrity): read allowed iff level(subject) ≤ level(object) ("no read down"); write allowed iff level(subject) ≥ level(object) ("no write up").

Print analyst (Confidential) read exams (Secret): DENIED by no read up or … ALLOWED, and finally BLP: a of n requests allowed.

Write it here or in your IDE, then paste it. Compile and test it yourself before comparing. Your code stays in your browser — it is never sent to or stored on the server.