From 5df9e64986e8c0324b4da96de5b55e533c3990ed Mon Sep 17 00:00:00 2001 From: Gabriel MABILLE Date: Tue, 11 Apr 2023 15:21:19 +0200 Subject: [PATCH] AuthN: feature flag for external service authentication (#66160) * AuthN: feature flag for external service authentication * Change the description message --- .../configure-grafana/feature-toggles/index.md | 11 ++++++----- packages/grafana-data/src/types/featureToggles.gen.ts | 1 + pkg/services/featuremgmt/registry.go | 7 +++++++ pkg/services/featuremgmt/toggles_gen.csv | 1 + pkg/services/featuremgmt/toggles_gen.go | 4 ++++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md index 310230be7ed..5b8a2f758e7 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -113,8 +113,9 @@ Alpha features might be changed or removed without prior notice. The following toggles require explicitly setting Grafana's [app mode]({{< relref "../_index.md/#app_mode" >}}) to 'development' before you can enable this feature toggle. These features tend to be experimental. -| Feature toggle name | Description | -| ------------------- | --------------------------------------------------- | -| `k8s` | Explore native k8s integrations | -| `entityStore` | SQL-based entity store (requires storage flag also) | -| `nestedFolders` | Enable folder nesting | +| Feature toggle name | Description | +| --------------------- | -------------------------------------------------------------- | +| `k8s` | Explore native k8s integrations | +| `entityStore` | SQL-based entity store (requires storage flag also) | +| `nestedFolders` | Enable folder nesting | +| `externalServiceAuth` | Starts an OAuth2 authentication provider for external services | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 862a2542cb7..d8fea398788 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -94,5 +94,6 @@ export interface FeatureToggles { unifiedRequestLog?: boolean; renderAuthJWT?: boolean; pyroscopeFlameGraph?: boolean; + externalServiceAuth?: boolean; dataplaneFrontendFallback?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index b4855827ac9..8751d8b34cb 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -505,6 +505,13 @@ var ( State: FeatureStateAlpha, Owner: grafanaObservabilityTracesAndProfilingSquad, }, + { + Name: "externalServiceAuth", + Description: "Starts an OAuth2 authentication provider for external services", + State: FeatureStateAlpha, + RequiresDevMode: true, + Owner: grafanaAuthnzSquad, + }, { Name: "dataplaneFrontendFallback", Description: "Support dataplane contract field name change for transformations and field name matchers where the name is different", diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 550a4eb02d9..b4a0d44b016 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -75,4 +75,5 @@ alertStateHistoryLokiOnly,alpha,@grafana/alerting-squad,false,false,false,false unifiedRequestLog,alpha,@grafana/backend-platform,false,false,false,false renderAuthJWT,beta,@grafana/grafana-as-code,false,false,false,false pyroscopeFlameGraph,alpha,@grafana/observability-traces-and-profiling,false,false,false,false +externalServiceAuth,alpha,@grafana/grafana-authnz-team,true,false,false,false dataplaneFrontendFallback,alpha,@grafana/observability-metrics,false,false,false,true diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index dc74c116dce..f79f1cf9c9e 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -311,6 +311,10 @@ const ( // Changes flame graph to pyroscope one FlagPyroscopeFlameGraph = "pyroscopeFlameGraph" + // FlagExternalServiceAuth + // Starts an OAuth2 authentication provider for external services + FlagExternalServiceAuth = "externalServiceAuth" + // FlagDataplaneFrontendFallback // Support dataplane contract field name change for transformations and field name matchers where the name is different FlagDataplaneFrontendFallback = "dataplaneFrontendFallback"