Least-privilege policy derivation from observed local API use
Research direction. Record SigV4-signed and SDK traffic against the local emulator during an agent or integration-test session — every PutObject, GetItem, InvokeFunction, and AssumeRole call with principal, resource ARN, action, and condition context captured in emulator logs or a dedicated trace store.
From that trace, synthesize minimal IAM policy statements that permit exactly the actions exercised and no broader wildcards — inspired by policy-autopilot and automated-reasoning work in industry, but scoped to Loopback's replayable sandbox where traces are complete and replay is deterministic. A proposed lab would emit attachable policy JSON for human review, run /_loopback/why-403 against edge cases the synthesis might miss, and let operators diff proposed vs. current policies before an agent graduates from demo to broader MCP tool access.
Why local first: production CloudTrail is incomplete for pre-deployment agent runs, and mistaken broad s3:* grants are expensive to unwind. Loopback lets you iterate on least-privilege synthesis with zero account risk, export the result in a snapshot, and replay the same trace after policy tightening to prove denials behave as expected.