Authn UI: Remove feature toggle (#70073)

* Authn UI: Remove feature toggle

* remove feature flag usage
This commit is contained in:
Alexander Zobnin 2023-06-14 18:58:15 +02:00 committed by GitHub
parent 6dc65d4d5d
commit 6c7d5bf95f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 22 deletions

View File

@ -38,7 +38,6 @@ Some features are enabled by default. You can disable these feature by setting t
| `dataplaneFrontendFallback` | Support dataplane contract field name change for transformations and field name matchers where the name is different | Yes |
| `alertingNotificationsPoliciesMatchingInstances` | Enables the preview of matching instances for notification policies | Yes |
| `useCachingService` | When turned on, the new query and resource caching implementation using a wire service inject will be used in place of the previous middleware implementation | |
| `authenticationConfigUI` | Enables authentication configuration UI | Yes |
| `advancedDataSourcePicker` | Enable a new data source picker with contextual information, recently used order and advanced mode | Yes |
## Preview feature toggles

View File

@ -90,7 +90,6 @@ export interface FeatureToggles {
refactorVariablesTimeRange?: boolean;
useCachingService?: boolean;
enableElasticsearchBackendQuerying?: boolean;
authenticationConfigUI?: boolean;
pluginsAPIManifestKey?: boolean;
advancedDataSourcePicker?: boolean;
faroDatasourceSelector?: boolean;

View File

@ -209,7 +209,7 @@ func (hs *HTTPServer) registerRoutes() {
r.Get("/user/auth-tokens/rotate", routing.Wrap(hs.RotateUserAuthTokenRedirect))
}
if hs.License.FeatureEnabled("saml") && hs.Features.IsEnabled(featuremgmt.FlagAuthenticationConfigUI) {
if hs.License.FeatureEnabled("saml") {
// TODO change the scope when we extend the auth UI to more providers
r.Get("/admin/authentication/", authorize(ac.EvalPermission(ac.ActionSettingsWrite, ac.ScopeSettingsSAML)), hs.Index)
}

View File

@ -487,13 +487,6 @@ var (
Stage: FeatureStagePublicPreview,
Owner: grafanaObservabilityLogsSquad,
},
{
Name: "authenticationConfigUI",
Description: "Enables authentication configuration UI",
Stage: FeatureStageGeneralAvailability,
Expression: "true",
Owner: grafanaAuthnzSquad,
},
{
Name: "pluginsAPIManifestKey",
Description: "Use grafana.com API to retrieve the public manifest key",

View File

@ -71,7 +71,6 @@ externalServiceAuth,experimental,@grafana/grafana-authnz-team,true,false,false,f
refactorVariablesTimeRange,preview,@grafana/dashboards-squad,false,false,false,false
useCachingService,GA,@grafana/grafana-operator-experience-squad,false,false,true,false
enableElasticsearchBackendQuerying,preview,@grafana/observability-logs,false,false,false,false
authenticationConfigUI,GA,@grafana/grafana-authnz-team,false,false,false,false
pluginsAPIManifestKey,experimental,@grafana/plugins-platform-backend,false,false,false,false
advancedDataSourcePicker,GA,@grafana/dashboards-squad,false,false,false,true
faroDatasourceSelector,preview,@grafana/app-o11y,false,false,false,true

1 Name Stage Owner requiresDevMode RequiresLicense RequiresRestart FrontendOnly
71 refactorVariablesTimeRange preview @grafana/dashboards-squad false false false false
72 useCachingService GA @grafana/grafana-operator-experience-squad false false true false
73 enableElasticsearchBackendQuerying preview @grafana/observability-logs false false false false
authenticationConfigUI GA @grafana/grafana-authnz-team false false false false
74 pluginsAPIManifestKey experimental @grafana/plugins-platform-backend false false false false
75 advancedDataSourcePicker GA @grafana/dashboards-squad false false false true
76 faroDatasourceSelector preview @grafana/app-o11y false false false true

View File

@ -295,10 +295,6 @@ const (
// Enable the processing of queries and responses in the Elasticsearch data source through backend
FlagEnableElasticsearchBackendQuerying = "enableElasticsearchBackendQuerying"
// FlagAuthenticationConfigUI
// Enables authentication configuration UI
FlagAuthenticationConfigUI = "authenticationConfigUI"
// FlagPluginsAPIManifestKey
// Use grafana.com API to retrieve the public manifest key
FlagPluginsAPIManifestKey = "pluginsAPIManifestKey"

View File

@ -16,7 +16,7 @@ func (s *ServiceImpl) getAdminNode(c *contextmodel.ReqContext) (*navtree.NavLink
hasAccess := ac.HasAccess(s.accessControl, c)
hasGlobalAccess := ac.HasGlobalAccess(s.accessControl, s.accesscontrolService, c)
orgsAccessEvaluator := ac.EvalPermission(ac.ActionOrgsRead)
authConfigUIAvailable := s.license.FeatureEnabled("saml") && s.features.IsEnabled(featuremgmt.FlagAuthenticationConfigUI)
authConfigUIAvailable := s.license.FeatureEnabled("saml")
if hasAccess(datasources.ConfigurationPageAccess) {
configNodes = append(configNodes, &navtree.NavLink{

View File

@ -307,12 +307,11 @@ export function getAppRoutes(): RouteDescriptor[] {
{
path: '/admin/authentication',
roles: () => contextSrv.evaluatePermission(() => ['Admin', 'ServerAdmin'], [AccessControlAction.SettingsWrite]),
component:
config.featureToggles.authenticationConfigUI && config.licenseInfo.enabledFeatures?.saml
? SafeDynamicImport(
() => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage')
)
: () => <Redirect to="/admin" />,
component: config.licenseInfo.enabledFeatures?.saml
? SafeDynamicImport(
() => import(/* webpackChunkName: "AdminAuthentication" */ 'app/features/auth-config/AuthConfigPage')
)
: () => <Redirect to="/admin" />,
},
{
path: '/admin',