A Grafana Cloud API token, the kind whose value starts with glc_, is the secret of a Grafana Cloud access policy. The policy decides what the token may do: read or write metrics, logs and traces, manage stack settings, or in the worst case administer parts of the organization. Whoever holds the token gets exactly those scopes, from anywhere, without any further sign-in. Depending on the policy, that means pushing junk telemetry that inflates your bill, reading your logs (which often contain more secrets than people expect), or changing stack configuration. Delete the token first, then work out what its policy allowed.
Check your GitHub account for leaked secrets — free
- Provider
- Grafana Cloud
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Grafana Cloud API Token looks like
A Grafana Cloud access policy token starts with glc_ followed by a long base64-style body, typically several dozen to a few hundred characters, sometimes ending in one to three = padding signs:
glc_XXXXXXXXXXXXXXXX…XXXX== Grafana Cloud access policy token (masked)
It is often found in environment variables such as GRAFANA_CLOUD_API_KEY or GC_TOKEN, in the password field of a Prometheus remote_write or Loki client block, in Grafana Alloy or Grafana Agent configuration, and in Terraform provider settings. Do not confuse it with other Grafana secrets: a service account token (for one Grafana instance) has its own prefix, and the legacy Grafana API key starts with eyJrIjoi. Those are covered in separate guides, and a repository that has one often has the others.
How Grafana Cloud API Tokens get leaked
- Agent and collector configuration. An Alloy, Grafana Agent or Prometheus file with the token as the remote write password, committed with the rest of the monitoring setup.
- Helm values and Kubernetes manifests. Observability charts take the token as a plain value, and the values file gets pushed to a public repository.
- Terraform and infrastructure code. Provider blocks with the token inline, or state files that store it.
- Environment files and CI.
.envfiles committed by mistake, or a pipeline step that prints its environment to a public log. - Docs and issue threads. A configuration pasted into an issue or a question to get help, with the password line left in.
What to do in the first hour
- Find the token. Sign in to the Grafana Cloud Portal for your organization and open the access policies area. Look for the policy that owns the token, and match it by name and expiry date.
- Note the scopes first. Before deleting anything, write down which scopes and stacks the policy covers. That tells you what an attacker could do, and it tells you which new policy to create.
- Create a replacement token on the same policy, or on a new policy with narrower scopes. Prefer one policy per use, such as metrics write only for a collector.
- Deploy the new token to the agent, chart or pipeline, and confirm data is still arriving.
- Delete the exposed token. Remove it from the policy. Grafana’s documentation says deletion makes the token stop working, with a delay of a few minutes while it is applied everywhere. A deleted token cannot be restored, so make sure the replacement is already deployed.
- Review activity. Check the usage and billing views for unexpected metric or log volume, and the audit or activity logs available to your organization for policy or stack changes you did not make. If the scopes included management of the stack, review the stack’s users, service accounts and data sources.
- Rotate what the logs or dashboards revealed. If the policy could read logs or traces, assume anything printed in them is exposed.
- Clean up the code and look for other secrets nearby. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Grafana Cloud
Grafana Cloud tokens are managed in the Grafana Cloud Portal, under the access policies of your organization, after you sign in with a user allowed to manage them. Each policy lists its tokens, and each token can be deleted individually. Deleting the whole policy removes all of its tokens, which is useful if several leaked. A token cannot be edited after creation, so rotation always means create, deploy, delete. A person has not confirmed the exact menu wording for this guide, and the interface can change, so if what you see differs, look for the page where access policies and their tokens are listed, and follow Grafana’s documentation.
How LeakWatch detects it
The rule is called Grafana Cloud API Token. It looks for the prefix glc_ followed by 32 to 400 base64 characters (letters, digits, + and /) and optional = padding, in any letter case, as a whole word. The value must be followed by a quote, a backtick, whitespace, a semicolon, an escaped line break or the end of the text. A glc_ string with a shorter body, or with characters outside that set, is not reported. The severity is high. This type is not checked live: LeakWatch does not send any request to Grafana with the token it found, so a reported token may already have been deleted.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Is a glc_ token the same as a Grafana API key?
No. A glc_ token belongs to a Grafana Cloud access policy and works against Grafana Cloud services. The legacy API key, which starts with eyJrIjoi, belonged to a single Grafana instance. Treat each as its own leak and revoke both if both appear.
Does deleting the token take effect immediately?
Grafana documents a short delay of a few minutes while the deletion is applied everywhere. Treat the token as usable until you have confirmed that requests with it are rejected, and keep watching the usage views meanwhile.
Can I limit the damage of the next leak?
Yes. Create one access policy per purpose with only the scopes that purpose needs, set an expiry date on tokens, and keep them in a secret manager instead of configuration files.