Question 540
Architecture principle case — A microservice's contract tests mock the authentication layer and report success on protected routes. The design review is extracting the transferable lesson for later software projects. Which security principle best governs the observation?
Explanation
Correct Answer
In Q0540, the fictional organizational observation is: A microservice's contract tests mock the authentication layer and report success on protected routes. The distinct underlying risk mechanism is: Test doubles bypass real boundary enforcement and mask integration security failures. Choice B addresses the governing security-design principle because it states: Unit isolation is useful but cannot prove protections removed by the test harness. This fits the governing design principle: Unit isolation is useful but cannot prove protections removed by the test harness. For measurable acceptance, the team should: End-to-end negative tests fail when unauthorized or malformed requests reach actual services. Sustained prevention requires: Identify security-critical mocks in test plans and require production-equivalent integration coverage.
Incorrect Answers
Choice A describes a plausible governing security-design principle for a separate security issue, mutation testing missing for authorization: The tests do not fail when a critical security control is intentionally altered. Its proposed response, “Tests must be capable of detecting the absence of the protection they claim to verify”, does not directly resolve this case. The discriminating cause is: Test doubles bypass real boundary enforcement and mask integration security failures. A stronger governing security-design principle would be: Unit isolation is useful but cannot prove protections removed by the test harness. An objective reviewer would test: End-to-end negative tests fail when unauthorized or malformed requests reach actual services.
Choice C describes a plausible governing security-design principle for a separate security issue, performance test bypasses security controls: Capacity evidence excludes the security checks deployed in the real production request path. Its proposed response, “Security controls affect the true operating capacity and should not disappear from performance evidence”, does not directly resolve this case. The discriminating cause is: Test doubles bypass real boundary enforcement and mask integration security failures. A stronger governing security-design principle would be: Unit isolation is useful but cannot prove protections removed by the test harness. An objective reviewer would test: End-to-end negative tests fail when unauthorized or malformed requests reach actual services.
Choice D describes a plausible governing security-design principle for a separate security issue, test evidence cannot be reproduced: Security evidence lacks enough provenance to reproduce or independently evaluate claims. Its proposed response, “A pass label is weaker than a test whose method and conditions can be independently repeated”, does not directly resolve this case. The discriminating cause is: Test doubles bypass real boundary enforcement and mask integration security failures. A stronger governing security-design principle would be: Unit isolation is useful but cannot prove protections removed by the test harness. An objective reviewer would test: End-to-end negative tests fail when unauthorized or malformed requests reach actual services.



Secure Software Design (KEO1) Practice Tests