Add Grafana access review connector support

Add Grafana as an access review connector-backed source.

This introduces a Grafana access-review driver, provider registration,
and connector settings for the Grafana base URL. It also wires the
new provider through GraphQL and access-review UI input mapping so
API-key connectors can be created from the product.

A connector_provider enum migration is included so Grafana can be
persisted in existing databases.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Bryan FRIMIN <bryan@frimin.fr>
This commit is contained in:
Cursor Agent
2026-05-28 21:54:04 +00:00
committed by Bryan Frimin
parent fcd7d68778
commit f5a632ffac
10 changed files with 458 additions and 0 deletions

View File

@@ -60,6 +60,17 @@ func apiKeyConnectorSettings(input types.CreateAPIKeyConnectorInput) (json.RawMe
}
return json.Marshal(&coredata.GitHubConnectorSettings{Organization: *input.GithubOrganization})
case coredata.ConnectorProviderGrafana:
if input.GrafanaBaseURL == nil || *input.GrafanaBaseURL == "" {
return nil, fmt.Errorf("cannot create grafana connector: grafanaBaseUrl is required")
}
u, err := url.Parse(*input.GrafanaBaseURL)
if err != nil || (u.Scheme != "http" && u.Scheme != "https") || u.Host == "" {
return nil, fmt.Errorf("cannot create grafana connector: grafanaBaseUrl must be an http(s) URL")
}
return json.Marshal(&coredata.GrafanaConnectorSettings{BaseURL: *input.GrafanaBaseURL})
case coredata.ConnectorProviderOnePassword:
if input.OnePasswordScimBridgeURL == nil || *input.OnePasswordScimBridgeURL == "" {
return nil, fmt.Errorf("cannot create 1password connector: onePasswordScimBridgeURL is required")

View File

@@ -14,6 +14,8 @@ enum ConnectorProvider
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ConnectorProviderHubSpot")
DOCUSIGN
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ConnectorProviderDocuSign")
GRAFANA
@goEnum(value: "go.probo.inc/probo/pkg/coredata.ConnectorProviderGrafana")
NOTION @goEnum(value: "go.probo.inc/probo/pkg/coredata.ConnectorProviderNotion")
BREX @goEnum(value: "go.probo.inc/probo/pkg/coredata.ConnectorProviderBrex")
TALLY @goEnum(value: "go.probo.inc/probo/pkg/coredata.ConnectorProviderTally")
@@ -121,6 +123,7 @@ input CreateAPIKeyConnectorInput {
sentryOrganizationSlug: String
supabaseOrganizationSlug: String
githubOrganization: String
grafanaBaseUrl: String
onePasswordScimBridgeUrl: String
}