ASSIGNMENT 4 · CHAPTER 13
Turn a misuse case into a test
Read the named source pages, check the five objectives, apply the concepts, then reassess your decision when new evidence appears. The total-time estimate includes preparation; report your actual time.
Practical hour. This build is this chapter’s practical hour. The assignment is not submitted without it. Running the tests is a separate row in the rubric; longer writing does not make up for it.
الساعة التطبيقية. هذا البناء هو الساعة التطبيقية لهذا الفصل. لا يُسلَّم الواجب بدونه. تشغيل الاختبارات صف مستقل في السلّم، لا يُعوَّض بطول الكتابة.
Course learning outcome 5: Design and test secure systems, practised by building and testing the server-side access rule. The tests and the coverage step practise outcome 11: design and implement test cases across testing strategies.
مخرج التعلم 5: تصميم الأنظمة الآمنة واختبارها، ويُمارَس ببناء قاعدة الوصول في الخادم واختباره. والاختبارات وخطوة التغطية تمارس المخرج 11: تصميم حالات الاختبار وتنفيذها.
- Warm-up
- FIT → TEST → BOUND → ACT + EVIDENCE
- Commit Part A
- STRESS → REFIT
- AI declaration + human review
- Export and submit in LMS
1 · WARM-UP · 5 MINUTES · NOT GRADED
A student can download their own file. Does this show that they cannot download another student's file?
Show / hide warm-up answer
No. This checks an allowed action only. Also test a request for another user's file. Check that the server refuses it, including through any export option.
Lecture guide
X02, X05, X06, R09 and R18; original slides 29–43 and 59–70.
FIT identifies the relevant problem. TEST builds this chapter’s artifact. BOUND states the limits. ACT + EVIDENCE records the action, owner and verification. STRESS then tests your reasoning before REFIT.
Chapter map · Relevant mechanism · 20-rule map · Practice card. Source and chapter-unit identifiers are not canonical rule numbers.
CURRENT EDITION · MASTERY V2
Required preparation and assessment scope
Read: Misuse cases and requirements: slides 40–43; Secure design principles: slides 44–47.
Complete the five-objective preparation check after the assigned reading before you start.
Scope notes and earlier editions
Blackboard supplies the calendar deadline. All five chapter objectives, the classroom concepts and named reading are in assessment scope. Optional toolkit activities are enrichment unless assigned.
One assigned source application and one short transfer answer are included below, within the existing 5-point rubric. A reading click or a practice score is not proof of mastery.
Already started the previous edition? Resume or export your previous work using the same ID and browser. Previous drafts stay separate. Completed submissions do not need repeating unless the instructor requests it.
READ BEFORE ANSWERING
How your work is assessed · 5 points
| Criterion | Scoring |
|---|---|
| FIT · 1 point | 1: Defines the problem using the chapter ideas accurately, distinguishes facts from assumptions and connects it to the proposed action. The short answer applying a second chapter idea must correctly apply the second concept; FIT and that answer together earn this single point.Partial credit: 0.75 · 0.5 · 00.75: The right concept and mechanism, but one link is thin: a fact and an assumption are not separated, or the transfer answer applies the second concept only partly.0.5: A relevant concept is named but applied generically or to the wrong mechanism, or the transfer answer is missing or incorrect. 0: No chapter concept is applied, the case is misread, or the answer depends on invented facts. A generic “hold and test” statement does not satisfy this criterion. |
| TEST · 1 point | 1: One test of allowed access and one test of access that must be refused, each with user, input, expected result that you can check and evidence; no invented execution result. Apply one idea from the assigned reading to your technical work and explain the connection. Build: every course check passes, your own tests catch every known bug (mutation test), and you can make your code change for the short discussion (micro-viva) and explain which tests change; the text uses what the build showed.Partial credit: 0.75 · 0.5 · 00.75: Both tests are specified, but one element is incomplete—for example, the actor or the observable expected result of the negative test.0.5: Only one test is usable, or the negative test does not attempt an unauthorized action (it checks sign-in only). Or the build fails course checks that the written record does not explain. 0: No usable test design, or tests reported as passed without evidence. |
| TESTS RUN · required | Required for submission: a recorded run of your own tests and the course checks on your final code, a second run after you change one test input, and the coverage sentence. Part A cannot be committed without them. Not replaceable: longer writing does not make up for a missing run. A run with failing checks is accepted when your text explains it. The build itself is marked in TEST. |
| BOUND · 1 point | 1: States relevant assumptions, the situations covered, and a result you can observe that would make you review the decision. Partial credit: 0.75 · 0.5 · 00.75: A relevant boundary and trigger, but one is imprecise—for example, a trigger that cannot be observed as written.0.5: The boundary is generic (“if problems occur”) or does not match the claim and the plan. 0: No boundary, or a boundary that contradicts the case facts. |
| ACT + EVIDENCE · 1 point | 1: Gives a workable action with clear limits, who is responsible, and evidence someone else can check, while distinguishing checks already completed from checks you plan to do. Partial credit: 0.75 · 0.5 · 00.75: A feasible action and useful evidence, but one element is missing—for example, the responsible role, or whether the evidence is completed or proposed.0.5: The action is vague or not feasible in the case, or the evidence cannot be inspected by someone else. 0: No action, or evidence that is invented or reported as completed when it is only proposed. |
| REFIT · 1 point | 1: Explains how the new evidence affects the initial claim and justifies RETAIN, REVISE or REPLACE with a consistent final answer. Partial credit: 0.75 · 0.5 · 00.75: The effect of the new evidence and the RETAIN / REVISE / REPLACE choice are justified, but the final record leaves one inconsistency with the new boundary.0.5: A choice is stated but not justified from the new evidence, or the final record repeats Part A without addressing the change. 0: No REFIT, or a response that ignores or contradicts the new evidence. |
Five points use the same familiar structure. The chapter artifact changes; the LMS determines how assignment points contribute to the course grade.
Learning-outcome alignment
This task supports CLO 2 and 5 of the course specification (section B). The Python build, its tests and the coverage step also support CLO 11. It is course-written practice, not an official national readiness assessment or an approved item-weight mapping.
Strong and weak answers for each criterion · how other answers are accepted
| Criterion | Strong example | Weak example |
|---|---|---|
| FIT | Strong: Asset: the booking record. Vulnerability: the API returns any record whose ID is in the request. Attack: a signed-in user asks for another user's ID. Given facts only. Why: Separates asset, vulnerability and attack and uses only the task's facts. | Weak: The system is insecure because hackers can get in. Why: No asset, no weakness, no case fact. |
| TEST | Strong: Negative test: user A requests user B's record directly from the API. Expected: denial, no record content, an audit entry naming A. Status: proposed. Why: Observable pass condition, the actor and object are named, and the test is marked proposed. | Weak: Test that the page hides other users' links. Why: Tests the interface, not the server boundary; no observable denial. |
| BOUND | Strong: The claim covers the records API only. A second endpoint, a bulk export or an assistant with its own account is outside it and reopens the decision. Why: Names the covered path and an observable trigger. | Weak: The claim holds as long as the system is secure. Why: Circular; no path and no trigger. |
| ACT + EVIDENCE | Strong: Action: add a server-side ownership check to the records API. Owner: the backend lead. Evidence: the negative test above, run and recorded, proposed. Why: Feasible action, a named role, and evidence with its status. | Weak: Make the system more secure and test it. Why: No specific action, owner or inspectable evidence. |
| REFIT | Strong: The new evidence shows the preview endpoint skips the check. I revise: the claim now covers only the records API, and the preview endpoint gets the same check and test before release. Why: Says what changed, chooses REVISE with a reason, keeps the record consistent. | Weak: My answer still stands because the main endpoint passed. Why: Ignores the new path and gives no reason. |
Other answers are accepted when: the answer uses a chapter concept correctly, rests only on the facts given in the task, names a negative test with an observable result, and states which paths the claim covers. A different decision that meets these conditions earns the same marks as the model answer.
The examples are about a different practice case. They show the kind of reasoning that earns the mark, not the answer to this task.
What distinguishes an unsupported answer from a stronger one?
Different practice example · weak: “The page hides the record, so authorization works.”
Stronger: For a different booking record, user A requests user B’s identifier directly from the API. The proposed test expects denial and no protected content; it records the actor, object and inspected response.
The stronger answer names a mechanism, its scope and inspectable evidence. It does not certify a real system. Your assessed answer must address this task’s own facts.
The assignment in nine steps الواجب في تسع خطوات
- 115 minPrepareLecture, the two readings, the five practice questionsاحضر المحاضرة، اقرأ المصدرين، وحلّ الأسئلة الخمسة
- 21 minOpenOpen it with your Student ID, in the same browser every timeافتح الواجب برقمك الجامعي، ومن نفس المتصفح دائماً
- 320 minPart AFIT · artifact · BOUND · ACT + EVIDENCE, 120–180 wordsاكتب حكمك الأول: المشكلة، المهمة، الحدود، القرار والدليل
- 430 minBuildPlan, complete the code, write 3+ tests, Runاكتب الخطة، أكمل الكود، 3 اختبارات على الأقل، ثم Run
- 51 minCommitReview & commit Part A: it becomes read-onlyثبّت الجزء A: يصبح للقراءة فقط
- 62 minNew evidenceIt opens on the page right after you commit. Read itيظهر الدليل الجديد في الصفحة مباشرة بعد التثبيت: اقرأه
- 710 minPart BBoundary status, then RETAIN / REVISE / REPLACE and whyهل تغيّر قرارك؟ اختر وبرّر، ثم اكتب القرار النهائي
- 82 minSignDeclare AI use, type your name, tick the boxصرّح بالذكاء الاصطناعي، اكتب اسمك، وضع العلامة
- 93 minSubmitPrint / PDF, then upload the PDF in Blackboardصدّر PDF وارفعه في Blackboard
Select a step to see it on a picture of this page. Online guide: How to do an assignment.
Before you start
- Save often. Use Save draft while working and download a backup before leaving a shared device.
- Commit, then the new evidence. Part A becomes read-only when you commit, and the new evidence opens on this page straight away. Complete Part B, export the PDF and upload it in Blackboard.
- Ownership check. Your instructor may ask you to explain your Part A and REFIT in a two-minute conversation. Your written work and your explanation should agree. AI may help you practise; the reasoning you submit must be your own.
New to this format? Read the step-by-step guide. The sequence preserves your first judgment; it is not a secure examination system.
Identity
Loaded from the entry page. Drafts are separated by Student ID in this browser.
Submission details
Check the current deadline and submission instructions in the LMS.
How this assignment connects to the lecture and the five objectives
ONE METHOD · TWO DIFFERENT CASES
From the classroom card to this assignment
The lecture has 20 slides and three short practice stations: claim + evidence; mechanism + limits; changed condition + revised decision. Here you transfer that reasoning to the separate assessed scenario below. Do not copy the practice answer or submit another full classroom report.
Unchanged: 5 raw points, existing deadline, local draft identity, confirmed Part A commitment, STRESS then REFIT, AI declaration and Blackboard submission. Already completed work does not need repeating merely because the lecture was updated.
Five chapter objectives → existing evidence opportunities
These are local chapter objectives. They do not renumber the approved syllabus outcomes or establish an official national mapping. The lecturer judges correctness and sufficiency; a field being filled is not attainment.
| Chapter objective | Where it is practised / evidenced within this task |
|---|---|
| Objective 13.1 Distinguish assets, threats, attacks and vulnerabilities. | FIT |
| Objective 13.2 Translate a policy into testable requirements. | TEST + source application |
| Objective 13.3 Build a misuse case and a control. | TEST + transfer question |
| Objective 13.4 Explain layered protection and secure defaults. | ACT + EVIDENCE |
| Objective 13.5 Design a negative test and state its coverage limit. | BOUND + REFIT |
2 · PART A · 20 MINUTES
Assessed scenario · fictional teaching case
A fictional university website stores student project files. It has two user roles: student and staff.
- Students may read only their own project files. Staff may read files only for the groups assigned to them.
- The screen hides other students' files. A developer says all normal upload and download tests passed.
- Each request sent to the server includes a project ID (the value that identifies a project). The API is the way the website sends these requests. The brief includes no test of a user requesting someone else's project.
- The system is set up to keep activity logs (records of what happened). Nobody has checked a sample for private information.
Your decision: release the service, allow only limited access, or hold the release. Explain your choice using the facts above.
Quick word help · معاني المصطلحات
شرح مختصر للكلمات المستخدمة في هذا الواجب. ارجع إليه أثناء الحل.
Words in this case
- Authorization
- Checking whether this user may access this file.
التحقق من صلاحية المستخدم لفتح هذا الملف. - Server-side
- A check performed by the server, not just by the screen.
فحص ينفذه الخادم، وليس إخفاء زر على الشاشة فقط. - Positive / negative test
- A test of an allowed action / an action that should be refused.
اختبار طلب مسموح / طلب يجب رفضه. - Endpoint
- An API address for one operation, such as preview or export.
عنوان في واجهة البرمجة لعملية مثل المعاينة أو التصدير. - Malformed input
- Input with missing fields or the wrong type of value.
بيانات ينقصها حقل أو تحتوي نوع قيمة غير مناسب. - Bulk export
- Downloading several files or records together.
تنزيل عدة ملفات أو سجلات دفعة واحدة.
Words used in every assignment
- FIT
- What problem matters, and why?
ما المشكلة المهمة؟ ولماذا؟ - BOUND
- When does your recommendation apply? What would make you review it?
متى يصلح قرارك؟ وما الذي يستدعي مراجعته؟ - ACT + EVIDENCE
- What will you do, who is responsible, and what supports it?
ما الإجراء؟ ومن المسؤول؟ وما الدليل؟ - STRESS
- New information shown after you lock Part A.
معلومات جديدة تظهر بعد تثبيت الجزء A. - REFIT
- Review your decision using the new information.
راجع قرارك في ضوء المعلومات الجديدة. - RETAIN / REVISE / REPLACE
- Keep the decision / adjust it / choose a different decision.
أبقِ القرار / عدّله / استبدله بقرار آخر. - Fact / assumption / proposed
- Given evidence / something you assume / something you suggest doing or testing.
حقيقة معطاة / افتراض يحتاج تحققًا / إجراء أو اختبار تقترحه. - Artifact
- The work you produce: for example a test plan, comparison or set of rules.
المخرج الذي تعدّه، مثل خطة اختبار أو مقارنة أو مجموعة قواعد. - Transfer answer
- Apply a second chapter idea to the question, using your own explanation.
طبّق فكرة ثانية من الفصل على السؤال، واشرحها بأسلوبك. - Mutation test / micro-viva
- Your tests try code with known bugs / a short discussion where you explain and change your code.
اختباراتك تكشف أخطاء مقصودة في الكود / مناقشة قصيرة تشرح فيها كودك وتعدله.
Keep the written response to about 120–180 focused words; use compact tables or notation. Include the source application and transfer answer in that budget. Your Python code, tests and build record are not counted in it. State facts, assumptions and proposed evidence separately. Quote or cite the assigned source precisely; explain its role. Report actual study time at the end.
A1 · FIT · 1 POINT
Name one thing to protect (asset), one possible harmful action (threat), and one possible weakness (vulnerability). Say which weakness you suspect and which, if any, has actually been demonstrated.
PYTHON BUILD · ASSESSED IN TEST
Build the permission check on the server
Write can_read(user, project). It must check the access rule each time a request reaches the server. Write tests that try to break the rule, including at least two requests that must be refused. Use the actual results in your TEST answer.
First time? Try the not-assessed practice build and a complete worked example on How to do an assignment.
Budget about 30 minutes. Python runs in your browser: nothing to install, and nothing is uploaded. The first run downloads Python once (about 10 MB, internet needed). Passing every check is necessary, not sufficient: your written record must use what the build shows.
Your tests also run against versions of the code with known bugs. Each bug must make at least one of your tests fail. This is called mutation testing. Your build record gives you a small code change to explain in a short discussion (micro-viva), selected using your Student ID. Be ready to make it and explain which tests change and why.
Primary source · about 15 minutes: J. H. Saltzer and M. D. Schroeder, “The Protection of Information in Computer Systems,” Proceedings of the IEEE 63(9), 1975. Read about complete mediation (check permission on every access) and fail-safe defaults (refuse access unless the rule clearly allows it). Which line of can_read applies each principle? Use the answer in your build plan.
The course checks your build must pass
- the owner can read
- another student is refused, even in the same group
- assigned staff can read
- staff from another group is refused
- an unknown role is refused
- malformed input is refused without crashing
- your tests include at least two refusals
- your own tests: at least three, all passing
- your tests catch every known bug (mutation test)
Keep the given names. Write at least three functions whose names start with test_. Tab inserts four spaces.
Write your plan, then run.
COVERAGE STEP · COURSE OUTCOME 11 · DESIGN AND IMPLEMENT TEST CASES ACROSS TESTING STRATEGIES
The build record measures which lines and branches of your code your own tests run. The course checks are not counted.
- Make your three tests pass and read the coverage lines in the build record.
- Change one input in one of your tests. Run again: the record shows Run 2.
- Write one sentence: which branch is still not tested, and which input would test it.
A2 · TEST · 1 POINT
Plan two tests: a request that should be allowed and a request that should be refused. For each, state who sends it, the project and input used, the expected response, and what record or response you would inspect. These are planned tests; do not claim that they have already run.
A3 · BOUND · 1 POINT
List the user roles, project files and ways of accessing them that your recommendation covers. Name one access path that has not been tested and one result that would make you review your decision.
A4 · ACT + EVIDENCE · 1 POINT
Choose release, limited access or hold. State the limits of your choice. Name a permission check the server must perform, connect it to your tests, and say who will review the results.
Name the test, activity record or review that supports your decision. State the conditions it covers, who checks it, and what evidence is missing. Clearly separate results already available from checks you are only proposing.
ASSIGNED SOURCE APPLICATION · INCLUDED IN THE EXISTING RUBRIC
Give a slide number from the assigned reading. Explain its idea in your own words, then point to the part of your answer it supports or challenges. A slide number alone is not enough.
TRANSFER CHECK · SCORED WITH FIT
The rule says: students may read only their own files. Explain the difference between a misuse case (an attempt to use the system in a forbidden way) and a normal use case. Write one server permission rule that a test could check.
Commit is not LMS submission. Confirmation freezes FIT, TEST, BOUND, ACT and EVIDENCE before the new information appears.