Browser apps
A web page calls your services through an app you register, not an API key. The app names the sites that may call, the services they reach and how your site's users sign in.
A browser calls your services with a registered app’s ID. The app defines the allowed sites, reachable services and sign-in providers. App calls use the app account’s execution quota. For a priced cross-account call, the app’s account pays the listed tool price. The deployment account bears compute.
crab app create notes-web \
--origin https://notes.example.com \
--service you/notes \
--issuer https://accounts.google.com=1234.apps.googleusercontent.com| Flag | |
|---|---|
--origin |
A site whose pages may call, scheme://host[:port], repeatable. A call from any other origin is refused. * admits any origin, only on an app with no --issuer. |
--service |
A service its pages reach, {owner}/{name}, repeatable. |
--issuer |
A sign-in your site's users come with, as an OpenID Connect provider and your site's client id there, ISSUER=CLIENT_ID: https://accounts.google.com=… for Sign in with Google. Repeatable. |
--mcp |
Its services' own MCP servers take its issuers' tokens. --origin is optional with it. |
crab app ls lists the account's apps, crab app update <id> replaces one's fields, and crab app rm <id> deletes it. Only owners of the account manage its apps.
Signed-in users
Your site's users sign in with your site's own sign-in, never with CrabTalk. The page sends the app's id and the ID token that sign-in gave the user; the request is described in the Cloud API schema.
- The token is checked against its provider's published keys, and its issuer and client id must match one of the app's
--issuers. - The service reads the user from
berm_lang::caller(), asCaller::App { user }: their issuer and subject.
Anonymous visitors
A call through an app with no signed-in user, as a page counting its visits makes, reaches the app's services like any app call, and the app's owner pays for it. The tool sees Caller::App { user: None } and decides itself whether to serve it (Callers and users).
What is refused
- A call whose app does not exist.
- A page whose origin is not one of the app's, or a service that is not one of its services.
- A token that does not verify, or no token on an app that is not anonymous.
What the service sees
- The call's account is the app's account. An app reaches a private service when its account is the service's account or a member of it.
berm_lang::client()returns a visitor key based on the service, address and user agent, orNonewhen the address is unavailable. For those inputs, the key stays stable for one UTC day within a host process. Restarts and host moves can rotate it earlier.berm_lang::client_ip()reads the visitor's IP when the host supplies it. See Callers and users.
Limits
Cloud app calls share their owning account's execution rate and concurrency limits. Each signed-in user and each anonymous address is also limited. See Request limits.