mar_…) with
MARINA_TOKEN or marina setup --token.
Declare scopes
Declare scopes inmarina.json under access, then deploy. Each scope maps to
a short description of what it allows. access requires an entrypoint.
marina.json
Create and manage keys
A workspace admin or the app’s creator manages its keys. Run these commands in the linked project directory, or pass--app <slug>:
Copy the key when it is created. Marina stores only a hash and cannot show it
again; if it is lost, create a new key and revoke the old one. Store the key in
your CI provider’s secret store, not in source control.
A key can carry only scopes that the app’s live version declares. Key names
are 1 to 60 characters. Keys without
--expires-days last until revoked.
With the Marina API
The same operations are available with a workspace API key that has thepublish permission. The user who created the API key must be a workspace
admin or the app’s creator. {app} is the app’s slug or id.
key.token is the only copy of the key.
Call the app
Send the key as a bearer token to the app’s URL:Authorization header before the request reaches your
app. An Authorization value that does not begin with mak_ is not treated
as an app key; the request follows the normal sign-in flow.
Check scopes in your app
Each request tells your app who is calling:
Marina removes any
x-platform-* header a caller sends, so your app can trust
these values. Check the principal and the scope before doing the work:
x-platform-user-id must handle its absence. Connection calls act for a
signed-in person, so during an app key request they fail with
Connection calls require an authenticated app request.
Scopes follow the live version
A key presents only the scopes that are both on the key and declared by the version it reaches. Removing a scope frommarina.json and deploying, or
rolling back to a version without it, removes that scope from every existing
key. A key with no remaining scopes is refused.