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.Organization ID
Include detailed secret access information
Response
Service account unique identifier
Parent organization ID
Service account name
When service account was created
Last modification date
Number of secrets this service account can access
Get Service Account
Retrieve a specific service account.Service account ID
Create Service Account
Create a new service account.Request Body
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.Service account ID
Request Body
New service account name
Delete Service Accounts
Delete one or more service accounts.Array of service account IDs to delete
Response
Returns results for each deletion:Access Tokens
List Access Tokens
Retrieve all access tokens for a service account.Service account ID
Response
Access token ID
Token name
When token was created
Token expiration date (null = no expiration)
Last modification date
Create Access Token
Generate a new access token for a service account.Service account ID
Request Body
Token name (e.g., “Production Token”, “Staging Deploy”)
Encrypted payload for the token
Encryption key
Optional expiration date (ISO 8601 format)
Response
Token ID
The actual access token value (only returned once!)
Token name
When token was created
Revoke Access Tokens
Revoke one or more access tokens.Service account ID
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
- Least Privilege: Only grant access to required projects
- Rotate Tokens: Regenerate tokens periodically
- Set Expiration: Use token expiration dates
- Monitor Usage: Check event logs for suspicious activity
- Revoke Unused: Delete service accounts and tokens no longer needed
Token Management
- Name Descriptively: Indicate token purpose and location
- Use Expiration: Set expiration dates for production tokens
- Store Securely: Use secret management in your CI/CD system
- One Token per System: Don’t share tokens across systems
- 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:| Plan | Service Accounts |
|---|---|
| Free (trial) | 0 |
| Teams | Starts at 20, can purchase more |
| Enterprise | Custom |
Service accounts count toward your Secrets Manager seat limit. Contact sales to add capacity.