Repository navigation
[Access] Document leaked service token recovery #34341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kennyj42
wants to merge
2
commits into
production
Choose a base branch
from
kjohnson/leaked-service-token-recovery
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/content/changelog/access/2026-10-14-leaked-service-token-recovery.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| title: Rotate leaked Access service tokens before re-enabling them | ||
| description: Access requires secret rotation before a service token reported as leaked can be re-enabled. | ||
| date: 2026-10-14 | ||
| products: | ||
| - access | ||
| - cloudflare-one | ||
| --- | ||
|
|
||
| A Cloudflare Access service token reported as leaked cannot be re-enabled until its secret is rotated. This prevents a disabled credential from being put back into use without replacing the exposed secret. | ||
|
|
||
| Leaked secrets do not support a rotation grace period. When you rotate one, the previous secret is discarded immediately. Update your services with the new secret, then re-enable the token. | ||
|
|
||
| For API rotations, omit `previous_client_secret_expires_at`. A future expiration returns `400`; attempting to re-enable the token before rotation returns `409`. | ||
|
|
||
| For recovery steps and leak metadata fields, refer to [Recover a leaked service token](/cloudflare-one/access-controls/service-credentials/service-tokens/#recover-a-leaked-service-token). | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,8 @@ Rotate a service token secret when you suspect exposure or as part of regular cr | |
|
|
||
| You can set a grace period during which both secrets work. Use this period to update your services before Access revokes the previous secret. | ||
|
|
||
| For a token [reported as leaked](#recover-a-leaked-service-token), the previous secret must expire immediately. You cannot use a rotation grace period. | ||
|
|
||
| <Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard"> | ||
|
|
||
| <Steps> | ||
|
|
@@ -165,6 +167,32 @@ To revoke the previous secret immediately, omit `previous_client_secret_expires_ | |
|
|
||
| </TabItem> </Tabs> | ||
|
|
||
| ## Recover a leaked service token | ||
|
|
||
| Cloudflare can receive service token leak reports from secret scanning partners, such as GitHub. A token reported as leaked cannot be re-enabled until you rotate its secret. | ||
|
|
||
| To recover a disabled token after a leak report: | ||
|
|
||
| <Steps> | ||
| 1. [Rotate the token's secret](#rotate-service-token-secrets). In the dashboard, select _Revoke immediately_. In an API rotation request, omit `previous_client_secret_expires_at`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| 2. Replace the leaked secret in your services with the new Client Secret. The Client ID stays the same. | ||
| 3. [Turn the token on again](#turn-a-service-token-on-or-off). Rotation does not automatically re-enable a disabled token. | ||
| </Steps> | ||
|
|
||
| Remove the exposed secret from the location identified in the report. Removing it does not replace rotation: the secret may already have been copied. | ||
|
|
||
| The service token API returns these read-only fields when available: | ||
|
|
||
| | Field | Description | | ||
| | ------------------ | -------------------------------------------------------- | | ||
| | `leak_reported_at` | When a secret scanning partner reported the leak. | | ||
| | `leak_reporter` | The secret scanning partner that reported the leak. | | ||
| | `leak_report_url` | Where the secret was found, if provided by the reporter. | | ||
|
|
||
| Rotation clears the token's leak metadata. Review [admin activity logs](/cloudflare-one/insights/logs/dashboard-logs/admin-activity-logs/) for the audit history. | ||
|
|
||
| Attempting to re-enable a token before rotation returns `409`. Requesting a future `previous_client_secret_expires_at` when rotating a leaked token returns `400`. The leaked secret is discarded immediately and cannot be restored by extending its expiration. | ||
|
|
||
| ## Renew service tokens | ||
|
|
||
| Service tokens expire according to the token duration you selected when you created the token. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to mention the automatic disablement portion (how the service token gets reported as leaked). Something like: "When a leak is reported by a secret scanning partner such as GitHub, Cloudflare automatically disables the token and notifies account administrators by email"
Not sure if you were just waiting on the GitHub partnership being finalized for this