Identity · Authorization · Architecture المدونة
An AI agent is not a user
The quick way to connect an agent is a service account and an API key.
That makes the agent a super-user that nobody signed off.
Here is the other way, followed through one request from sign-in to the ERP.
- Written for
- Enterprise architects who decide how AI agents get identity and access in their company.
On this page
- 01The shortcut that makes an agent a super-user
- 02Three kinds of caller, one identity record
- 03A person is checked on every request, in layers
- 04The agent gets no password
- 05Effective authorization is an intersection, not a sum
- 06One door for every side effect
- 07When a person must decide
- 08Where the guarantees end
- 09Questions to ask of any agent platform
- 10Next step
01The shortcut that makes an agent a super-user
An agent is neither a user nor a service account. It is a workload that acts for someone, inside limits that were set before it started.
Every architect has seen this pilot. A team wants an agent to update the ERP. The fastest path is a service account with an API key. The agent uses the key for every call, for every person it helps, at any hour.
Look at what that grants. The key has the rights of the service account, not the rights of the person who asked. It does not expire when the task ends. Every call in the ERP log carries the same name, so nobody can say later who the agent acted for. The agent is a super-user that no access review ever approved.
The opposite shortcut is no better. If the agent simply inherits the user's rights, it can do everything that person can do, including things the person would never do in this task.
Falak takes a third path. The agent gets no account and no password. It gets an identity for one piece of work: who it acts for, which agent definition bounds it, and a short lifetime. Every change it wants to make passes one gateway, and every check there must agree.
- The shortcut. The agent runs as a service account. One standing API key gives it broad rights, so any call can reach every system and every record, at any time. Nobody signed off on this reach.
- A bounded workload. The agent acts for one person. It asks the gateway for one action. The gateway checks the call, then makes one call to the ERP with a short-lived key.
To keep it concrete, we follow one request through the platform. A requester in procurement asks to onboard a new supplier, Nordwind Industrial Components. An agent prepares the supplier record. Then the agent wants to create the supplier in the ERP. At each step we ask the architect's question: who is acting right now, and why is that allowed?
02Three kinds of caller, one identity record
People, systems and agents reach Falak in different ways. All of them end up as the same kind of record, and every later check reads that record.
The requester starts in the workbench. She signs in through the company's single sign-on. Falak uses OpenID Connect with the authorization code flow and PKCE (proof key for code exchange), so a stolen redirect code is useless on its own.
After sign-in, Falak keeps the session on the server. The browser holds a random session token, and the database stores only a hash of it. A session lasts 8 hours at most by default. While it is open, Falak checks with the identity provider at intervals, so a person disabled there does not keep working here.
There is one emergency door. An administrator has a sign-in that does not go through single sign-on. That sign-in is audited, and if the audit record cannot be written, the sign-in fails. The door does not open quietly.
Other systems call Falak with signed service tokens. Webhooks from outside carry an HMAC signature (a keyed hash of the message) and a timestamp, so a changed or stale message is refused.
Agents do not sign in at all. Falak creates their identity when work starts.
- People sign in through company single sign-on, with OpenID Connect and PKCE.
- Systems use signed service tokens and signed webhooks.
- Agents have no password and no sign-in. Falak sets their identity.
- One principal record holds the id and kind of the caller, its tenant, its roles and its access subjects. Every later check reads this record.
All three end as a principal: the platform's record of who is calling. It holds an id, a kind (person, workload, service or external guest), a tenant (the company the data belongs to), roles and access subjects. Access subjects are the groups that decide which documents a caller may read.
03A person is checked on every request, in layers
A role opens the door to a route. It does not open the case. Five layers apply to a person's request, and any one of them can refuse it.
The requester opens the onboarding case. Falak checks her request in this order:
- Route role. May this kind of user call this route at all?
- Named permission. Does one of her roles grant the permission the action needs, such as managing policy or reading the audit log?
- Grant on the resource. Does she hold a grant on this case? Grants come in three kinds: view, decide and act. They are scoped by dimensions such as company and business unit. If a dimension is missing, the answer is no, not "everything".
- Business rules. Separation of duties, four eyes on sensitive changes, and the rules for closing a case.
- Tenant isolation. Every database transaction must prove which tenant it serves. The database refuses a statement without that proof.
- Route role. May this kind of user call this route?
- Named permission. Does a role grant this permission?
- Grant on the resource. View, decide or act, by company and business unit. A missing dimension denies.
- Business rules. Separation of duties and four eyes.
- Tenant isolation. The database refuses a statement that does not prove its tenant.
- Result. Only a request that passes all five layers is allowed. Roles add up. Checks multiply.
Roles add up: two roles give the permissions of both. Checks multiply: the request must pass every layer. It is familiar role-based and attribute-based access control, applied on the server to each request.
04The agent gets no password
An agent's identity is two parts carried together: who is acting, and which agent definition bounds the call. It lives for one task and a few minutes.
The requester submits the request. Falak starts the onboarding work and hands it to an agent. No password, key or token is issued to the agent. Instead, Falak attaches an identity to the work itself.
That identity has two parts that always travel together:
- Who is acting. Either the person who started the work, or a workload identity that has no roles at all.
- Which agent definition bounds the call. The registered name and version of the agent.
It also names the task, the person who originated the work, and a lifetime of 15 minutes by default. Falak renews it while the work goes on. When the work stops, nothing is left that a thief could reuse.
- Who is acting. The person who asked, or a workload with no roles.
- Which agent definition. The registered name and version. It bounds what the call may do.
- Its reach. The agent definition declares its tools, its autonomy ceiling and its policy rules.
- Carried with it. The task, the originator (always recorded) and a short lifetime of 15 minutes, renewed while the work goes on.
- Not held. No password, no standing key and no roles of its own. The agent's reach is its definition, never a role.
The agent definition has no roles of its own. Its reach is what it declares: a list of tools, an autonomy ceiling and a set of policy rules. The autonomy ceiling is the highest class of action the agent may take without a person. Our first post explains the classes, from A0 to A3.
So no system sees "the agent" as an all-purpose account. Every action is tied to the workload, the agent definition and the person it serves.
05Effective authorization is an intersection, not a sum
The agent may act only where every limit agrees. It does not inherit the person's full rights.
Our agent now has a proposal: create Nordwind as a new supplier. What decides whether it may? Effective authorization is the set of actions that remain after every limit has been applied. In Falak, these must all agree:
- No kill switch is on for the tool, the agent or the workload.
- The tool is in the agent's registered list. A tool outside the list does not exist for this agent.
- The tool is in the current process step's list. A step that collects documents cannot write to the ERP, even if the agent could in another step.
- The action is inside the delegated authority. Delegated authority is the scope handed down with the work. When one agent hands work to another, the child's authority can only be the same or narrower than the parent's, never wider.
- Policy allows it. A deny wins over an allow. If no rule matches, the answer is deny. If the policy cannot be loaded or evaluated, the answer is deny.
- A valid approval exists, where the action needs one.
- Budget is left for calls and time.
- What the person may do. Wide, and not inherited by the agent.
- Delegated authority. It only narrows, from parent to child.
- The agent's registered tools. Its declared list, nothing else.
- This step's tools. What the current process step allows.
- Policy allows. A deny wins. No matching rule, or no policy, means deny.
- A valid approval, where the action needs one.
- Runtime limits. No kill switch is on, and budget is left.
- One permitted action. The agent may act only where all of the above agree. Every limit must agree, and one refusal is enough.
The person's rights are not a source of power for the agent. A policy rule may look at the person's roles, but those roles never add a tool to the agent's list or widen its delegation. An administrator who starts a task does not create an administrator agent.
06One door for every side effect
Every change to a connected system passes one gateway, in a fixed order. The code that makes the change runs last, with a credential made for that one call.
The agent's proposal now reaches the tool gateway. A side effect is any change outside Falak: a new record in the ERP, an email, a posting. All of them pass this one door, and its checks run in a fixed order. Is the tool registered and not switched off? Does this process step allow it? Are the arguments valid, and what is the target record now? Does policy allow the real action, with its real arguments? Is there an approval where one is needed? Do the delegated authority and the budget cover it? Falak records the intent before anything happens.
Only then does Falak mint a credential for that one call. It is short-lived (5 minutes by default) and signed with a key for that target system. It names the workload and the person it acts for. Then the handler, the code that talks to the ERP, runs last. The ERP verifies the credential before it acts.
- Registered. The tool is listed and not switched off.
- Step scope. The tool is allowed in this step.
- Arguments. They are checked, and the target is read.
- Policy. A deny wins.
- Approval. Present when one is needed.
- Authority. Delegation and budget cover the action.
- Credential. Made for this call, valid for 5 minutes.
- Handler. It runs last.
- Your system. It verifies the signed call, then acts. Any refusal on the way stops the call, and nothing reaches your system.
The agent holds no standing key to any system of record. A leaked credential is good for one target and a few minutes. And the receiving system can tell which workload acted, and for which person.
07When a person must decide
An approval is bound to the exact action a person saw. After approval, the whole gateway runs again, and any change to the action voids the approval.
Creating a supplier is an A3 action, so the gateway pauses and asks for a person. The approver opens the request in the workbench. She sees the exact record that will be written, not a summary.
Her approval is bound to that exact action: its arguments, the target record and its version, and the version of the policy that applied. Separation of duties holds here too. The person who asked cannot approve her own request. The one exception is an explicit override role, which is a named grant that an access review can see.
After approval, the action does not skip ahead. It runs through the whole gateway again, every check in order. If the arguments differ from what she approved, the gateway refuses. If the target changed in the meantime, the approval no longer matches.
- Proposed action. The agent proposes to create the supplier.
- Gateway. It runs every gate in order and finds that the action needs approval.
- Approver decides. She sees the exact action. She is never the requester.
- Approval bound. To the arguments, the target version and the policy version.
- Run again. The action passes the full gateway a second time.
- Same as approved? If yes, Falak acts in the ERP, and the agent's identity is unchanged. If the action changed, it is refused and the approval is void. An approval covers the exact action a person saw.
One thing does not change: the agent's identity. An approval lets one action through. It adds no role to the agent, and it does not widen the agent's tools for the next call.
08Where the guarantees end
These controls are strong, but they are not magic. Know where each one stops, and ask the same of any platform.
Grants are checked when work is admitted. The requester's grant on the case is checked when the work starts. It is not read again before every tool call. Revoking a person's grant, stopping work that is already running and revoking credentials already issued are three separate mechanisms, and each has its own timing. A run in flight is stopped with the kill switch, not by an access review.
Some connections use a platform credential. The model provider and a data platform are reached with a credential that Falak holds, not one minted per call. Falak attributes each use to the work that made it in its own records, but the provider sees the platform, not the person.
The process is a trust boundary, not a sandbox. Packs (the code for one business process) run inside Falak's own process. The gateway governs the supported path. It is not an operating-system sandbox for hostile code, so review a pack before you admit it, like any other code you deploy.
Coverage depends on the connector. A per-call credential protects only if the receiving system checks it, and checks it at the right level. A broad write scope in a credential is not a check on a single record. Each connector needs its own review.
09Questions to ask of any agent platform
Use these questions to test any agent platform, including ours.
| Question | What a good answer looks like |
|---|---|
| What identity does an agent use when it calls my ERP? | A short-lived credential per call that names the workload and the person |
| Does the agent inherit the user's rights? | No. It gets only the intersection of delegation, its tools, policy and approval |
| What happens when no policy rule matches? | Deny. Also deny when the policy cannot be loaded or evaluated |
| Can a child agent get more authority than its parent? | No. Delegated authority can only narrow |
| What exactly does an approval cover? | The exact arguments, target version and policy version, re-checked before use |
| Can the requester approve their own request? | No. Separation of duties is enforced by the platform, not by habit |
| How do I stop an agent that is running now? | A kill switch that blocks new actions at once, separate from access reviews |
| What keeps one company's data away from another's? | Isolation in the database itself, where an unscoped statement is refused |
What to do next: take one agent action in your company, such as creating a supplier. Write down who acts, which credential reaches the ERP and what refuses a wrong call. Then ask your platform to show each answer.