Save week12.py in your exercise folder and run python week12.py --lesson 3. The lab launches a real public-only server, reads an allowed document, denies a secret resource, permits project Atlas status, and denies another project. It checks safe audit records and runs separate synthetic credential-policy tests. All files, including logs, live in a temporary directory.
An allowlist is a set of permitted values. Membership is a direct check before an operation proceeds:
allowed_projects = {"atlas"}
requested = "payroll"
authorized = requested in allowed_projects
assert authorized is False
The weekly server performs that check at the resource or tool boundary rather than trusting model arguments. Expected output includes an allowed call and safe denials with no secret text in replies or logs. The logs record method, request identifier, and outcome, not credentials or full document bodies. The milestone therefore has a reproducible success and denial path, while remote credential issuance and real-model reasoning remain explicitly outside this core execution.