Every app lives in its own box. Only the admin opens a door.
An app may do anything with its own data. Everything beyond it, an outside host, another app, the names of your people, a password, opens only when the admin permits it by name. The contract asks, the admin decides, and the platform enforces it on every call, whoever wrote the code.
Inside its box, an app needs nobody's permission. Outside it, it needs the admin's.
Every app gets its own database schema and role, its own files, jobs, events, flows and address. That is the box, and inside it nobody has to approve anything. Everything beyond it is a request in the contract and a decision of the admin.
Inside the box: no questions asked
- Its own data: tables and views in its own schema, under its own database role.
- Its own files in its own buckets.
- Its own jobs, schedules, table events, long-running flows and the events those flows raise as they move.
- A nudge to its own people: a short message from a job to the open page of a person it names, in this app only.
- Its own frontend at its own address.
Which of your people may open the app is still the admin's call, through the app's roles.
Beyond the box: only by permit
- Outside hosts: each
host:portthe code may reach withfetch, or in one long call the gateway makes for it. - Other apps: one job or one operation of another app.
- People and apps of the platform: fixed read-only views, never the platform's tables.
- The person's own token from the company login, to work in another system in their name.
- Events of other apps: a row created, changed or deleted elsewhere.
Secrets are not permits: the contract names them and the admin sets every value (below).
The contract asks. The admin decides. The gateway holds the door.
One app, reports, wants a supplier API, a CRM, two other apps, the list of its users, the person's own token and an event from the leave app. Here is how that goes from the contract to a running call.
export default contract({
app: 'reports',
secrets: ['CRM_URL', …], // names only
permits: {
egress: ['api.acme.example:443',
'stats.example.net:443',
{ secret: 'CRM_URL' }],
api: ['erp/orderStatus', 'wiki/importPages',
'$view/myMembers', '$idp/accessToken'],
},
jobs: {
digest: job('digest', {
events: ['leave:request.create'],
}),
},
})
The contract only asks. Nothing it lists opens by itself, and nothing it lists blocks a deploy.
Permits
0 of 8 permitted7 of 8 permitted · 1 denied6 of 8 permitted · 2 denied Permit all (8)Permit all (7)| Kind | Name | State | In the run |
|---|---|---|---|
| egress | api.acme.example:443 new | permitdeny— | fetch → 403fetch ✓ |
| egress | crm.acme.example:443 ← CRM_URL new | permitdeny— | fetch → 403fetch ✓ |
| egress | stats.example.net:443 new | permitdeny— | fetch → 403 |
| api | erp/orderStatus new | permitdeny— | call → 403call ✓as jana@acme.example |
| api | wiki/importPages new as app bypasses owner wiki:editor | permitdeny— | call → 403call ✓as the app reports |
| api | $view/myMembers new | permitdeny— | call → 403call ✓email, name, role |
| api | $idp/accessToken new person's IdP token | permitdeny— | call → 403call ✓while they're signed in |
| event | leave:request.create new | permitdeny— | not delivereddigest runs |
The requests sit in the contract: outside hosts, jobs and operations of other apps, platform views, events of other apps. Asking opens nothing and never blocks a deploy. The build goes live, and whatever has no permit stays shut.
Every request is a row in the app's detail: permit, deny or undecided. The admin denies the tracker an agent slipped in and permits the rest in one go. A denied request stays denied, in this build and the next.
A call into another app goes as the signed-in person, and that app checks their roles as if they had clicked. Only a job whose author marked it for this runs for the calling app, and the admin sees exactly which owner check it skips.
Apps never read the platform's tables. They read people through fixed, read-only views, and only with a permit. With one more permit, a job gets the signed-in person's token from the company login and works in another system in their name, only while they are signed in.
Denying works from the next request, call or event, without a redeploy. Every change is a log line and an event, so an admin app can react to it.
The contract names a secret. The admin sets it. The code gets only what it must.
Passwords, API keys and OAuth clients live in the platform's encrypted store, never in the code, the repository or the contract. The same app, reports, needs six of them.
export default contract({
app: 'reports',
secrets: ['CRM_URL', 'CRM_TOKEN', 'ERP_BASIC',
'MAIL_OAUTH', 'CHAT_WEBHOOK'],
permits: { … },
jobs: {
intake: job('intake', {
api: { owner: s.role('integration'),
key: 'ERP_INBOUND', … },
}),
},
})
env.SECRETS.CRM_TOKEN // string | undefined
env.SECRETS.CRM_TOKN // type error
await env.OAUTH.token('MAIL_OAUTH')
Secrets
0 of 6 set5 of 6 set| Name in the app | Source | Value | In the code |
|---|---|---|---|
| CRM_URL | — not set —app plain | —https://crm.acme.example/ | undefinedthe value |
| CRM_TOKEN | — not set —app secret | —ENC(…) · Change | undefineddecrypted, per run |
| ERP_BASIC | — not set —app basic | —reports · •••••• | undefinedbase64(user:pass) |
| MAIL_OAUTH | — not set —shared MAIL_NOREPLY | —oauth · login.acme.exampleoauth · rotated just now | token() → 400tokens only |
| ERP_INBOUND · job intake | — not set —app key | —sha-256:*** · Generate | every caller → 401nothing at all |
| CHAT_WEBHOOK | — not set — | ⚠ the app gets undefined | undefined |
The contract lists the names the app needs, and nothing else. No value sits in the code, the repository or the contract file the admin reads. A name gives the app nothing until the admin sets its source.
For each name the admin enters a value just for this app, or points the name to a shared entry that several apps use. A name without a source is
undefinedin the code, never somebody else's value.Values and secrets arrive with each run, decrypted, never through the worker's environment. A login and password arrive only as the finished header value. An OAuth client stays with the platform, which hands out short-lived tokens. An incoming API key never reaches the code at all.
A new value applies from the next run: no build, no deploy, no restart. A shared entry rotates for every app that points to it. The platform never logs a value, and every change is an event an admin app can act on.
Asking, deciding and running are three different hands
The person who writes an app cannot grant it anything. The person who grants does not have to read its code. And the code gets exactly what was granted, checked by the gateway on every call.
Writes the contract: the secrets the app needs by name, the hosts, apps, views and events it wants to reach.
Sets every secret, permits or denies every request, and sees for each app which other apps can reach it.
Sees what their app asked for and what was decided. Learns nothing about the insides of other apps.
What was permitted and set, and nothing else, whatever it tries. The boundary is in the gateway, not in the code.
Uses an app's published tools with the person's roles. It never sees a secret and never reaches administration.
Simple enough to explain to an auditor
Administration can be an app too. An admin app hands out roles, sets permits and secrets and reacts to every change, from its own screens or on a schedule, through the same rules as the admin screen. Only admins upload and open it, and it reaches other apps and outside hosts only through permits a human admin gives it.
Which integration worries you most?
Tell us which systems your apps need to reach. We'll show you what the contract asks for, what your admin sees and what the code gets, on your own infrastructure.