Securing AI infrastructure
Model servers, gateways, keys, pipelines and cost controls.
How to use the lab files
The zip keeps the files of each lesson apart, and the lessons work in one flat folder. After you unzip it, sh kr-lab.sh LESSON FOLDER builds that folder as it stands after a lesson, for example sh kr-lab.sh 00-set-up-your-lab ~/krlab/ai-infrastructure.
You need
A computer with Linux, macOS, or Windows with WSL. No GPU, no cloud account and no paid tool.
Next course
- 00Set up your lab for Securing AI infrastructureCreate the lab folder and a virtual environment with pinned librariesSet-up25 min
- 01Draw the reference architecture of a model service and check itName the parts of a model service and the zone of each one35 min
- 02Serve a model behind an API and test its good and bad requestsLoad a trained model from a file that cannot run code40 min
- 03Put a gateway in front of the model service and test each controlBuild a gateway that checks an API key, a rate limit and a body size before it forwards45 min
- 04Manage keys and secrets and rotate a key without a breakKeep keys as hashes at rest and as files of mode 600 in use40 min
- 05Isolate the model service and audit the isolation settingsLimit what the service can read, write and use with file modes and ulimit40 min
- 06Build a release script that promotes a model only when every gate passesRun unit tests, an evaluation and a security scan as gates before a releaseBuild45 min
- 07Detect data drift in production and decide what to doMeasure drift of a feature with a population stability index and a two-sample test40 min
- 08Control cost and capacity with budgets, load shedding and a capacity estimateGive each client a daily budget in requests and tokens40 min
- 09Write access rules for the model service as code and test themWrite access rules as data that say who may call which model, from where, with which data class45 min
- 10Build a production readiness check for the whole lab systemTurn a launch checklist into one script that prints PASS or FAIL for each itemBuild45 min
- 11Review a model service before launch and prove that it is readyRun the readiness check on a system that a team wants to launch and read each failureTest90 min
Work roles
Work roles this course supports
The course helps you to prepare for these roles of the NICE Workforce Framework for Cybersecurity (NIST SP 800-181 Rev. 1). No single course covers a whole role, and KaliRange is not a certification body.
- Systems Security Analysis
IO-WRL-006a supporting skillYou secure keys, isolation and a gateway, and run a readiness check before launch. - Cybersecurity Architecture
DD-WRL-001a supporting skillYou draw a model service architecture with zones and a control on each connection.