Managing service accounts, roles, and API tokens

Service accounts allow you to generate and manage API tokens to authenticate and connect your systems to PhariaAI. This ensures security through encryption, expiration policies, and access controls. With the ability to create, monitor, and revoke tokens as needed, our solution enables reliable and secure integration with our services.

Each service account can be assigned different access roles. A service account can hold multiple API tokens with different expiration dates.

Managing service accounts is only available for administrator users. If you need to create a new service account, contact your system administrator.


Viewing service accounts

To view your service accounts, click Service Accounts in the PhariaOS sidebar.

Service accounts are listed with their names, creation dates and assigned roles:

PhariaOS - list of service accounts

Click on a service account in the list to view its details (you can use the search bar to find a service account easily):

PhariaOS - service account details

The service account details shown are the following:

  • Name: The name of the service account.

  • Description: The description (if any) of the service account.

  • Roles: The list of access roles defined for the service account.

  • API tokens: The list of tokens associated with the service account. The actual token value is never displayed. Instead, the token list displays the token ID, the token creation date, and its expiry date. If a token has expired, an "Expired" label is shown next to the expiration date.

Creating a new service account

Creating service accounts is only available for administrator users. If you need a new service account, contact your system administrator.

To create a new service account:

  1. Click Service Accounts in the PhariaOS sidebar.

  2. Click Create account at the top right.
    The Create service account box opens:

    PhariaOS - create a new service account
  3. Enter the service account details:

    • Enter a name for the service account.

    • Optionally, enter a description.

    • In the Roles list, select the required roles for the service account.

  4. Click Create.

The new service account is added to the service account list.

See Access control for more information about roles in PhariaAI.

Adding and removing roles from a service account

Adding or removing a role from a service account affects all applications using the service account’s associated API tokens!

To edit the list of roles associated with a service account:

  1. Click Service Accounts in the PhariaOS sidebar.

  2. Click the service account you want to change to view its details:

    PhariaOS - edit roles in a service account
  3. Click the edit icon PhariaOS - edit icon after the list of existing roles.
    The Edit service account roles box appears:

    PhariaOS - edit roles in a service account
  4. Add or remove roles as required.

  5. Click Save.

Adding a new token to a service account

To add a new token to a service account:

  1. Click Service Accounts in the PhariaOS sidebar.

  2. Click the service account to which you want to add a token.

  3. Click Create token.
    The Create token for <service account name> box opens:

    PhariaOS - create a new token
  4. Select the time period after which the token will expire. You can click Custom date to specify a specific date of expiry up to one year in the future.

  5. Click Create.
    The token is created and displayed:

    PhariaOS - display token secret
    This is the only occasion when you can view the token! After you close this box, there is no way to recover the token. Only the token ID is used to identify the token subsequently.
  6. Click Copy token & close to copy the token to your clipboard and close the box. You can also click the copy icon PhariaOS - copy icon to copy the token without closing the box immediately.

After you close the box, the new token’s ID and creation date are listed on the service account details page.

Revoking a token

If you revoke a token that is still in use, any system using this token will no longer have access to the PhariaAI platform.

To permanently revoke a token:

  1. Click Service Accounts in the PhariaOS sidebar.

  2. Click the service account from which you want to revoke a token.
    The tokens for the service account are listed under API tokens.

  3. Click the kebab menu icon PhariaOS - kebab menu icon at the end of the row of the token you want to revoke.

  4. Select Revoke token.

  5. In the confirmation box, click Revoke.

The token is permanently revoked from the service account.

Editing the name or description of a service account

To rename or change the description of a service account:

  1. Click Service Accounts in the PhariaOS sidebar.

  2. Click a service account in the list that you want to edit.

  3. Click the kebab menu icon PhariaOS - kebab menu icon next to the title of the service account.

  4. Select Edit account.
    The Edit service account box appears.

  5. Edit the name and/or description of the service account in the respective fields.

  6. Click Save.

The service account is redisplayed with the new name and/or description.

Deleting a service account

Deleting a service account also deletes all its associated tokens! Any system using one of these tokens will no longer have access to the PhariaAI platform.

To delete a service account:

  1. Click Service Accounts in the PhariaOS sidebar.

  2. Click a service account in the list that you want to delete.

  3. Click the kebab menu icon PhariaOS - kebab menu icon next to the title of the service account.

  4. Select Delete account.

  5. In the confirmation box, click Delete.

The service account is permanently deleted.