ความคืบหน้างาน ไฟล์ต้นฉบับ

14 — Security Matrix (draft v0.1)

Status: draft for BA and security review (2026-10-30). Derived from the use cases (12-use-cases.md). Role codes are defined in 13-role-matrix.md. Cells marked [inferred] are our reading and need confirmation. Numeric values (limits, retention periods) are configured by the university and are not set here.

1. Data classification

LevelNameExamplesBaseline controls
L1PublicAnnouncements, admission criteria and rubrics, curriculum, ITA/OIT data, degree-verification result (minimal fields)Published deliberately; PII check before publishing (W-36)
L2InternalTimetables, course offerings, staff directory, aggregate statisticsAuthenticated users
L3ConfidentialStudent and applicant records, grades, attendance, finance and bank accounts, guardian relations, discipline, scholarships and กยศ., athlete performance and selectionRole + scope + relationship (ABAC); audit of changes
L4Restricted (sensitive)Health (hlt_vault), mental health, disability evidence, safeguarding cases, court orders and custody, whistleblower identity, national ID numbersNeed-to-know only; every read audited; break-glass with 2 approvers; never in notifications or bulk exports without DPO

PDPA §26 sensitive data (health, disability, criminal records) is always L4.

2. Access by data domain and role

Legend: C create/submit · R read · U update/process · A approve/sign · — no access. Scope in brackets: own, rel (guardian relation), sec (sections taught), adv (advisees), cls (homeroom), sq (squad), care, case (assigned), fac (faculty), camp (campus/school), all (central).

2a. Learner-facing and academic domains

Domain (level)STUDENTGUARDIANLECTURER / SS_TEACHERADVISOR / HOMEROOMDEPT_HEAD / DEAN / SS_DIRECTORREGISTRARADMISSIONSExecutives
Application and admission scores (L3)CR own (APPLICANT); sees own per-station scoresR rel (minor applicant), consent——R/A fac (criteria, results)R campCRU camp; override A (SoD-14)R aggregate
Person profile and contact (L3)R own; U via requestR relR sec (name, photo)R adv/clsR facCRU campR campaggregate only
National ID / passport (L4)R own (masked)————R camp (unmasked for verification)R camp (dedupe)—
Guardian relations (L3)R own; A observer consent (adult)R own relation—R clsA caregiver (SS_DIRECTOR)CRU camp; verify level 1/2——
Student status and records (L3)R ownR rel (per consent if adult)—R advA fac (withdrawal, LOA)CRUA camp—R aggregate
Registration and timetable (L2/L3)CRU ownR rel (per consent)R secA adv (study plan, add/drop)A fac (offering plan, overload)U camp—R aggregate
Attendance (L3)R own; C leaveR rel; C leave (minor)CRU sec; A sick leaveR adv/clsA มส. list (DEPT_HEAD)R camp—R aggregate
Grades and scores (L3)R own (after teaching evaluation)R rel (minor; consent if adult)CU sec until submitted, then lockedR advR distribution; A batch (DEAN); A (SS_DIRECTOR)R; publish camp—R aggregate
Grade corrections (L3)C appeal own—C request sec—A (requester ≠ approver, SoD-02)U publish——
Discipline cases (L3)R own; respondR rel (minor)——A sanction (DEAN)R outcome for graduation——
Accommodation plan (disability) (L3) / evidence (L4)CR own—R adjustments only, no diagnosis——R plan (exam arrangements)R plan (W-79)—
Credentials and transcripts (L3)C request own————CRUA camp—A sign (PRESIDENT)
Policy configuration (PolicySet, FeePolicy, MakeupPolicy) (L2)——U own course MakeupPolicy and assessment criteria [inferred]—A per chainR/U draft—A (VP_FUNCTION, ACADEMIC_COUNCIL)

2b. Services, finance, sports and welfare

