What this miniature lab demonstrates
Model separate allowed cloud actions for one limited service identity.
Set up a harmless offline test
Requires Python 3. Run only on your own computer in a text console. No packages, accounts, network connections, malware, production logs or cloud credentials are required. Copy the example into a file or download the runnable script. The script includes assertions that fail if the expected behaviour changes.
# The model intentionally defaults to deny.
permissions = {"reporter": {("read", "metrics"), ("write", "reports")}}
def allowed(principal, action, resource):
return (action, resource) in permissions.get(principal, set())
cases = [("reporter", "read", "metrics", True),
("reporter", "delete", "backups", False),
("reporter", "write", "reports", True),
("unknown", "read", "metrics", False)]
for user, action, resource, expected in cases:
result = allowed(user, action, resource)
assert result == expected
print(user, action, resource, "allow" if result else "deny")
Output from the bundled script
The following text was generated by running this exact script in an offline Python environment during package validation. It is not a product or attacker simulation result.
reporter read metrics allow
reporter delete backups deny
reporter write reports allow
unknown read metrics deny
Interpretation and limits
The strings describe a fictional role, not AWS or Azure policy language. A real deployment additionally evaluates resource conditions, explicit denies, organisation policy and temporary credentials.
Questions to discuss
Which additional provider controls and cross-account settings could change the effective permission?
To practise further, open the cloud labs learning track and download a three-case CSV from any individual guide. Those records are fictional and deliberately contain an ambiguous case for analysis.
Primary sources
Scope: An illustrative educational model tested for deterministic output; no real-world security effectiveness or deployed vulnerability assessment is claimed. If a command, API or framework changes, follow the current official documentation and obtain approval before changes to real systems.