Skip to content

Reliability connector security

The Grafana adapter is pack-owned and implements the provider-neutral ReliabilityConnector port. The generic host supplies only registered-adapter authority, secret resolution, cancellation, and confined network execution; it contains no reliability vocabulary or Grafana connector module.

Every call carries host-verified context. The adapter compares all six values to configuration before capability discovery:

  1. issuer;
  2. audience;
  3. canonical remote resource;
  4. tenant;
  5. workspace;
  6. connector identity.

Any mismatch returns context_mismatch before the transport or credential resolver is touched. This complements the MCP authorization requirement to bind tokens to the intended audience/resource and prohibit token passthrough; see the authorization specification.

The adapter does not accept remote tool names from callers. This is the closed allowlist:

Pack capabilityPinned remote capabilityExact profile scope set
get_servicelist_prometheus_label_valuesdatasources:query, datasources:uid:prometheus-primary
get_incidentget_incidentGrafana Viewer role (role:viewer)
query_metricsquery_prometheusdatasources:query, datasources:uid:prometheus-primary
query_logsquery_loki_logsdatasources:query, datasources:uid:loki-primary
query_tracespinned proxied tempo.query_tracesdatasources:query, datasources:uid:tempo-primary
query_alertsalerting_manage_rules with fixed action: listalert.rules:read, folders:uid:reliability-alerts
get_incident_timelineget_incidentGrafana Viewer role (role:viewer)

Grafana documents datasources:query with resource-specific datasource scopes, alert.rules:read with folder scopes, and Viewer access for read-only incident operations in its MCP tools reference. Tempo tools are discovered through Grafana’s proxied datasource surface, so the connector pins the admitted remote name and schema digest rather than inheriting the live proxy catalog.

Each capability must use a unique credential profile identifier, even where two capabilities reach the same remote function. A profile is accepted only when permission is read and its scopes exactly equal the table above. Write scopes, extra scopes, reused profiles, and missing profiles fail during adapter creation.

The remediation adapter has a second, explicitly write-only configuration. Its three domain actions map to fixed provider operations and exact verbs; callers cannot submit a provider tool name.

Domain actionFixed provider operationExact request verb
Alert silencealerting_create_silencealerts:silence
Incident state updateupdate_incidentincidents:update
Registered runbook executionexecute_registered_runbookrunbooks:execute

Each action uses a dedicated host-owned write credential profile. The profile must differ from the dedicated reconciliation read profile and must exactly match the pinned connector, tenant, resource set, verb, validity window, and schema digest in the approved plan. Effective request authority may narrow those values but cannot expand them. Reconciliation uses only the fixed get_mutation_operation read call; rollback uses only the inverse declared in the approved plan, never a caller-selected method.

Before each provider call, capability discovery must return the pinned input schema digest. Missing or changed digests return schema_drift before invocation. Remote annotations are untrusted metadata: they never grant authority. An annotation that contradicts the pinned non-destructive contract causes capability_denied.

This follows the MCP tools specification: clients must treat annotations as untrusted, validate results, enforce access controls, rate limits, output sanitization, and timeouts. See MCP tools.

Remote results must match a closed { items, next_cursor, partial_error } envelope. The adapter then:

  • redacts token-, password-, cookie-, credential-, and secret-shaped fields;
  • bounds item count and UTF-8 bytes;
  • hashes normalized redacted content with SHA-256;
  • marks content untrusted-provider-output;
  • maps timeout, cancellation, rate limit, malformed response, and partial failure into typed outcomes.

Returned text can describe commands or request broader scopes, but remains data. No returned field can select another capability, profile, scope, or host action.