Application cloud and identity defense
Define the permission contract
Rowan has members who read tickets in their own team, reviewers who also read their own team, and analysts who read audit metadata but not tickets. A trusted local directory supplies role, team and active status. A request never supplies its own authority. Authentication is assumed by the toy function; the function only models authorization.
Repair and verify the function
The starter denies every read, so it avoids disclosure but fails availability. Implement read_ticket with a default deny, active user lookup, role membership, existing ticket and equal team. Return only the ticket ID and subject. Unknown user, inactive account, unknown ticket or unexpected role must return None. A valid same-team read must succeed; the negative tests alone are insufficient.
Inspect the cloud design
Separate gateway, application, database, log and backup identities. The portal needs ticket reads, not backup deletion or policy administration. Store proposed secret references rather than credentials. Review the static cloud-policy fixture for broad grants, public database access and absent log collection. The classroom checker evaluates a narrow contract, not AWS, Azure or Google Cloud policy semantics.
Review the release evidence
The dependency inventory lists the Python standard library only; there are no external packages for this toy runtime. It is not a complete production SBOM or a vulnerability scan. In a real release, record the runtime and artifact identity, resolve findings, verify dependencies and repeat authorization tests. ASVS 5.0.0 offers application verification requirements; the local tests illustrate a small subset without claiming formal mapping.
Practice regression
Use access-cases.json on the starter and your correction. Include revoked users and a cross-team request. Record actual results separately from predicted results and preserve the original source for reset. Do not start a web server or supply real identity tokens.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Application cloud and identity defense — knowledge check
Review integrated architecture, authorization, detection, recovery and reporting.
Who supplies the team binding?
Which read must succeed?
Why reject an always-deny function?
What should an analyst read?
What does the local cloud checker prove?