For security leads
For the security lead
The control sits outside the agent, holds the credentials and refuses when it cannot decide. This page also says what it does not protect against.
The enforcement point
Sefra is a network service between agents and systems of record. It does not depend on the agent's code, framework or model behaving well. An agent reaches a system only by submitting a typed intent, which Sefra validates, decides and executes itself.
This holds only once the agent's own credentials for those systems are revoked. It is a required deployment step, and until it is done the agent can go around the gateway.
Credentials
- Sefra calls each system with its own service credential. Agent tokens are never forwarded.
- Credentials are read at run time and cached for up to 5 minutes by default. After that, a value that cannot be read is not reused, and nothing is sent.
- You scope each credential in the system of record, to exactly the operations of the active bundle. Sefra does not check that scope.
- The system of record must refuse every other caller, the agent's own credentials included. Check this yourself: the agent's old token should get a 401 from each system.
The system of record sees Sefra's technical user as the actor. The person and the agent are in Sefra's audit trail. Credentials per user are planned:
Per-user credentialsPlanned
Fail closed
If Sefra cannot establish that a write is allowed, or cannot record it first, it does not send it.
| Failure | Result | Effect |
|---|---|---|
| The audit write fails | No call | Before a call: the state change fails and the system is not called. After a call: the write is retried and the workflow waits, so nothing proceeds unrecorded |
| The identity provider is down | Refused once tokens expire | Sefra keeps using the signing keys it last fetched, so tokens already issued work until they expire. With no cached keys, requests are refused |
The other failure cases are in the fail-closed table on the security page.
No model in a decision path
Validation, policy, approval matching, retries and compensation are deterministic code and data. The same intent, facts and policy version give the same decision.
Each decision's record holds the hash of its policy input, the bundle digest and the injected time. The input is kept as an audit payload, so a replay can evaluate the decision again while that payload exists.
What a compromised agent can and cannot do
Assume an attacker fully controls the agent, and that the target systems refuse every caller except Sefra.
It can
- Submit any intent it was granted, within its rate limits. A wrong request that policy allows will execute.
- Read whatever its granted read intents return.
- Try to mislead an approver through its rationale or the values it submits. The rationale is labelled unverified and summaries use typed fields, which reduces this and does not eliminate it.
- Repeat an action under new idempotency keys. Only a duplicate rule in your bundle and the rate limits stop that.
- Keep probing below the denial breaker. 20 rejections at validation or policy within 10 minutes suspend it until an operator lifts that. A slower rate does not.
It cannot
- Call a fronted system directly, once that system refuses every caller except Sefra.
- See or use an intent that no grant matches.
- Approve anything, as long as your identity provider does not issue it a human-typed token and it holds no person's session. Only a human principal may decide.
- Change a plan after approval. A different step, value, order or requester changes the hash, and the decision no longer applies.
- Put an irreversible step anywhere but last. The plan is refused with PLAN_INVALID.
What Sefra does not protect against
- Prompt injection. Sefra is not a prompt-injection filter or a content scanner. It judges the typed request, not the text that led to it.
- A wrong request that policy allows. It will execute. Sefra bounds the damage to what your rules permit, so the rules are the control.
- An agent that keeps its own credentials. Sefra cannot see a call that does not pass through it.
- A compromise of Sefra itself. It holds write credentials for several systems and is a high-value target. Scope each one narrowly.
- A malicious administrator. Whoever can activate bundles can allow anything. Activation is recorded, and a stronger control is planned: Signed bundlesPlanned
- Full control of the database. Someone with it can rewrite the whole hash chain. Keep the current head hash where that person cannot reach it. Planned: Anchored audit checkpointsPlanned