Independent learning for product cybersecurity professionals
SearchCommentary
Learning library / Engineering secure systemsCSL-201 · Engineering secure systems

Security requirements and acceptance criteria

Turn security thinking into requirements, architecture and implementation.

A useful security requirement specifies behaviour that can be verified under defined conditions.

What you will learn

  • Translate threats and user needs into verifiable security behaviour.
  • Define criteria, enforcement points and evidence before implementation.
  • Handle exceptions, recovery and traceability explicitly.

The key ideas in brief

  • Write testable security requirements.
  • Connect requirements to threats and verification.

The key ideas

Start with a threat or protection objective. State the affected component, trigger, expected response and constraints. Separate the requirement from the design choice when more than one implementation could meet it.

“The system shall be secure” cannot be meaningfully verified. “The configuration API shall reject configuration changes requested by an account without the Administrator role” describes a specific behaviour.

Add acceptance criteria for both allowed and rejected actions. Define relevant boundary conditions, error handling and evidence. Maintain traceability from threat to requirement, implementation and verification result.

A practical example

For stale readings, define the maximum acceptable age from the intended use. Require the application to identify readings older than that limit and verify its behaviour when transmission stops and later resumes.

Derive requirements from decisions

A requirement should express needed behaviour rather than name a fashionable technology. “Use encryption” leaves open the protected flow, parties, trust assumptions and failure response. Start with the asset and scenario, explain the protection needed and then identify the mechanisms that implement it.

For the gateway, an unauthorised configuration change can redirect readings. Derive a requirement for permitted roles and resource scope, then requirements for authentication, attributable change records and recovery. Keep the links visible: one threat may need several requirements, and one requirement may address multiple scenarios. Include source, rationale and owner so later changes can be assessed.

Specify the boundary and result

State the trigger, preconditions, action, expected result and acceptance criteria. Where timing or resource limits matter, justify them for the intended use. “Reject invalid data” must define validity and rejection behaviour: is the message discarded, is state unchanged, is an event recorded and what does the user see?

Positive and negative cases both matter. A permission check must allow the legitimate action and deny the prohibited action without changing protected state. An update mechanism must accept a valid compatible package and reject altered, unauthorised or incompatible packages. Define restart, expiry and interrupted-operation behaviour rather than leaving them as implementation details.

Control evidence and change

Choose the verification approach while writing the requirement. A review may demonstrate an architectural constraint; a test may demonstrate observable enforcement; a representative-use evaluation may be needed for an operator’s interpretation. Record the exact baseline and criteria. Do not accept a screenshot of a hidden button as evidence of API authorisation.

When a requirement changes, revisit its threats, design allocation, tests and operational instructions. Mark unresolved values explicitly and assign the decision. A provisional timing limit copied into code can become an undocumented product claim. Release review needs a coherent set of approved criteria and evidence, not a mixture of old requirements and tests written for a different configuration.

Apply the ideas

Rewrite “the dashboard shall be secure” into three requirements for customer isolation, stale readings and configuration changes. For one, define a test setup, expected response and evidence showing that protected state is unchanged after rejection.

Compare your approach

For customer isolation, require the API to return only records belonging to the authorised customer scope. Use two test customers and a user assigned to only one; request both sets directly and verify successful access to the permitted set and rejection of the other. Check returned content and any caches as well as response codes. Specify the stale-reading interval through an operational decision and enforce configuration permissions at the backend. Retain accounts, baseline, requests, responses and state observations.

Review your work

  • Does each requirement name observable behaviour?
  • Are acceptance criteria agreed rather than invented by the tester?
  • Do tests cover allowed, denied and recovery cases?

Keep this output: Three security requirements with rationale, design allocation and verification criteria.

Continue learning