API Authentication

It's crucial to grasp the context of the domain and tenant in every request. This understanding is key to navigating the system effectively. For a comprehensive understanding, please refer to the Regions, domains and tenants from the User Guidelines.

Token Authentication

Once a user is authenticated, a token is generated for authorisation and access to a NebularStack environment. A token can have a variable life span; however, the default expiry value is one hour. The recommended expiry value is set to a low value that allows enough time to complete tasks.

In short, NebularStack uses JWT (JSON Web tokens), which is the proposed Internet standard for creating data with optional signature and/or optional encryption whose payload holds JSON that asserts some number of claims. The claims in our case would be role assignments and the current scoped domain and tenant. The tokens are signed using certificates. Any tampering with the token would invalidate it.

Using token authentication, you have un-scoped and scoped tokens. Scoped means the token has been generated for a specific domain or domain and tenant. Based on the roles assigned to the authenticated user for the domain and tenant, those roles are set within the token.

Tokens can be renewed anytime and re-scoped to another domain and tenant. During the re-scope or renewal, a newly updated token is provided. If your token is scoped to a domain and not within a tenant with sufficient roles to perform desired actions on all relevant tenants, you only need to use the X-Tenant-ID header on any requests in that domain to set the tenant-id for the request.

Almost all requests require a X-Auth-Token header to any service endpoint.

POST
/v1/token
(identity)

Authenticate and obtain valid token.
Service
identity

Scope Token Context

It is necessary to update a token to change context, when working with an unscoped token.

PATCH
/v1/token
(identity)

Scope token to specific domain.
Service
identity

Renew Token

PUT
/v1/token
(identity)

Renew token before it expires.
Service
identity