From b369341868ec182f076e2e6003b371fdf071f690 Mon Sep 17 00:00:00 2001 From: Misi Date: Mon, 23 Sep 2024 11:31:23 +0200 Subject: [PATCH] Chore: Add feature toggle for session storage redirect handling (#93575) Add feature toggle for session storage redirect handling --- .../feature-toggles/index.md | 1 + .../src/types/featureToggles.gen.ts | 1 + pkg/services/featuremgmt/registry.go | 6 +++++ pkg/services/featuremgmt/toggles_gen.csv | 1 + pkg/services/featuremgmt/toggles_gen.go | 4 +++ pkg/services/featuremgmt/toggles_gen.json | 25 +++++++++++++++++++ 6 files changed, 38 insertions(+) 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 9293168cd08..8f7c75bbe0e 100644 --- a/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md +++ b/docs/sources/setup-grafana/configure-grafana/feature-toggles/index.md @@ -105,6 +105,7 @@ Most [generally available](https://grafana.com/docs/release-life-cycle/#general- | `accessActionSets` | Introduces action sets for resource permissions. Also ensures that all folder editors and admins can create subfolders without needing any additional permissions. | | `azureMonitorPrometheusExemplars` | Allows configuration of Azure Monitor as a data source that can provide Prometheus exemplars | | `cloudwatchMetricInsightsCrossAccount` | Enables cross account observability for Cloudwatch Metric Insights query builder | +| `useSessionStorageForRedirection` | Use session storage for handling the redirection after login | ## Experimental feature toggles diff --git a/packages/grafana-data/src/types/featureToggles.gen.ts b/packages/grafana-data/src/types/featureToggles.gen.ts index 376ab32e981..42583413869 100644 --- a/packages/grafana-data/src/types/featureToggles.gen.ts +++ b/packages/grafana-data/src/types/featureToggles.gen.ts @@ -215,4 +215,5 @@ export interface FeatureToggles { appSidecar?: boolean; groupAttributeSync?: boolean; improvedExternalSessionHandling?: boolean; + useSessionStorageForRedirection?: boolean; } diff --git a/pkg/services/featuremgmt/registry.go b/pkg/services/featuremgmt/registry.go index dfa3d42c4f4..31d2b3d1f59 100644 --- a/pkg/services/featuremgmt/registry.go +++ b/pkg/services/featuremgmt/registry.go @@ -1484,6 +1484,12 @@ var ( HideFromDocs: true, HideFromAdminPage: true, }, + { + Name: "useSessionStorageForRedirection", + Description: "Use session storage for handling the redirection after login", + Stage: FeatureStagePublicPreview, + Owner: identityAccessTeam, + }, } ) diff --git a/pkg/services/featuremgmt/toggles_gen.csv b/pkg/services/featuremgmt/toggles_gen.csv index 6a7bfda8ce1..8b0fd011d25 100644 --- a/pkg/services/featuremgmt/toggles_gen.csv +++ b/pkg/services/featuremgmt/toggles_gen.csv @@ -196,3 +196,4 @@ appPlatformAccessTokens,experimental,@grafana/identity-access-team,false,false,f appSidecar,experimental,@grafana/explore-squad,false,false,false groupAttributeSync,experimental,@grafana/identity-access-team,false,false,false improvedExternalSessionHandling,experimental,@grafana/identity-access-team,false,false,false +useSessionStorageForRedirection,preview,@grafana/identity-access-team,false,false,false diff --git a/pkg/services/featuremgmt/toggles_gen.go b/pkg/services/featuremgmt/toggles_gen.go index 35b257d632b..5fd18a55235 100644 --- a/pkg/services/featuremgmt/toggles_gen.go +++ b/pkg/services/featuremgmt/toggles_gen.go @@ -794,4 +794,8 @@ const ( // FlagImprovedExternalSessionHandling // Enable improved support for external sessions in Grafana FlagImprovedExternalSessionHandling = "improvedExternalSessionHandling" + + // FlagUseSessionStorageForRedirection + // Use session storage for handling the redirection after login + FlagUseSessionStorageForRedirection = "useSessionStorageForRedirection" ) diff --git a/pkg/services/featuremgmt/toggles_gen.json b/pkg/services/featuremgmt/toggles_gen.json index 07275164723..4969a5c5bed 100644 --- a/pkg/services/featuremgmt/toggles_gen.json +++ b/pkg/services/featuremgmt/toggles_gen.json @@ -2913,6 +2913,31 @@ "requiresRestart": true } }, + { + "metadata": { + "name": "useSeessionStorageForRedirection", + "resourceVersion": "1727082170583", + "creationTimestamp": "2024-09-23T09:02:50Z", + "deletionTimestamp": "2024-09-23T09:10:18Z" + }, + "spec": { + "description": "Use session storage for handling the redirection after login", + "stage": "preview", + "codeowner": "@grafana/identity-access-team" + } + }, + { + "metadata": { + "name": "useSessionStorageForRedirection", + "resourceVersion": "1727082618788", + "creationTimestamp": "2024-09-23T09:10:18Z" + }, + "spec": { + "description": "Use session storage for handling the redirection after login", + "stage": "preview", + "codeowner": "@grafana/identity-access-team" + } + }, { "metadata": { "name": "vizActions",