From 4563fc48afe81ff1af54b6a5bf6d65355f961155 Mon Sep 17 00:00:00 2001 From: Gabriel MABILLE Date: Thu, 28 Sep 2023 09:26:37 +0200 Subject: [PATCH] FeatureToggle: Add a feature toggle for automatic service account and token setup (#75560) Add a feature toggle for automatic service account and token setup --- .../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 c7fce9611ad..6b78f7762f0 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -146,8 +146,9 @@ Experimental 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 | -| --------------------- | -------------------------------------------------------------------------------------------- | -| `entityStore` | SQL-based entity store (requires storage flag also) | -| `externalServiceAuth` | Starts an OAuth2 authentication provider for external services | -| `idForwarding` | Generate signed id token for identity that can be forwarded to plugins and external services | +| Feature toggle name | Description | +| ------------------------- | -------------------------------------------------------------------------------------------- | +| `entityStore` | SQL-based entity store (requires storage flag also) | +| `externalServiceAuth` | Starts an OAuth2 authentication provider for external services | +| `idForwarding` | Generate signed id token for identity that can be forwarded to plugins and external services | +| `externalServiceAccounts` | Automatic service account and token setup for plugins | diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 7075a2ce529..0da1820f5c6 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -133,4 +133,5 @@ export interface FeatureToggles { httpSLOLevels?: boolean; idForwarding?: boolean; cloudWatchWildCardDimensionValues?: boolean; + externalServiceAccounts?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index cac8f385332..9ffe55bc9da 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -801,5 +801,12 @@ var ( Expression: "true", // enabled by default Owner: awsDatasourcesSquad, }, + { + Name: "externalServiceAccounts", + Description: "Automatic service account and token setup for plugins", + Stage: FeatureStageExperimental, + RequiresDevMode: true, + Owner: grafanaAuthnzSquad, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 45f99d5991e..805502d12f1 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -114,3 +114,4 @@ pluginsAPIMetrics,experimental,@grafana/plugins-platform-backend,false,false,fal httpSLOLevels,experimental,@grafana/hosted-grafana-team,false,false,true,false idForwarding,experimental,@grafana/grafana-authnz-team,true,false,false,false cloudWatchWildCardDimensionValues,GA,@grafana/aws-datasources,false,false,false,false +externalServiceAccounts,experimental,@grafana/grafana-authnz-team,true,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index c7a9fcaa31e..9e309ffa662 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -466,4 +466,8 @@ const ( // FlagCloudWatchWildCardDimensionValues // Fetches dimension values from CloudWatch to correctly label wildcard dimensions FlagCloudWatchWildCardDimensionValues = "cloudWatchWildCardDimensionValues" + + // FlagExternalServiceAccounts + // Automatic service account and token setup for plugins + FlagExternalServiceAccounts = "externalServiceAccounts" )