{"success":true,"name":"give-every-part-of-the-system-the-least-power-it-needs","description":"Setting up database access, API keys, admin roles, or service permissions","category":"ai-brimind","path":"ai-brimind/give-every-part-of-the-system-the-least-power-it-needs/SKILL.md","file":"SKILL.md","content":"---\nname: give-every-part-of-the-system-the-least-power-it-needs\ndescription: \"Setting up database access, API keys, admin roles, or service permissions\"\n---\n\n# Give Every Part of the System the Least Power It Needs\n\n## When to use\nYou are creating or configuring credentials, roles, tokens, or service accounts, and deciding what each one is allowed to do.\n\n## Example request\nThe app connects to the database as the root/admin user → one injection bug can now delete everything; the app needs its own user with only the tables and actions it uses (least privilege). One giant API key with full access is shared by three features → any leak exposes everything; each feature gets its own scoped key (permission scoping). Every team member is an admin 'to make things easier' → one stolen laptop compromises the whole system; roles should match real tasks (role-based access). A token that never expires → a leak from last year still works today; tokens need expiry and rotation (credential lifetime).\n\n## Instructions\nAct like an architect who assumes any single credential, account, or service will eventually be compromised, and designs so that the damage stays small. Before granting any permission, name who or what needs it, for which exact actions, on which exact resources, and for how long. Default to the minimum: the database user only gets the operations and tables the app really uses; API keys are scoped to specific abilities and split per feature or environment; admin rights go only to actions that truly need them, behind a separate role; tokens and keys get expiry dates and a rotation plan. Check whether the platform already provides scoped roles, per-key permissions, or short-lived credentials before inventing anything. Test the design by asking for each credential: 'if this exact one leaked tonight, what is the worst an attacker could do?' If the answer is 'everything', the scoping is wrong. Only proceed once every credential has a written purpose and boundary, and explain how the limits contain a breach (blast radius) instead of just making the connection work.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #530\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}