Domain (level)STUDENTGUARDIANFIN_OFFICER / FIN_HEADDORM_STAFF / STUDENT_AFFAIRSCOACH / SPORTS_HEADPHYSICIAN / NURSE / PHYSIOSAFEGUARD_LEADExecutives
Invoices and payments (L3)R own; payR rel; pay via shareable link (OBSERVER needs consent for invoices)CRU camp (maker/checker); A by limit (FIN_HEAD)————A above limit (CAMPUS_VP, PRESIDENT)
Bank / PromptPay account for refunds (L3)U own with ThaID step-up—R camp; risky changes held 24 h after MFA reset—————
Scholarships and กยศ. (L3)CR ownR rel (minor)R campR volunteer-hour ledgerC certify status (SPORTS_HEAD)——A (CAMPUS_VP)
Dorm contract, room, leave pass, roll call (L3)CR ownA leave pass (LEGAL or delegated CAREGIVER)R deposit and feesCRU dormR squad schedule [inferred]—R (case-related)R aggregate
Court-order restrictions (L4)—C submit (custodial party)—R the instruction only, no case detailsR instruction only—A restriction—
Athlete profile, training, selection (L3)R ownR rel——CRU sq; A selection (SPORTS_HEAD)R readiness context—R aggregate
Competition leave (L3)C ownR relR cash advance—C roster (COACH); C batch (SPORTS_HEAD)——A (DEAN for T3 / batch)
Readiness status FULL/MODIFIED/UNAVAILABLE (L3)R ownR rel (minor)—R (dorm: temporary UNAVAILABLE)R sq without consent (D-05)CU care (UNAVAILABLE temporary for nurse)——
Clinical details, injuries, concussion, medication (L4, hlt_vault)R own; consent to share detailsR rel (minor, per policy)—DORM_STAFF: C medication administered onlyR only with athlete consentCRU care——
Health break-glass (L4)—————C request; A (physician.lead ≠ requester)—A 2nd (DPO)
Mental-health records (L4)R ownInformed: minors always, adults only if life-threatening———PSYCHOLOGIST: CRU care; ADVISOR gets study restrictions only with consent——
Safeguarding cases (L4)C report (anonymous allowed)Informed unless involved—C reportC report; alleged persons excludedC reportCRUA case (assigned team only)A measures (CAMPUS_VP)
Complaints and whistleblowing (L3/L4)C (anonymous allowed); R own via tracking code—————(routed)COMPLAINTS_CENTER: CRU; INTERNAL_AUDIT: R case

Additional rules from the use cases:

  • Selection and retention decisions must not use health or psychology details, only readiness status (W-150, W-151).
  • ATT, ASM and EXM receive practical restrictions without diagnosis (W-39, W-33).
  • Alleged persons and their line managers are removed from safeguarding case access. HOU, ATH and NOTI receive only the restriction they must enforce (W-22, W-93, W-155).
  • Approving sensitive roles (health, safeguarding, finance approvers) needs certification by the DATA_OWNER during access recertification (W-126).

2c. Platform, governance and IT

Domain (level)DPODATA_OWNERINTERNAL_AUDITIAM_ADMINSECURITY_ADMINPLATFORM_ADMIN / DBA / HELPDESK
Role assignments (L3)RA sensitive rolesR recertification reportCRUR; A privileged—
Audit log (L3/L4)RR own domainR—R— (cannot alter)
Consent records (L3)R; handle requestsU own domain (execute requests)R———
Bulk personal-data exportA 2nd (sensitive)AR log———
Production data change—A business approvalR log—A 2nd (asm/rec/fin)C request (HELPDESK L2); review script (DBA). No console edits
Privileged / break-glass sessionsReview within 24 h (break-glass); breach assessment within 72 hA when business data is touchedR—A 1st; review session recordingRequest

3. Authentication and session

