Advanced level · Module 10: Agent Security, Governance and Deployment · Lesson 2 of 4
Least Privilege, Approvals, Secrets and Rate Limits
Learners apply the main controls: least-privilege tools and credentials, human approval for consequential actions, output handling, secrets management, authentication and rate limiting.
In this lesson you will
- Apply least privilege and approval controls
- Protect secrets and limit abuse
Key concepts
least privilegehuman approval gatesafe output handlingsecrets managementauthentication and rate limiting
The lesson
Each agent and tool gets only the permissions it needs; database tools use read-only connections; consequential actions (sending messages, changing records, financial operations) require explicit approval by an authorised person and are never triggered by model text alone. Many such actions should not be automated at all.
Treat model output as untrusted: validate it, never execute it as code or SQL, and escape it before showing it in web pages.
Keep secrets in environment variables or a secret store, authenticate every user of the service, apply rate limits per user, and set budgets that stop unbounded consumption.
Step by step
- Review every tool and credential and reduce privileges.
- Confirm all consequential actions pass through the approval gate.
- Add output escaping and validation in the service.
- Add authentication and per-user rate limits.
Practice activity
Apply and verify the security controls for the capstone service.
Expected result: A hardened service with least-privilege tools, approval gates, safe output handling, authentication and rate limits.
Check your understanding
-
Why treat model output as untrusted?
Show answer
It can contain errors or injected content, so it must be validated and never executed directly.
-
Give two controls against unbounded consumption.
Show answer
For example per-user rate limits and per-run token budgets.
Further learning
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.