Applications and scopes#
An application is one consumer of the shared model: a turnaround board, a feed adapter, a vendor's product. Its permissions are set once, on the application, and every key you issue for it carries exactly those permissions.
Applications#
An application has four kinds of limit.
airports- The airports it may touch. A request for any other airport returns
airport_not_permitted. scopes- The operations it may call. See the table below.
entity_types- The entity types it may read. A ground handler's dispatch tool might read
aircraft,flight,standandvehicle, but notperson. Entities of other types are left out of every list, search and stream, as if they did not exist. feeds- The feeds it may push records to. An adapter for the stand system holds
records:writefor that feed and nothing else.
Create applications with Create an application. Changing an application's permissions takes effect on all its keys within 60 seconds, on the edge and on on-premise nodes.
Scopes#
| Scope | Allows |
|---|---|
airports:read |
Airports and their airfield model |
entities:read |
Entities, spatial and temporal queries |
observations:read |
The observation log and raw records |
events:read |
Live and replayed event streams |
feeds:read |
Feeds and their health |
feeds:write |
Registering feeds, mappings and mapping tests |
records:write |
Pushing records to the feeds listed in feeds |
scenarios:read |
Reading scenarios and their results |
scenarios:write |
Running scenarios |
webhooks:write |
Managing webhooks |
applications:write |
Managing applications and keys |
A call without the scope it needs returns insufficient_scope, and the error names the missing scope. Each operation in the reference lists the scope it requires.
Give each application the fewest scopes that work. Two common shapes:
{
"name": "RMS stand allocation adapter",
"airports": ["VTBS"],
"scopes": ["records:write", "feeds:read"],
"feeds": ["feed_51d0a9e6f2"]
}
{
"name": "Turnaround board",
"airports": ["VTBS"],
"scopes": ["airports:read", "entities:read", "events:read"],
"entity_types": ["aircraft", "flight", "stand", "vehicle"]
}
Keys#
A key belongs to one application and one environment.
| Prefix | Environment | Reads |
|---|---|---|
sl_test_ |
test |
The sandbox: a simulated day at VTBS. Writes go to a private copy that is discarded after 24 hours. |
sl_live_ |
live |
Production data for the application's airports. |
Send the key as a bearer token:
The secret is shown once, when you create the key. SurfaceLens stores only a hash. To rotate, create a new key, deploy it, then revoke the old one; an application may hold up to five keys at once. Revocation reaches on-premise nodes within 60 seconds and closes open streams that use the key.
Keys belong in a secret store, not in source control or client-side code. A browser application should call your own backend, which holds the key.