Skip to Content
LogiStackDocs
Team and security

Service accounts

Create LogiStack service accounts for CI pipelines and AI agents, give them a role, issue API keys they own, and keep automation working when people leave.

A service account is a machine identity for CI or an agent. It never signs in; it acts only through the API keys it owns. Use one whenever automation should outlive the person who set it up: a key owned by a member stops working the day that member is removed, while a key owned by a service account keeps going.

You need the Owner or Admin role to create, change or delete service accounts.

Create a service account

Open API keys

In the sidebar, under Settings, select API keys. Service accounts have their own panel below Keys.

The API keys page, with the Service accounts panel listing GitHub Actions as a Viewer with 1 key

Start a new one

In the Service accounts panel, select New service account.

Name it

In Name, say what uses it, for example GitHub Actions or Claude Code.

Pick its organization role

In Organization role, pick its access everywhere. Owner isn't offered. Start small: Viewer plus a scoped grant is usually enough for CI.

Create it

Select Create service account. It appears in the panel with its role and key count, for example Viewer · 0 keys.

Give it a key

A service account does nothing until it has a key.

  1. On Settings › API keys, select Create API key.
  2. Name the key, for example storefront-ci.
  3. In Owner, pick the service account. It's tagged Service account in the list.
  4. Choose Access, Expiry and select Create key, as described in API keys.
  5. Copy the secret into your CI's secret store.

In the Keys table, the owner column shows the service account with a robot icon. In the audit log, its actions show with the actor kind Service account (or API key for the key itself).

Give it access to one project

The Organization role applies everywhere. For least privilege, give the service account Viewer on the organization and a stronger role only where it deploys. You can do this in two ways:

  • Narrow the key. When you create the key, choose Limit to scopes and pick, for example, Developer on project Storefront. The key can then do no more than that, whatever the account's own roles. This is the simplest option.
  • Grant the account a scoped role through the API. Service accounts aren't listed on Settings › Members, so use POST /api/grants with the service account's id as userId:
Developer on one project for a service account
curl -X POST https://stack.example.com/api/grants \
  -H "Authorization: Bearer $LOGISTACK_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "usr_sa_github",
    "role": "developer",
    "scope": { "kind": "project", "id": "prj_storefront" }
  }'

GET /api/service-accounts lists service accounts with their ids. PATCH /api/service-accounts/{id} with {"name": "...", "role": "..."} renames one or changes its organization role.

Example: GitHub Actions

  1. Create the service account GitHub Actions with Viewer.
  2. Create the key storefront-ci, owner GitHub Actions, Limit to scopes: Developer on project Storefront, expiry 90 days.
  3. In GitHub, add the secret LOGISTACK_KEY under Settings › Secrets and variables › Actions.
  4. Call the API from the workflow:
.github/workflows/deploy.yml
name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy storefront-web
        run: |
          curl -fsS -X POST \
            "https://stack.example.com/api/services/svc_storefront_web/deploy" \
            -H "Authorization: Bearer ${{ secrets.LOGISTACK_KEY }}"
  1. Rotate the key before the 90 days run out and update the secret.

Two-factor and SSO

Service accounts and their keys keep working when the organization requires two-factor authentication. They don't sign in through SSO either.

Delete a service account

  1. In the Service accounts panel, select the trash button on its row.
  2. Read the dialog and select Delete service account.

Deleting a service account deletes every key it owns too, and anything using them stops working at once. Its grants are removed with it.

On this page