User groupSign-inExtra assuranceUC
ApplicantsThaID, or e-mail + OTP. National ID / passport / G-code as the dedupe key—W-41
StudentsSSO account created at reporting-inMFA (W-142 exists for students); step-up with ThaID to change bank/PromptPay account and for PDPA requestsW-44, W-142, W-143, W-21
GuardiansID number + OTP (provisional: notifications and payment only)Level 1 in-person or level 2 ThaID to get full guardian rightsW-127
AlumniExisting account or ThaIDThaID for replacement documentsW-66, W-108
StaffSSO + MFAMFA reset needs identity proofing + 2nd approver (SECURITY_ADMIN for sensitive roles)W-142
External (sponsored)ThaID, or e-mail + OTP + documents; NDA/PDPA agreementAccount expires; included in recertificationW-139, W-126
Judges on tablets[unknown]Scores lock after submissionW-76
Employers verifying degreesNo login; QR/linkRate limit, minimal fields, no name searchW-67

After an MFA reset, risky actions (e.g. changing the refund account) are held for 24 hours and all linked channels are notified (W-142).

4. Separation of duties (known rules)

RuleConstraintUC
SoD-01A department head who teaches the course does not review its grades; it goes to a delegateW-01
SoD-02Requester ≠ approver for grade correctionsW-02
SoD-05Fee-schedule setter ≠ approverW-122
SoD-06PolicySet editor ≠ publisherW-15
SoD-09Scholarship committee member ≠ the advisor who commented on the same applicationW-07
SoD-10Finance maker ≠ checker ≠ approver; approval by amount limitW-81, W-102, W-120
SoD-14Admission overrides need a reason and a separate approver [inferred]W-74
SoD-18Thesis-exam chair ≠ main advisorW-95, W-159
(unnumbered)Cash-advance clearer ≠ advance approver; refund approver ≠ calculator; payer ≠ approver of account change; JIT requester ≠ approver; health break-glass approver ≠ requester; retention committee ≠ proposer; selection reviewer ≠ original selectorW-115, W-147, W-143, W-124, W-14, W-151, W-150

The full SoD list (SoD-01…18 and more) is in the team's Workflow book. Ask for it.

5. Privileged and emergency access

ControlRuleUC
JIT privileged access (PAM)Ticket-backed, time-boxed credentials; session recorded; production writes always reviewed; asm/rec/fin schemas read-only by defaultW-124
Break-glass system accountSplit credentials released by 2 approvers (SECURITY_ADMIN, CIO); SOC alerted; every command to WORM; review with DPO within 24 h; credentials rotatedW-125
Data fixesThrough the pipeline only, with before/after in WORM and re-signed snapshotsW-137
Access recertificationPeriodic per-person review by line managers; uncertified access is revoked automaticallyW-126
Acting / delegationRecorded, time-bound signing authorityW-123
Staff working with childrenStaffClearance with expiry; access to minors is suspended automatically when it expiresW-23, W-156

6. Audit and evidence

EventRequirementUC
Reads of L4 data (health, safeguarding cases)Logged per read; reviewedW-14, W-22
Status changes, approvals, role changes, consent changesAudit log (AUD module)W-127, W-128, W-133
Approved grade sets, regulatory submissionsSigned snapshot (hash) + receiptW-01, W-35
Data fixes, break-glass commandsWORM storageW-137, W-125
Bulk exportsWatermark (who, when), expiring link, audit entryW-138
Emergency disclosure of contacts (vital interest)Approver + auditW-129

[inferred] Keep audit evidence separate from operational logs. OpenSearch is the centralised log store, but WORM evidence needs immutable storage (e.g. object lock on RustFS/S3). This is a decision to make, see 07-architecture-and-integrations.md.

7. Privacy rules that cut across modules

  • No PII in notification payloads (LINE, e-mail, SMS) (W-36).
  • National ID is masked in normal views [inferred]; full value only for verification roles.
  • Consent records include purpose, version and expiry, and are revocable with immediate effect (W-128).
  • Data-subject requests are checked against legal basis and RetentionClass before deletion (W-21).
  • Degree verification shows minimal fields, is rate-limited and offers no name search (W-67).

8. Open points

  1. Confirm the classification levels and the domain list.
  2. MFA for students and guardians: required or optional?
  3. Which roles may see unmasked national ID numbers?
  4. Retention periods per RetentionClass (configured by the university).
  5. Sports-school equivalents for university approvers (who replaces DEAN, CAMPUS_VP at a school?).
  6. Whether committee members get their own accounts.