Service Accounts
Introduction
A service account represents an application, service, or automated process rather than a human user. These accounts are employed for running background jobs, connecting systems, or performing specific operations without requiring manual intervention.
Project owners or administrators can create and delete service accounts as needed. These accounts can act as collaborators on other projects, just like regular users, and can hold roles such as supergraph admin or subgraph admin.
Additionally, project owners or administrators can regenerate service account tokens, making them a secure and ideal alternative to Personal Access Tokens (PAT) for use in CI/CD workflows.
In order to create service accounts, your project must either be a DDN Base or DDN Advanced project.
How to create service account
Step 1: Navigate to the Service Accounts section
As an owner or administrator on the project, open your project's console at
https://console.hasura.io and click Settings
in the bottom-left corner. Then select
Service Accounts
from the Project Settings
menu and click New Service Account
:

Step 2: Enter details
Enter service account name and click Continue
:

Step 3: Save service account token
After creating the service account, copy the service account token and store it securely. This token allows the CLI to authenticate your service account You will not be able to view the token again after this step.

Step 4: Setup service account permissions
After saving the service account token, select the project and access level you want to grant to the service account,
and click Give Access
:

In order to add service account as a subgraph administrator, your project must be a DDN Advanced project.
You can skip this step and assign permissions later by inviting the service account as a project collaborator.
How to use service account token
Step 1. Login via CLI
ddn auth login --access-token <service-account-token>
Step 2. Create and apply supergraph build
# Create supergraph build
ddn supergraph build create [flags]
# Apply supergraph build
ddn supergraph build apply <supergraph-build-version> [flags]
How to regenerate service account token
Navigate to the Service Accounts
section and click the Regenerate
button next to the service account for which you
want to regenerate the token:

How to delete service account
Step 1: Navigate to the Service Accounts section
Click the Delete
button next to the service account you want to delete:

Step 2: Verify and confirm deletion

More information
See more about Hasura DDN plans and pricing here.