Publish an allow-list and a data-class map your documents can be checked against
Task
Write the two artefacts at the centre of a corporate AI policy, an allow-list of sanctioned tools with their configurations and a map from data class to permitted deployment, and check both against your lab: every classification label your documents actually carry must appear in the map, and no allow-list entry may permit a class its deployment is not allowed to see.
Steps
- List the classification labels your documents carry. The verify block reads every
classification:front-matter line underdocs/; if you used a different key, change that one line of it. - Create
lab/data-class-map.csvwith headerdata_class,public_model,enterprise_tenant,private_deployment,no_model, cellsyesorno, one row per label plus asecretsrow for authentication secrets. Follow the lesson's shape: restricted data only to a private deployment, confidential never to a public model, secrets to no model at all. - Create
lab/allow-list.csvwith headertool,configuration,deployment,permitted_uses,permitted_data_classes,conditions,owner,request_route.deploymentispublic,enterpriseorprivate;permitted_data_classesis semicolon-separated. - Add at least four entries: your retrieval app through the gateway (private); the runner itself, permitted for no use except through the gateway; an invented hosted assistant's enterprise tenant; and the consumer app of that same invented assistant, listed separately with public data only. That pair is the configuration trap.
- Write
lab/unsanctioned.mdwith three level-two headings,## Prohibited,## Detectionand## Response, stating the position on unsanctioned use. Coaching and a pointer to the sanctioned alternative come first; blocking is for high-risk services. - Plant a fault: permit
restrictedon the consumer entry, run the verify block, see it reported, then remove it.
Verify
cd ~/secai-lab
python - <<'EOF'
import csv, glob
labels = set()
for p in glob.glob("docs/**/*.md", recursive=True):
for line in open(p, encoding="utf-8"):
if line.lower().startswith("classification:"):
labels.add(line.split(":", 1)[1].strip().lower())
m = {r["data_class"].lower(): r for r in csv.DictReader(open("lab/data-class-map.csv", encoding="utf-8"))}
print("labels in docs:", sorted(labels))
print("labels missing from the map:", sorted(labels - set(m)))
col = {"public": "public_model", "enterprise": "enterprise_tenant", "private": "private_deployment"}
al = list(csv.DictReader(open("lab/allow-list.csv", encoding="utf-8")))
bad = []
for r in al:
for c in r["permitted_data_classes"].lower().split(";"):
c = c.strip()
if c and (c not in m or m[c].get(col.get(r["deployment"], "no_model")) != "yes"):
bad.append((r["tool"], c))
print(len(al), "allow-list entries across", len({r["deployment"] for r in al}), "deployment types")
print("entries permitting a class their deployment may not see:", bad)
print("restricted allowed outside private:",
any(m.get("restricted", {}).get(k) == "yes" for k in ("public_model", "enterprise_tenant")))
s = m.get("secrets", {})
print("secrets go to no model:", s.get("no_model") == "yes" and all(
s.get(k) == "no" for k in ("public_model", "enterprise_tenant", "private_deployment")))
EOF
grep -c '^## ' lab/unsanctioned.md
Your labels listed with none missing from the map; four or more entries across three deployment types; an empty list of bad entries; restricted allowed outside private: False; secrets go to no model: True; and three headings in the unsanctioned-use position. An empty label list means the front matter uses a different key, not that the check passed.
Notes
The check reads labels from the documents rather than from your memory of them, which is the lesson's point about labels following data: a map that omits a class your documents carry silently allows it everywhere. The applied lab and the capstone reuse both files.
This is an independent study companion for CompTIA SecAI+ CY0-001 and is not produced by or endorsed by CompTIA.