> For the complete documentation index, see [llms.txt](https://docs.sealsecurity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealsecurity.io/getting-started/tokens/best-practices.md). Agents can also search and read this documentation through its [MCP server](https://docs.sealsecurity.io/~gitbook/mcp).

# Token security best practices

Scoping, rotating, and storing Seal tokens safely.

Seal tokens authenticate against the Seal Artifact Server only. They allow pulling sealed packages; they do not authorize any operation on the Seal Platform on the holder's behalf. Treat them like any other credential.

## Store tokens in a secret manager, not in source

Production tokens belong in your CI/CD's secret store: GitHub Actions encrypted secrets, GitLab CI variables, Azure DevOps secret variables, or a dedicated secret manager that your CI/CD pulls from. Never check a production token into source control.

Development tokens belong in the developer's local secret manager or environment variables, never in a shared file or chat.

## Use the right token type for the context

Production tokens are tracked. Use them only on main-branch CI/CD pipelines where the activity should be authoritative in Seal's view.

Development tokens are not tracked. Use them for local machines and feature-branch pipelines, where activity is noisy and would otherwise dilute the production picture.

## Rotate periodically

Seal tokens with **Never** expiry remain valid indefinitely. For operational hygiene, rotate production tokens at a cadence that matches the rest of your secret-rotation policy:

1. Generate a new token.
2. Update the secret in your CI/CD secret store.
3. Confirm a CI run completes successfully with the new token.
4. Revoke the old token.

Tokens created with **After 90 days** or **After one year** expiry are auto-invalidated when that period ends; even so, you should rotate ahead of expiry rather than letting builds fail when the token expires.

## Meeting a fixed rotation requirement

If your policy requires credentials to be rotated on a fixed cadence, such as every 90 days, let Seal enforce it and run the rotation above ahead of each expiry:

* **Rotate without downtime.** A tenant can hold several valid tokens at once, so the new token works in your pipelines before the old one is revoked. Revocation takes effect immediately.
* **Track token age.** The **Expiry** column on **Settings > Tokens** shows the days left on each token, the **Creation date** column shows when it was created, and the **Created by** column shows who created it. Review the table ahead of each expiry and rotate the tokens that are due.
* **Enforce the cadence with expiry.** Create tokens with **After 90 days** expiry, so a token is invalidated at the 90-day mark even if your rotation process misses it. Use **After one year** where your policy allows a longer lifetime, and avoid **Never** for tokens that fall under a rotation policy.
* **Name tokens for the rotation.** Include the creation month in the token name (for example, `ci-prod-2026-11`) so the table shows at a glance which token is current.

Only Admins can create and revoke tokens, so token rotation stays with the people your policy assigns it to.

## Revoke immediately if leaked

If a token is exposed (committed to source, pasted into a chat, recovered from logs), revoke it immediately from **Settings > Tokens**. Generate a fresh token and update your secret store.

## Related

* [Token types](https://docs.sealsecurity.io/getting-started/tokens/token-types.md): production versus development.
* [Generating and revoking tokens](https://docs.sealsecurity.io/getting-started/tokens/generating-tokens.md): the UI flow.
