Information Security

02

Security Architecture

X.800 · Enterprise Architecture · Security Policy · Risk Management · Incidents & Continuity

Fall 2026 · Amirkabir University of Technology
@1995parham

Why a Standard Vocabulary?

  • Lecture 1 ended on: name the property, name the threat, then pick the mechanism. Two engineers can still mean different things by "the channel is authenticated"
  • ITU-T X.800 — the Security Architecture for OSI, published 1991, identical in substance to ISO 7498-2
  • Lecture 1's passive and active attacks were already its words. Old, and still how requirements get written down: a requirement names a service, a design names a mechanism

The value is not the document. It is that everybody agrees on the service promised and the mechanism that delivers it.

Three Definitions

Security attackA threat someone carried out — lecture 1's word, unchanged
Security mechanismA process designed to detect, prevent or recover from an attack
Security serviceA capability that counters attacks, built from one or more mechanisms
  • A service is what you promise; a mechanism is how you deliver it
  • "Confidentiality" is a service. "AES-256-GCM" is a mechanism. Never write the second where the first belongs
  • A control is a mechanism put in place in a real system — the word risk management uses

The Five Service Categories

AuthenticationThe other side is who it claims (peer entity); the data came from who it claims (data origin)
Access controlPrevent unauthorized use of a resource — lecture 4
Data confidentialityProtect from disclosure — including what traffic patterns reveal
Data integrityThe data arrives unchanged, or the change is detected
Non-repudiationOf origin, or of delivery — neither side can deny it happened

Availability is treated as a property of the system in X.800 rather than a service of its own — the one place the standard shows its age.

Specific Mechanisms

Eight, each sitting at a particular protocol layer:

  • Encipherment — the maths of lecture 3
  • Digital signature — unforgeable, and verifiable by anyone
  • Access control — enforcing rights
  • Data integrity — detecting modification
  • Authentication exchange — a handshake that proves identity
  • Traffic padding — filler, so the volume says nothing
  • Routing control — choose a path you trust
  • Notarization — a third party vouches for the exchange

Pervasive Mechanisms

Five more that belong to no layer, because they apply to the whole system:

  • Trusted functionality — the part that is correct by assumption, so keep it small
  • Security labels — the resource carries its own sensitivity
  • Event detection — noticing that something security-relevant happened
  • Security audit trail — the record you read afterwards
  • Security recovery — what the system does in response

The last three are lecture 1's detect · respond · recover, thirty years earlier.

Services Are Built From Mechanisms

EncipherSignatureIntegrityAuth. exch.Notary
Peer authentication✔✔✔
Data origin auth.✔✔
Confidentiality✔
Data integrity✔✔✔
Non-repudiation✔✔✔

Read the bottom row: non-repudiation is the one service encipherment cannot provide. Only a signature binds a message to a single party.

The Same Code, Two Mechanisms

Lecture 1's fix, read with this lecture's eyes:


	if roles[user] != "instructor" {              // access control
		log.Printf("DENIED grade %s=%d by %s", id, grade, user)
		http.Error(w, "forbidden", http.StatusForbidden)
		return
	}
	grades[id] = grade
	log.Printf("grade %s=%d by %s", id, grade, user)  // security audit trail
    
  • The if is a specific mechanism: access control, at one layer, in one place
  • The log is a pervasive one: the audit trail, which belongs to no layer and watches every request
  • The check protects data integrity by blocking unauthorized writes; the audit trail records decisions for detection and investigation
  • Nothing here helps the reader on the lab wifi. That service is confidentiality, its mechanism is encipherment, and it is lecture 3

From Vocabulary to Architecture

  • X.800 tells you what to call things. An enterprise security architecture says where they go in your organization
  • It answers, on one page each:
    • What are the assets, and who owns each one?
    • What are the zones, and what crosses between them?
    • Which control enforces which requirement, and who operates it?
  • Without it you get point solutions: nine products, six of them overlapping, and one gap nobody owns

You Cannot Protect What You Cannot List

  • Asset inventory is unglamorous and it is the control that fails first
  • Every breach report has the same sentence in it somewhere: "the server was not in the inventory"
  • Each asset needs an owner, a classification, and a location
    • Classification — public · internal · confidential · restricted
    • The label decides which controls apply, so it must be a short list
  • The CIS Controls, a priority list we meet below, put hardware and software inventory first and second — on purpose

Zones and Boundaries

Users, login layer, grade application and grade store in a row, separated by three boundaries: authenticate, authorize, record
  • A zone is a set of assets with the same trust level and the same policy. A boundary is where trust changes
  • Draw them once and the firewall rules and the audit scope fall out of the same picture — lecture 7 builds this properly

A Boundary You Have Walked Through

Passengers queuing at security checkpoint C in Wuhan Tianhe Airport Terminal 2.
Wuhan Tianhe Airport, Terminal 2 · Zheng Zhou · 2024 · CC BY-SA 4.0

The checkpoint controls passage between areas. In our grade service, the write endpoint is where permission must be checked.

Where would an unchecked side entrance appear in the application?

Layers of an Architecture

SABSA (Sherwood Applied Business Security Architecture) looks at one system from six views. Here, the grade service:

ContextualThe business. Trustworthy grades and timely transcripts
ConceptualThe architect. Students read; instructors enter grades
LogicalThe designer. Identity, write permission, and grade flows
PhysicalThe builder. Login integration, role check, HTTPS, logs
ComponentThe implementer. Server, database, and library versions
OperationalThe operator. Owners, denied-write alerts, restore tests

Requirements flow down. Assurance — evidence that each layer does its job — flows back up.

The Standards You Will Meet

ISO/IEC 27001The requirements for an ISMS (next section). What you get certified against
ISO/IEC 27002The control catalogue — guidance, not requirements
NIST CSFGovern · Identify · Protect · Detect · Respond · Recover
NIST SP 800-53A very large control catalogue, US federal in origin
CIS Controls18 controls in priority order. The best place to start
PCI DSSCard data. Not optional if you touch it

They overlap heavily. Pick one as the spine and map the others onto it.

Four Documents, Often Confused

We have assets and boundaries. Now state what is allowed and who owns the decision.

PolicyWhat must be true, and who says so. Short. Signed by management
StandardThe specific, mandatory way — "TLS 1.2 or above"
ProcedureThe steps, in order, for a human to follow
GuidelineAdvice. The only one that is optional
  • Here, a standard is an organization's mandatory rule; external standards such as ISO 27001 can inform those rules

What a Policy Has to Contain

  • Scope — who and what it binds
  • Statement — the requirement, in the imperative
  • Roles — who owns it, who enforces it, who may grant an exception
  • Consequences — what happens when it is broken
  • Review date — a policy with no review date is a historical document

If nothing in the organization would change when the policy is withdrawn, it was never a policy.

The ISMS Loop

  • An Information Security Management System is the machinery that keeps policy connected to reality
Plan, Do, Check, Act in a loop; ISO 27001 certifies the loop, not the controls

An organization can be certified and still be badly defended.

Why Policies Fail

  • Nobody read it. Forty pages, once, at onboarding
  • It forbids the job. If the rule blocks the work, the work wins — every time
  • No exception process. Without a legitimate way to say "not here", people take the illegitimate one
  • Never measured. An unaudited policy describes intentions, not systems

The best policy is the one that is enforced by a mechanism, so following it is the path of least resistance.

The Policy Is a Test

"Only the instructor of record may enter or change a grade." Written as a test, it runs on every commit:


func TestOnlyInstructorSetsGrade(t *testing.T) {
	req := httptest.NewRequest("POST", "/grade?id=4001&grade=20", nil)
	req.Header.Set("X-User", "4001") // a student
	rec := httptest.NewRecorder()
	setGrade(rec, req)
	if rec.Code != http.StatusForbidden {
		t.Fatalf("a student changed a grade: HTTP %d", rec.Code)
	}
}
    

$ go test ./...                 # lecture 1's first version
2026/10/06 01:01:24 grade 4001=20 by 4001
--- FAIL: TestOnlyInstructorSetsGrade (0.00s)
    main_test.go:16: a student changed a grade: HTTP 200
