Scalable Security Enforcement for Cyber Physical Systems