Skip to main content

Overview

Service accounts are machine identities designed for automated systems, CI/CD pipelines, and applications that need programmatic access to secrets.

List Service Accounts

Retrieve all service accounts in an organization.
string
required
Organization ID
boolean
default:"false"
Include detailed secret access information

Response

string
required
Service account unique identifier
string
required
Parent organization ID
string
required
Service account name
string
required
When service account was created
string
required
Last modification date
number
Number of secrets this service account can access

Get Service Account

Retrieve a specific service account.
string
required
Service account ID

Create Service Account

Create a new service account.

Request Body

string
required
Service account name (e.g., “Production Deployment”, “Terraform”)
Creating a service account may require additional seats on your Secrets Manager subscription.

Update Service Account

Update a service account’s name.
string
required
Service account ID

Request Body

string
required
New service account name

Delete Service Accounts

Delete one or more service accounts.
array
required
Array of service account IDs to delete

Response

Returns results for each deletion:
Deleting a service account revokes all its access tokens. Active integrations will fail.

Access Tokens

List Access Tokens

Retrieve all access tokens for a service account.
string
required
Service account ID

Response

string
required
Access token ID
string
required
Token name
string
required
When token was created
string
Token expiration date (null = no expiration)
string
required
Last modification date

Create Access Token

Generate a new access token for a service account.
string
required
Service account ID

Request Body

string
required
Token name (e.g., “Production Token”, “Staging Deploy”)
string
required
Encrypted payload for the token
string
required
Encryption key
string
Optional expiration date (ISO 8601 format)

Response

string
required
Token ID
string
required
The actual access token value (only returned once!)
string
required
Token name
string
required
When token was created
The clientSecret is only returned when creating the token. Store it securely - you cannot retrieve it again!

Revoke Access Tokens

Revoke one or more access tokens.
string
required
Service account ID
array
required
Array of access token IDs to revoke

Access Management

Service accounts access secrets through projects. Grant access using access policies.

Grant Project Access

Allow a service account to access a project:

Access Levels

  • Read: Can fetch secrets
  • Write: Can create/update secrets (typically not granted)
Most service accounts only need read access to fetch secrets for deployment.

Best Practices

Naming Conventions

Use descriptive names that indicate purpose:

Security

  1. Least Privilege: Only grant access to required projects
  2. Rotate Tokens: Regenerate tokens periodically
  3. Set Expiration: Use token expiration dates
  4. Monitor Usage: Check event logs for suspicious activity
  5. Revoke Unused: Delete service accounts and tokens no longer needed

Token Management

  1. Name Descriptively: Indicate token purpose and location
  2. Use Expiration: Set expiration dates for production tokens
  3. Store Securely: Use secret management in your CI/CD system
  4. One Token per System: Don’t share tokens across systems
  5. Revoke Immediately: Remove compromised tokens right away

Usage Examples

CI/CD Integration (GitHub Actions)

Terraform Provider

Docker Container

Kubernetes Secret Sync


Service Account Limits

Service account limits vary by plan:
Service accounts count toward your Secrets Manager seat limit. Contact sales to add capacity.