FAIL
FAIL	grades	0.111s
FAIL

$ go test -count=1 ./...        # with the check in place
ok  	grades	0.219s
    

A policy that runs on every commit cannot be forgotten.

You Cannot Fix Everything

  • Budgets are finite and vulnerabilities are not. Risk management is the discipline of deciding what not to fix
  • Risk appetite — how much risk the organization agrees to carry. Above it, act; below it, accept
Identify, analyse, evaluate, treat, monitor, and back to identify; risk equals likelihood times impact

The loop, from ISO 27005 and NIST SP 800-30.

Qualitative or Quantitative?

  • Qualitative — high / medium / low on a 5×5 matrix
    • Fast, needs no data, and everyone can join in
    • "High" is not a number — you cannot add two of them, or compare across teams
  • Quantitative — money per year
    • Comparable, and speaks the language of the budget holder
    • Needs frequency data that most organizations simply do not have
  • In practice: qualitative to triage, quantitative for the few decisions big enough to deserve it

Putting a Number On It

  • SLE — single loss expectancy = asset value × exposure factor (the fraction of the value one event destroys)
  • ARO — annualized rate of occurrence, how many times a year
  • ALE — annualized loss expectancy = SLE × ARO

The control is worth buying when it costs less than the ALE it removes. That is the entire argument, and it can be written down.

The Control That Does Not Pay


asset_value  = 400_000      # the customer database, if it leaks
exposure     = 0.35         # fraction of that value one breach destroys
frequency    = 0.40         # breaches per year, from history

sle = asset_value * exposure
ale = sle * frequency
    

SLE = 400,000 x 0.35      =      140,000
ALE = 140,000 x 0.4       =       56,000 per year
    

So Do We Buy It?

Assume the control cuts breach frequency by 75%, from 0.40 to 0.10 per year. Loss per breach stays the same.


ALE after control              =       14,000 per year
value of the control          =       42,000 per year
cost of the control           =       60,000 per year
net                           =      -18,000 per year
    
  • A control that works exactly as advertised, and it still loses money
  • Now the argument is about the inputs — is the database really worth 400,000? — which is the argument worth having

Four Things To Do With a Risk

AvoidStop doing the activity. Do not collect the data at all
ReduceApply a control. The one everyone thinks of first
TransferInsurance, or a contract. Moves the cost, never the duty
AcceptDecide it is tolerable — in writing, with a named owner
  • What is left after treatment is residual risk, and someone senior has to sign for it
  • Ignoring a risk is not accepting it. Accepting it has a signature on it

Is the Check Worth It?

Lecture 1 asked which failure is worst. Priced like the customer database:


check_cost = 1_000          # one developer-day, paid once
sle        = 5_000          # one hearing, one reissued transcript
aro        = 2              # assumed successful changes per year without control

ale = sle * aro
    

ALE               = 5,000 x 2  =   10,000 per year
check pays back in  36 days
    
  • Reduce: a day of work against 10,000 a year. The check is bought
  • The deadline-day outage costs one extended deadline a year. A second server costs more than that. Accept, in writing, with a name on it

What the Numbers Cannot Do

  • Frequency for a rare, deliberate event is not a frequency you can measure. An adversary is not weather
  • Reputational and human impact resist pricing, and get left out of the model precisely because they resist pricing
  • The model is a way to make assumptions explicit and arguable — not an oracle
  • A wrong estimate and an accepted risk end the same way: one day, it happens

All models are wrong, but some are useful. — George Box

When It Happens Anyway

  • Event — anything observable
  • Alert — an event worth a look
  • Incident — an event that actually harmed confidentiality, integrity or availability
NIST SP 800-61: preparation, detection and analysis, containment eradication and recovery, post-incident activity; the middle two loop, and lessons feed back into preparation

Preparation Is the Whole Game

  • A named team, reachable out of hours and out of band — if the corporate mail is compromised, do not run the response on corporate mail
  • Logs that already exist, centralized, with a retention long enough to cover the gap between breach and discovery
  • Decisions made in advance: who may disconnect production, who talks to the press, when law enforcement is called
  • Rehearsed. A tabletop exercise finds the missing phone number before the night you need it

