Least Privilege for REST APIs
Cheat sheet · https://pcornel.dk/topic.php?topic=1552
Answer
Least privilege grants the automation identity only the data and operations needed for its task.
Remember
A successful GET cannot establish that writes, RPC actions or other modules are denied.
First checks
List the roles or scopes of the automation identity. Run one call it needs → success. Run one call it should not be able to make, in a lab or as an approved test → 403. Review accounts and tokens that are no longer used.
Verify in this order
task defined → dedicated identity for it → smallest role or scope that works (read-only where possible) → needed call succeeds → unneeded call returns 403 → regular review
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1552