23. Security Hardening
Chapter 23 of 24 · 20 min
Production inference serving handles potentially sensitive data requiring protection across multiple attack surfaces: network ingress, model artifacts, API authentication, and infrastructure access. Security hardening reduces the attack surface while maintaining operational functionality.
EXERCISE
Implement API key authentication for an inference endpoint using hashed API keys stored in Kubernetes secrets. Configure TLS termination on the ingress controller with a valid certificate. Scan the inference container image for vulnerabilities using a local trivy installation and address findings in the Dockerfile.