Practice Before the Emergency

Officials coordinating a hurricane-response exercise in the Louisiana State Emergency Operations Center.
Louisiana emergency-response exercise · Robert Kaufmann / FEMA · 2006 · Public domain (US government)

A disaster-response exercise illustrates the same preparation problem: people, communications, and authority must work together before an incident.

If the grade service fails tonight, who can stop writes and who tells students?

Containment Is a Trade-Off

  • Pull the plug and you stop the damage — and destroy the evidence, and tell the attacker they are seen
  • Watch and learn and you keep the evidence — and the damage keeps running
  • Short-term containment stops the bleeding; long-term containment is the clean rebuild
  • Eradication means the cause is gone, not the symptom. Restoring a backup onto the same unpatched host is not eradication
  • Preserve volatile evidence first: memory, then disk, then logs

Afterwards

  • A post-incident review within two weeks, while people still remember
  • Blameless. The question is what let a mistake become an incident, not who made it
    • Blame produces silence, and silence is how the next one goes undetected
  • Output is a small number of dated actions with owners
  • Feed it back into the risk register — the written list of risks, owners and decisions. An incident is measured frequency data, the thing the model was missing

Business Continuity

  • Incident response saves the system. Business continuity keeps the organization running while the system is gone
  • It starts with a Business Impact Analysis: which processes matter, and how long can each be down
  • Two numbers per process, and they are not the same number
    • RTO — recovery time objective: how long until it is back
    • RPO — recovery point objective: how much data you can afford to lose
  • An RPO of one hour means backups every hour. The number is the requirement

Backups, Honestly

  • 3-2-1 — three copies, on two kinds of media, one of them off-site
  • At least one copy offline or immutable — ransomware looks for the backup server first, and it is usually reachable with the same credentials
  • An untested backup is not a backup. Restore one on a schedule, and time it — that measured time is your real RTO
  • Encrypt them. A backup tape is a copy of everything, in a box, in a van

Storage Is Only One Part of Recovery

Rows of tape cartridges inside a StorageTek tape library at NERSC.
StorageTek tape library at NERSC · D. Coetzee · 2011 · CC0 1.0

Tape makes the extra copy tangible. A cartridge inside a connected library is not automatically offline or off-site; recovery still needs a tested restore.

Could we restore the grade service within its RTO, and how much data would we lose?

The Day It Happens

Reconstruct lecture 1's incident, before the role check was deployed:


$ grep -v 'by parham' server.log
2026/10/06 01:01:23 grade 4001=20 by 4001
    
  • Alert: the nightly grep finds a grade changed by someone who is not the instructor
  • Incident: the instructor confirms it was not them. Freeze grade entry, copy the log before touching anything
  • Eradicate: deploy the check. The test is green. Recover: verify the original 12 against the instructor's grade record, then restore it. This log records the new value, not the old one
  • Afterwards: run the regression test on every commit. Record this incident with its date in the risk register and revisit the assumed annual frequency

One program, two lectures. Every idea had a line of code.

Names to Keep: X.800

Name the promise before choosing its implementation.

X.800 / ISO 7498-2The shared vocabulary for attacks, services, and mechanisms
Attack · service · mechanismWhat compromises security · what we promise · how we deliver it
AuthenticationPeer entity: who is communicating; data origin: who sent the data
Access controlPrevent unauthorized use of a resource
Data confidentialityPrevent disclosure, including information revealed by traffic flow
Data integrityProtect against unauthorized modification
Non-repudiationEvidence of origin or delivery
AvailabilityA system property; not a separate X.800 service category

Names to Keep: Mechanisms

Specific mechanisms act at a layer; pervasive mechanisms support the whole system.

Encipherment · digital signatureHide data · bind a message to a signer
Access control · data integrityEnforce rights · detect modification
Authentication exchangeEstablish identity through an exchange
Traffic padding · routing controlObscure traffic patterns · select an appropriate path
NotarizationA trusted third party supplies evidence
Trusted functionality · security labelsTrusted system functions · sensitivity markings
Event detection · security audit trail · security recoveryNotice events · record them · restore security

