Skip to content

External application flow

An external application authenticates to IsardVDI with the external secret created in the management panel. From this secret, the application obtains an external application token. With this token, it can create, link and delete users within its category, and obtain user tokens to act on their behalf.

Scope and attribution

The apiv3 HTTP API is no longer served: the operations below are described from the current code. The exact request and response shapes are in the API reference (the OpenAPI documentation served at /api/v4/docs when ENABLE_OPENAPI is enabled).

The external secret and its token

An external secret has four values that define its token: a Key ID (kid), a Domain, a Category ID and a Role. The role is always manager: the server sets it when creating the secret. The application signs an external type token with the secret; the token contains the kid, the category_id and the role_id.

Creating or linking a user

The external application creates or links a user in its own category through the external user endpoint of the authentication service. To do so, it must send the username, name and email fields, the role and, optionally, the photo.

The code applies the following rules:

  • The application's role must be manager or higher. Since applications created from the panel always have the manager role, they meet this condition.
  • A user cannot be created with a role higher than its own: an external application can create users with the user, advanced or manager role, but not administrators.

The user is placed in a self-managed group tied to the application (external_<kid>) within the application's category. This ensures that each created user stays within its tenant.

Generating a user token

To act as one of its users, the application requests a user token. With this token, the application uses the IsardVDI API exactly as that user would, subject to the limitations of the user's role and category.

Deleting a user

The external application can delete a user it manages within its category.

Using the API as a user

With a user token, the external application uses the standard IsardVDI API. For example, it can perform the following actions:

  1. Create a deployment.
  2. Get direct access links to the viewer.
  3. Stop a desktop.
  4. Recreate a desktop.
  5. Edit the co-owners of a deployment.

These are the same endpoints the product itself uses. To check the current apiv4 routes, see the API reference.