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: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
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
- 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:Service accounts count toward your Secrets Manager seat limit. Contact sales to add capacity.