orka login, which expire after an hour. Understanding Orka credentials explains the difference. This page covers looking after service account tokens over time: scoping them, tracking when they expire, rotating them, and revoking them.
Use one service account per integration
Create a service account for each CI system or pipeline group, such assa-jenkins or sa-gha-ios, instead of sharing one across everything. Then you can:
- Rotate or revoke one integration’s access without touching the others.
- Limit each one to the namespaces it needs. A service account gets access to namespaces through role bindings, so bind each one only where its pipelines deploy VMs. See How access works in Orka.
Track when each token expires
orka sa token issues a token that lasts one year by default, or the lifetime you request with --duration. Orka can return a token with a shorter or longer lifetime than you asked for, and it doesn’t keep a copy of tokens that expire. You can’t look up the expiry later by service account name.
Record the expiry when you create the token, for example in your secret manager or as a calendar reminder a few weeks ahead. To read it from a token you already have, decode the token’s exp claim:
--no-expiration has no exp claim, so it prints no expiration.
Rotate before a token expires
-
Create a new token for the same service account:
- Replace the token in your CI system’s secret store, such as a GitHub Actions secret, a Jenkins credential, or a GitLab CI/CD variable.
- Run a job to confirm the new token works.
Choose expiring tokens unless you need otherwise
A token created with--no-expiration never breaks a pipeline on a date, but it also keeps working indefinitely if it leaks. Use one when your setup requires it, or when you have a way to revoke it quickly. Otherwise, use an expiring token and rotate it on a schedule.
Revoke access
Deleting a service account invalidates every token issued for it. To cut off a token before it expires, such as one that leaked:- Note which namespaces the service account can access. Deleting it removes it from the namespaces’ dev role bindings, but not from admin role bindings.
-
If the service account has the admin role, revoke it first, or an account you recreate with the same name gets admin access back through the old binding:
-
Delete the service account:
orka sa delete <SERVICE_ACCOUNT_NAME>. - Create it again and add it back to the namespaces it needs.
- Issue a new token to each integration that uses it.

