Skip to main content

Action catalog

Available

Deployed and supported. The fields and commands described here are stable within version v1alpha1.

Each API route checks one action on one resource before responding. This catalog tells you which ones, so you can write policies as tightly as possible: allow ssm:read on secret/app-* without opening ssm:write, let a CI publish a site without being able to delete it.

Example: allow reading logs and restarting apps, nothing else.

{ "Version": "1", "Statement": [
{ "Effect": "Allow", "Actions": ["deploy:list", "deploy:read", "deploy:logs"], "Resources": ["app/*"] },
{ "Effect": "Allow", "Actions": ["deploy:write"], "Resources": ["app/*"] },
{ "Effect": "Deny", "Actions": ["deploy:delete"], "Resources": ["app/*"] } ] }

How to read the tables​

  • Resource: type/name designates an item; type/* designates the collection (list, create). An Allow on secret/* covers the collection; a partial Deny (secret/prod-*) does not block it, the service then filters item by item.
  • Everything happens in the session's tenant: a policy of another tenant does not count.
  • The managed policies readonly and readwrite are recalled in a column: R = covered by readonly, RW = covered by readwrite, A = admin only.

Deployments and applications (deploy)​

sng commandRouteActionResourceManaged
sng applyPOST /v1/apply, POST /v1/apply/completedeploy:writerelease/*RW
sng apply of a CDNSitesameadditionally cdn:writecdn/<site>RW
sng validatePOST /v1/validatedeploy:readrelease/*R
sng planPOST /v1/plandeploy:readrelease/*R
sng pullGET /v1/export, POST /v1/exportdeploy:readresource/*R
sng kind list TYPE, sng kind get TYPEGET /v1/resources/{type}deploy:listresource/<type>/*R
sng kind get TYPE NAMEGET /v1/resources/{type}/{name}deploy:readresource/<type>/<name>R
sng kind delete TYPE NAMEDELETE /v1/resources/{type}/{name}deploy:deleteresource/<type>/<name>RW
sng kind delete CDNSite NAMEsameadditionally cdn:deletecdn/<site>RW
—POST /v1/deployments, POST /v1/deployments/{id}/completedeploy:writerelease/*RW
—GET /v1/deployments/{id}, GET /v1/operations/{id}deploy:readrelease/*R
—GET /v1/releasesdeploy:listrelease/*R
—POST /v1/releasesdeploy:writerelease/*RW
—POST /v1/releases/{version}/restoredeploy:writerelease/<version>RW
sng app list, sng kind list AppGET /v1/appsdeploy:listapp/*R
sng app describe NAME, sng kind get App NAMEGET /v1/apps/{name}deploy:readapp/<name>R
sng app create NAMEPOST /v1/appsdeploy:writeapp/<name>RW
sng app patch NAME, sng app scale NAME N, sng app restart NAMEPATCH /v1/apps/{name}, POST /v1/apps/{name}/scale, POST /v1/apps/{name}/restartdeploy:writeapp/<name>RW
sng app delete NAMEDELETE /v1/apps/{name}deploy:deleteapp/<name>RW
sng app logs NAMEGET /v1/apps/{name}/logsdeploy:logsapp/<name>R

The sng app … commands are being enabled gradually; sng apply, sng kind list App and sng kind get App cover the same routes.

Secrets (ssm:*)​

sng commandRouteActionResourceManaged
sng secret listGET /v1/secretsssm:listsecret/*R
sng secret describe NAME, sng secret versions NAMEGET /v1/secrets/{name}, GET /v1/secrets/{name}/versionsssm:describesecret/<name>R
sng secret get NAMEGET /v1/secrets/{name}/valuessm:readsecret/<name>R
sng secret set NAME, sng secret restore NAMEPUT /v1/secrets/{name}, POST /v1/secrets/{name}/restoressm:writesecret/<name>RW
sng secret rotate NAME (reads the current value, then writes the new one)GET /v1/secrets/{name}/value, PUT /v1/secrets/{name}ssm:read and ssm:writesecret/<name>RW
API only: immediate rotation and cancelling the scheduled rotationPOST /v1/secrets/{name}/rotate, POST /v1/secrets/{name}/rotate/cancelssm:rotatesecret/<name>RW
sng secret delete NAMEDELETE /v1/secrets/{name}ssm:deletesecret/<name>RW
sng secret create NAME (SSMSecret manifest)POST /v1/applydeploy:writerelease/*RW

The secrets service checks the same actions when one of your applications calls it directly with a session: read ssm:read, write ssm:write, declaration ssm:declare, rotation ssm:rotate, deletion ssm:delete, always on secret/<name>.

Static sites (cdn)​

sng commandRouteActionResourceManaged
sng kind list CDNSiteGET /v1/cdncdn:listcdn/*R
—POST /v1/cdncdn:writecdn/* then cdn/<site>RW
—POST /v1/cdn/{site}/enable, POST /v1/cdn/{site}/disablecdn:writecdn/<site>RW
—DELETE /v1/cdn/{site}cdn:deletecdn/<site>RW
publishingPOST /v1/cdn/{site}/uploads, POST /v1/cdn/{site}/uploads/completecdn:uploadcdn/<site>RW
cache clearingPOST /v1/cdn/{site}/cache/clearcdn:purgecdn/<site>RW

See Static sites for the corresponding commands.

Environments (env)​

sng commandRouteActionResourceManaged
sng env listGET /v1/envenv:readenv/*R
sng env checkout NAME, sng env refreshPOST /v1/env/checkout, POST /v1/env/refreshenv:writeenv/*RW
sng env restore REFPOST /v1/env/restoreenv:adminenv/*A
sng env create-tenant NAMEPOST /v1/env/create-tenantenv:adminenv/*A

Resource tier (tier)​

sng commandRouteActionResourceManaged
sng tenant tier listGET /v1/tierstier:listtier/<tenant>R
sng tenant tier showGET /v1/tiertier:readtier/<tenant>R
sng tenant tier set TIERPUT /v1/tiertier:writetier/<tenant>A

tier:write is not in readwrite: changing the tier requires admin.

Policies and sessions (policy, iam, oidctrust)​

sng commandRouteActionResourceManaged
sng tenant use, sng tenant assumePOST /v1/iam/session, POST /v1/iam/session/assumeiam:assumeroletenant/<tenant> (policy of the target tenant)A, assume-role
sng tenant policy list, GET /v1/iam/bindingsGET /v1/iam/policies, GET /v1/iam/bindingspolicy:listpolicy/*R
sng tenant policy get NAME, principals NAMEGET /v1/iam/policies/{name}, …/principalspolicy:readpolicy/<name>R
sng tenant policy create|update|delete NAMEPUT|DELETE /v1/iam/policies/{name}policy:adminpolicy/<name>A
sng tenant policy attach|detach NAMEPOST /v1/iam/policies/{name}/attach|detach, PUT|DELETE /v1/iam/bindings/{name}policy:adminpolicy/<name>A
sng tenant oidc listGET /v1/iam/oidc-trustsoidctrust:listoidctrust/*R
sng tenant oidc get NAMEGET /v1/iam/oidc-trusts/{name}oidctrust:readoidctrust/<name>R
sng tenant oidc create|delete NAMEPUT|DELETE /v1/iam/oidc-trusts/{name}oidctrust:adminoidctrust/<name>A

Your end users (auth)​

/v1/auth/… routes: they always apply to the directory of the session's tenant.

sng commandRouteActionResourceManaged
sng iam user listGET /v1/auth/usersauth:ListUsersauth/users/*R
sng iam user describe IDGET /v1/auth/users/{id}auth:ListUsersauth/users/<id>R
sng iam user disable|enable IDPOST /v1/auth/users/{id}/disable|enableauth:ManageUsersauth/users/<id>A
sng iam user roles IDPUT /v1/auth/users/{id}/rolesauth:ManageUsersauth/users/<id>A
sng iam user delete IDDELETE /v1/auth/users/{id}auth:ManageUsersauth/users/<id>A
sng iam invitation listGET /v1/auth/invitationsauth:ListUsersauth/invitations/*R
sng iam user invite EMAIL, sng iam invitation delete IDPOST /v1/auth/invitations, DELETE …/{id}auth:ManageUsersauth/invitations/*A
sng iam role list|describeGET /v1/auth/roles[/{name}]auth:ListUsersauth/roles/*R
sng iam role create|update|deletePUT|DELETE /v1/auth/roles/{name}auth:ManageRolesauth/roles/<name>A
sng iam login-page showGET /v1/auth/settingsauth:ListUsersauth/settingsR
sng iam login-page setPUT /v1/auth/settingsauth:ManageLoginPageauth/settingsA
sng iam app credentials NAMEGET /v1/auth/applications/{name}/credentialsauth:ReadCredentialsiamapp/<name>R
sng iam app rotate NAMEPOST /v1/auth/applications/{name}/rotateauth:RotateCredentialsiamapp/<name>A

auth:ReadCredentials and auth:RotateCredentials are in neither readonly nor readwrite: only the admin policy reads or renews an application's credentials. The sng iam app list\|describe and sng iam provider list\|describe commands read the IAMApplication and IAMProvider objects of the desired state; they read resources like sng get and fall under the read actions of those kinds.

sng tenant destroy NAME: DELETE /v1/tenants/{tenant}, iam:admin, tenant/<tenant>.

Image registry (registry)​

The registry checks each docker / sng registry operation with your session. The resource is the repository declared by a RegistryRepository.

OperationActionResourceManaged
docker pull, reading a manifest, vulnerability scanregistry:pullrepository/<repository>R
docker pushregistry:pushrepository/<repository>RW
deleting a manifestregistry:deleterepository/<repository>RW
docker login (session check only)registry:pullrepository/login-probeR
sng registry access-key credentials NAME (reading the credentials of an access key)registry:adminaccesskey/<name>A
sng registry access-key rotate NAME (immediate renewal of an access key)registry:rotateaccesskey/<name>A

Registry access keys (RegistryAccessKey) and anonymous pulls of public repositories do not go through policies: a key has exactly the rights declared in its manifest. See OCI registry.

Encryption (kms:*)​

The actions kms:wrap, kms:unwrap and kms:rewrap are accepted in a policy, but encryption is reserved for the platform in this version: it encrypts your secrets for you. A kms:* policy in your tenant opens no access.

DNS (dns)​

Beta

Being rolled out. The interface described here is the one of the next release: it may still change, and may not be enabled on your tenant yet.

Being enabled gradually on tenants, with DNS management.

sng commandRouteActionResource
sng dns zone listGET /v1/dns/zonesdns:listdnszone/*
sng dns zone create DOMAINPOST /v1/dns/zonesdns:writednszone/*
sng dns zone describe DOMAINGET /v1/dns/zones/{domain}dns:readdnszone/<domain>
sng dns zone delete DOMAINDELETE /v1/dns/zones/{domain}dns:deletednszone/<domain>
sng dns record listGET /v1/dns/recordsdns:listdnsrecord/*
sng dns record set NAMEPUT /v1/dns/recordsdns:writednsrecord/<id>
sng dns record describe IDGET /v1/dns/records/{id}dns:readdnsrecord/<id>
sng dns record delete IDDELETE /v1/dns/records/{id}dns:deletednsrecord/<id>
sng apply of a DNSRecord / DNSZonePOST /v1/applyadditionally dns:writednsrecord/<name> / dnszone/*

With DNS, readwrite gains dns:write and dns:delete. See DNS and domains.

Monitoring​

Monitoring resources (Monitor, NotificationChannel, StatusPage) go through sng apply: these are the deploy:* actions above. No dedicated monitoring:* action exists in this version.

Routes outside policies​

A few routes do not check a policy: they carry your identity, not a session.

sng commandRouteWho
sng sso whoamiGET /v1/iam/meany signed-in user
sng sso logoutPOST /v1/iam/logoutany signed-in user
sng tenant listGET /v1/tenantsany signed-in user (lists the tenants where they hold a policy)
sng tenant create NAMEPOST /v1/tenantsany user registered on StackNGO
sng template list|search|genGET /v1/templates[/{kind}]any signed-in user
—GET /v1/iam/jwks.jsonpublic

See also​