Page 7 of 8~120 min topic

Model deployment

Set release boundaries for the versioned prediction HTTP service

Least privilege, negative probes, and a timed rollback beat a security essay about versioned prediction HTTP service for churn risk scores.

~15 min this pageSafety and operations

1Learn the idea

Read

Least privilege for this lab

Separate runtime and operator roles for versioned prediction HTTP service for churn risk scores. Runtime may only perform the narrow actions that growth analyst calling /v1/predict with customer features needs; operators get audited break-glass with TTL. Encode a negative probe that denies the privilege trick related to schema drift drops a feature; scores shift 0.3 without version bump.

Read

Data and secret hygiene

Redact prompts/PII at collection. Secrets enter via a manager or workload identity — never source, fixtures, or exception strings. Incident MODEL-SCHEMA-DRIFT-22 should be impossible if these controls hold. Output allowlists and schema checks stay in force on error paths.

Read

Implementation artifact

Read

customer_id is authorized via gateway JWT subject; body customer_id must match.

if body.customer_id != ctx.subject: raise HTTPException(403, "customer_mismatch")

Read

Rollback drill

Rehearse the rollback or kill switch timed against a clock. Record actor, reason, prior revision/secret/flag, and verification query. Invariant reminder: response includes model_version; unknown feature schema → 422, never silent default.

Read

Stage depth

Abuse cases unique to this lab include the privilege path implied by schema drift drops a feature; scores shift 0.3 without version bump. Prove a read-only role cannot mutate. Break-glass tokens expire; leftover tokens fail the drill. Dependency pin/digest story matters when images or models move under you. Document how to rotate the credential that versioned prediction HTTP service for churn risk scores uses without a full outage window longer than your dual-run plan. Security evidence is part of ship, not an appendix nobody reads.

Read

Field notes for `model-deployment` / `security-ops`

List network egress destinations and justify each. Ensure debug endpoints are off by default in the shipping config. Verify that error responses do not echo secrets or raw stack frames to clients. For multi-tenant paths, add a cross-tenant probe fixture. Time the rollback drill twice — once with the author, once with a peer. Store the drill transcript beside the threat notes for the incident id. In this chapter the product is versioned prediction HTTP service for churn risk scores, the human stakeholder is growth analyst calling /v1/predict with customer features, and the incident id you design against is MODEL-SCHEMA-DRIFT-22. Re-state the oracle in your notes — fixture row → score in [0,1] with model_version=churn-xgb-1.4.2 — and keep the invariant visible: response includes model_version; unknown feature schema → 422, never silent default. Track schema_reject_rate visible and score_psi ≤ 0.1 vs baseline week as the scoreboard. Surface under change control: POST /v1/predict. If you only have forty minutes, finish the fixture for schema drift drops a feature; scores shift 0.3 without version bump before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.

Go deeper

Before you start

Why this matters

Threat-model versioned prediction HTTP service for churn risk scores in five minutes: who can change config, who can read secrets, what a malicious payload tries to do. Write one negative probe that must yield deny with zero side effects. Reference MODEL-SCHEMA-DRIFT-22 as the story you refuse to repeat.

In the wild

See how this idea shows up as a product and a company — then come back to the lesson. Skills transfer across vendors.

Check your understanding

Page assessment

Answer from memory. Completion is saved from this evidence, not from opening the next page.

1. Does deny imply zero side effects?
2. Are secrets absent from logs?
3. Is rollback evidenced with timestamps?

All responses are required.