Skip to main content

Best Practices

PracticeWhy it matters
Give minimal permissionsOnly assign the scopes each agent actually needs — never use wildcard or admin scopes
Keep tokens short-livedSet token expiry between 15 minutes and 1 hour to limit exposure
Separate roles by taskUse different roles for different jobs (e.g., a read-only agent vs a write agent)
Monitor usageReview delegated token activity in Enterprise Features > Logs to spot unusual behavior
Rotate credentialsRegenerate client secrets on a schedule; SPIRE handles certificate rotation automatically

Troubleshooting

ErrorWhat happenedHow to fix it
insufficient_scopeThe agent requested a permission it hasn't been grantedCheck the client's allowed scopes and role bindings
invalid_clientThe agent's credentials are wrong or its client entry is deactivatedVerify the client status in Administration > Clients
access_deniedThe role binding is missing or has expiredCreate or update the binding in Administration > RBAC > Role Bindings
Token missing spiffe_idThe SPIRE agent isn't deployedDeploy the SPIRE agent

Next Steps