Names to Keep: Architecture

Locate the assets, trust boundaries, controls, and owners.

Enterprise security architectureConnect requirements to controls and the people operating them
Asset inventory · classificationList assets and owners; label public / internal / confidential / restricted
Zone · boundaryGroup assets under a common trust policy · control where trust changes
SABSASix architectural views of the same system
Contextual · conceptualBusiness needs · domains, trust, and principles
Logical · physicalServices, policies, and flows · mechanisms and protocols
Component · operationalProducts and versions · operation and measurement

Names to Keep: Standards

Use this as a reference map when a name appears again.

ISO/IEC 27001Requirements for an Information Security Management System (ISMS); certifiable
ISO/IEC 27002Guidance on information security controls
NIST CSFCybersecurity Framework: Govern · Identify · Protect · Detect · Respond · Recover
NIST SP 800-53Security and privacy control catalogue
CIS ControlsPrioritized controls; hardware and software inventories come first
PCI DSSPayment Card Industry Data Security Standard: card-data protection
ISO 27005 · NIST SP 800-30Risk-management guidance · risk-assessment guidance
NIST SP 800-61Incident-response guidance

Names to Keep: Policy

Turn a requirement into an owned, enforced, and reviewed rule.

PolicyWhat must be true, approved by management
Standard · procedure · guidelineMandatory specifics · ordered steps · optional advice
Scope · statementWho and what the policy covers · what it requires
Roles · consequences · review dateWho owns, enforces, and grants exceptions · response to violations · when to review
ISMSInformation Security Management System: keep policy connected to reality
Plan · Do · Check · ActAssess and choose · operate · measure · improve

Names to Keep: Risk

Make the assumptions explicit, then decide how to treat the risk.

Likelihood · impact · risk appetiteHow likely · how bad · how much risk the organization will tolerate
Identify · analyse · evaluate · treat · monitorFind risks · estimate them · compare · act · revisit
Qualitative · quantitativeRank risks with categories · estimate loss in money per year
Exposure factor · SLEFraction of asset value lost · single loss expectancy = value × exposure
ARO · ALEAnnualized rate of occurrence · annualized loss expectancy = SLE × ARO
Avoid · reduce · transfer · acceptStop the activity · apply controls · shift financial cost · approve the risk
Residual risk · risk registerRisk left after treatment · the record of risks, owners, decisions, and evidence

Names to Keep: Incidents & Continuity

Prepare to respond, and keep the organization working during recovery.

Event · alert · incidentAn observation · a signal to investigate · a security failure requiring response
Preparation · detection and analysisArrange team, logs, and authority · investigate and establish what happened
Containment · eradication · recoveryLimit damage · remove the cause · restore safe operation
Post-incident activity · tabletop exerciseReview and assign improvements · rehearse decisions before an emergency
Business continuity · BIAKeep business processes running · Business Impact Analysis identifies priorities
RTO · RPORecovery time objective: target downtime · recovery point objective: tolerable data loss
3-2-1 · offline · immutableThree copies, two media, one off-site · disconnected · protected from alteration

Check Yourself

  1. In the grade service, which line is a specific mechanism and which is a pervasive one? Which service does each support?
  2. A control removes 30,000 of ALE a year and costs 40,000 a year. Do you buy it, and what is the next argument?
  3. The nightly grep finds a grade changed by a student. Which phase are you in, and what are the first two things you do?
  4. "We can lose at most the last hour of grades." Is that an RTO or an RPO?

Where This Leaves Us

  • We can now name a requirement as a service, write it as policy, justify it with risk, and plan for the day it fails
  • Every one of those services eventually rests on the same small set of mechanisms — and most of those are cryptography
  • One program carried every idea: the check is a mechanism, the test is the policy, the price says buy it, and the log made the incident visible

Next: the toolbox. What encryption, hashing and signatures actually guarantee — and what they do not.

Fork me on GitHub