grafana

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package grafana provides a verifier for Grafana API keys. It uses the Grafana HTTP API GET /api/user endpoint to check key validity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier checks whether a Grafana API key is active by calling the Grafana Cloud API. It NEVER logs or persists raw key values.

func (*Verifier) Type

func (v *Verifier) Type() string

Type returns the detector ID this verifier handles.

func (*Verifier) Verify

Verify checks if the detected Grafana API key is valid/active. Raw contains the key value.

This calls GET /api/user, matching docs/architecture/05-VERIFIER-ANALYSIS.md and docs/guides/secret-verification.md (the code previously called the nonexistent /api/viewer path). Note the caveat those docs already record: glsa_ tokens are Grafana Cloud service-account tokens scoped to the stack that issued them, so a token minted on a self-hosted or per-stack instance will not authenticate against the central grafana.com host used here — there is currently no per-instance URL captured for this detector to verify against, the same limitation documented for Okta.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL