Course outline

Secure Software Development / Basic: outcomes, models, and decisions / Lesson 7

Turn a security rule into observable cases

Name an actor and protected resource, then derive allowed and denied synthetic cases from an agreed rule.

About 4 min readContent reviewed
On this page

Lesson goals

  • Write a specific security rule.
  • Identify the server-side decision boundary.
  • Derive allowed and denied observations.

Turn a security goal into a rule

A statement such as “drafts must be secure” does not tell a developer or tester what to enforce. Turn it into a rule naming the actor, resource and action. In this fictional lab, a user may read their own synthetic draft, while a different ordinary user is denied. This is an illustrative product decision, not a universal authorization policy. Agree the rule with the responsible owner and record exceptions such as authorized support access before implementing it.

Name actors and protected resources

Draw the path from the browser request to the service and stored draft. Identify who establishes the user’s identity and which server component decides whether that user may read the specific resource. A draft identifier supplied by a client identifies a requested resource; it does not prove ownership. The first table lists two synthetic decisions. A background worker or administrator may have different authority, so document those roles instead of assuming all actors share the owner’s rights.

text Synthetic security rule
Action | Actor | Expected
read own draft | owner | permitted
read another draft | other user | denied

The table describes the agreed lab policy and its observations, not an execution result.

Define observable outcomes

For the allowed case, record the expected response and a safe marker belonging to the owner’s draft. For the denied case, record the expected status or other agreed response, absence of the marker and unchanged protected state. Use two synthetic users in an authorized isolated environment. The second table connects the security claim to observations. A hidden button or a denial message alone is weak evidence if another server path can still return or modify the resource.

text Synthetic security rule
Claim | Evidence
owner can read | allowed synthetic case
other user cannot read | denied case and unchanged state

The table describes the agreed lab policy and its observations, not an execution result.

Review assumptions with an owner

Ask the product and security owners about role changes, deleted accounts, support access and whether the same rule applies to exports. Mark unresolved questions as open decisions rather than silently inventing answers. Review privacy requirements for logs so the test does not copy real draft text or session credentials. A short decision record should say why the boundary was chosen and who owns it. Revisit the rule when a new data flow introduces another consumer.

Keep the rule connected to change

Link the agreed rule to its allowed and denied regression cases and to the build or artifact tested. When the application adds a background download, review whether its authority and result access still satisfy the rule. Run the selected cases after a change and preserve sanitized evidence. Passing examples support the scenarios exercised; they do not prove that every endpoint, race or future role is safe. Keep untested paths and accepted exceptions visible to the decision owner.

Common errors and fixes

Writing only that the feature must be secure

Why it happens
The actor, resource and behavior are unspecified.
How to fix it
Agree on a specific verifiable rule.
Prevent it next time
Review requirements with the responsible owner.

Trusting a client-supplied draft identifier as authority

Why it happens
A requested resource is confused with proof of ownership.
How to fix it
Authorize the current actor against the resource on the server.
Prevent it next time
Test another synthetic user’s resource.

Checking only a denial message

Why it happens
Protected data or side effects may still be exposed.
How to fix it
Inspect the response marker and relevant state.
Prevent it next time
Include side-effect evidence in negative cases.

2 practice exercises

1. A synthetic user requests another user’s draft. What should the test observe under the lab rule?

Show worked solution

The request is denied, the other draft’s marker is absent and protected state remains unchanged. Record the actor and rule version.

2. A button is hidden for non-owners. Is that sufficient enforcement?

Show worked solution

No. Verify that the server independently authorizes the request, including an alternate request path, using isolated synthetic users.

Key takeaways

  • Name the actor, resource, action and observable outcome.
  • Verify server enforcement with allowed and denied cases.

Official references