Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Service accounts

Give a server or script its own identity to call the platform.

A service account is a non-human identity. A server or script signs in as the service account with a key file, instead of using a user's login or an API key. Open Admin → Service Accounts to create and manage them. Service accounts apply to the whole account.

A service account holds capabilities, as an API key does, but fewer. Grant only the capabilities that the server or script needs. See What a service account can hold.

Unlike an API key, a service account doesn't use a secret that you paste. It signs in with a key file that holds a private key.

Create a service account

  1. Select Create Service Account.

  2. Enter the account's Name, such as CI bot.

  3. Under Capabilities, use the search box, or expand a group and check each capability the account needs.

  4. Select Create.

Field
Description
Required

Name

A label for the account, such as CI bot.

Yes

Capabilities

The capabilities the account's server or script needs. Check only what it needs.

Yes

After you select Create, Qore offers to create a key: "Create its key now, or cancel and add one later from its page." Set Expires on, or leave it empty for a key that never expires. Then select Create Key. To skip the key, select Cancel, and Qore creates no key.

The new account appears in the list as Active, with its Client ID and a capability count, such as 1 capability. Until you create an account, the list is empty.

What a service account can hold

A service account can hold the same capabilities as an API key, except the eleven capabilities below, which build or import things.

Area
Capabilities not available to a service account

Apps

Build an app, build an app headlessly, import an app

Agents

Build an agent, build an agent headlessly, import an agent

Data sources

Build a data source

Knowledge Content

Build knowledge, import knowledge

Flows

Build a flow

Design System

Manage design systems

So the Apps, Agents, Knowledge Content, Flows, and Design System groups have fewer capabilities here than in Create API Key.

Manage a service account

Open a row's ⋯ menu to view, edit, disable, or delete the account.

Action
What it does

View

Opens the account's page. The page lists the Client ID, Status, and Created date, and a Capabilities dropdown.

Edit

Changes the account's settings.

Disable

Stops the account from signing in without deleting it.

Delete

Removes the account and its keys.

Under Keys on the account's page, review each key's Key ID, Status, Expires, and Created date. Select Create Key to add another key.

Disable stops the account from signing in without deleting it. Keys that are inactive, expired, or deleted can't sign in. A service account that is inactive, or that sits in a deactivated account, can't sign in either.

Delete removes the account and its keys. Qore asks "Delete service account?" and warns, "Its keys are deleted too, and anything using them stops working. This cannot be undone." Select Delete to confirm.

How a key signs in

A key file holds a private key. The caller signs a short-lived assertion with that key, then exchanges the assertion for an access token. This follows the OAuth JWT-bearer grant. Qore checks each of the following conditions and refuses the sign-in if any check fails, with a 401 error.

Check
Requirement

Claims

The assertion names the service account as both issuer and subject, and has an issued-at time, an expiry, and a unique ID.

Age

The assertion is at most 5 minutes old, with 60 seconds of clock tolerance.

Reuse

Qore refuses an assertion that was already used, so a replayed assertion fails.

Status

The key is active and not expired, and the service account is active.

Sign in from Node

In Node, pass the parsed key file to the SDK as serviceAccountKey, with the projectId to work in:

The SDK gets its own access token and renews it 60 seconds before it expires. If the service account or its key is turned off or deleted, the renewal fails, and the SDK raises AuthenticationError. See The Agent Development SDK.

What's next

Last updated

Was this helpful?