How to Prevent AI Agents from Accessing Unauthorized Data