AI agents

AI Agent Permissions: A Practical Least-Privilege Checklist

The useful question is not whether an agent is trustworthy in general. It is whether each tool can do only the work a particular user is entitled to request. Write down the permission model before adding more tools to a prototype.

Make a tool inventory

Create a row for every tool with its purpose, input fields, data read and possible side effects. A tool called manage_customer is too broad if it can search, export, suspend and delete accounts through the same permission.

Split reading from writing. A support agent may need an order status but not a full customer export. Return only the fields required for the next decision, and avoid putting credentials or payment information into model context.

Enforce identity in the application

The server should determine the account and project from a verified session. Do not accept a model-provided owner ID as proof of authority. Check record ownership again when the tool executes, even if an earlier screen already checked it.

Test with two users and two projects. Attempt to read and modify the other user's records by changing identifiers. A polished interface cannot compensate for a backend that trusts hidden form fields.

Require review for consequential changes

Present the exact object, amount or message before a consequential action. Approval for one refund must not become permission for all refunds. Bind approval to the proposed parameters and expire it after a short, defined period.

When the proposal changes, ask for a fresh decision. Keep the final operation idempotent so a repeated click or network retry cannot send two messages, create two purchases or apply the same credit twice.

Keep an emergency off switch

Maintain a way to disable an integration or revoke a token without taking the whole application offline. During a pilot, review failed authorization attempts and unexpected tool combinations as well as successful actions.

Use CloudWira project and account permissions for supported app features, and separately scope any external AI provider credentials. Store secrets in a suitable backend secret store; never publish them inside browser JavaScript or a downloadable HTML file.

Turn a vague permission into an executable rule

Consider a quotation assistant for a repair business. “Access customer information” is too broad to review. Replace it with specific operations: read the signed-in customer's service requests, read public price guidance and create a quotation draft for the current request. Sending that quotation, changing a customer's address and issuing a refund are separate operations. Each should have its own authorization check and audit entry.

Write a compact permission record for each tool: actor, allowed resource, permitted action, required approval and expiry. For example, an assistant may draft a reply for account A until the current support session ends. It may not search all accounts because a document mentions another email address. The backend must derive account identity from the authenticated session, rather than accepting whichever account identifier the model supplies.

Treat reads, exports and writes differently

Read access can still expose sensitive information. A tool that returns every record may leak customer details even if it never changes anything. Return only the fields and rows needed for the current task. For a status enquiry, a booking date and status might be enough; internal notes, billing history and uploaded identity documents may be unnecessary. Limit pagination and bulk export independently from individual record lookup.

For write tools, validate the current state immediately before committing. A previously approved quotation might have been cancelled while the assistant was preparing a message. The execution layer should reject stale instructions and request a fresh review. Keep proposed values separate from saved values so the interface cannot accidentally present an unapproved change as complete. An approval should describe the specific action, not unlock unlimited future actions.

Test permissions with realistic misuse attempts

Create two test accounts with different projects. Ask the assistant to retrieve the other account's record using a guessed identifier, a copied link and an email found in a document. Try an expired session, a revoked integration and a tool call that asks for more fields than allowed. A passing result is a denied operation with no private payload, rather than a polite model response after the backend already returned the data.

Repeat these checks on downloads, search results, exports and administrative views. Different routes often use different queries, which is why a secure detail page does not prove an export is safe. Save the expected behavior alongside the test account roles. When you add a new tool, extend this permission matrix before exposing the tool to the agent. That makes authorization a repeatable release check.

Plan revocation and operational ownership

Give each integration a named owner and a reason for its existence. Review credentials when a team member leaves, a supplier changes or the task scope shrinks. Prefer access that can be revoked without rebuilding the whole app. Never place a backend secret in a published HTML file, browser storage or a prompt that could be displayed to a customer.

The emergency stop should block future execution even if an agent is still reasoning. Record the action reference and outcome needed for investigation without storing every private input indefinitely. In a CloudWira interface, test managed data permissions separately from any external AI backend permissions. Both boundaries must work. A convenient assistant connection is useful only when the underlying tools enforce the same limits after the model makes a mistake.

Does a careful prompt replace tool authorization?

No. A prompt can describe the intended boundary, but the service executing a tool must independently validate the actor, resource and action. Assume that a model can generate an incorrect identifier or follow a misleading document. The forbidden operation should still fail before private data is returned or a change is made. Test that boundary directly instead of judging only the assistant's wording.

Keep a small permission checklist with every tool release: necessary fields only, verified tenant scope, bounded bulk access, current authorization at execution and a revocation path. Include a test where the model requests something outside its intended role. A useful tool error should allow a safe handoff without revealing another account's information. This checklist is short enough to repeat whenever a new integration expands the app's capabilities.

Continue reading