K8s: Refactor authorization initialization (#79670)

This commit is contained in:
Ryan McKinley
2023-12-19 19:12:35 +02:00
committed by GitHub
parent ba69d32fa5
commit 33d2d0a12d
15 changed files with 112 additions and 105 deletions
@@ -179,31 +179,3 @@ The following toggles require explicitly setting Grafana's [app mode]({{< relref
| `externalServiceAccounts` | Automatic service account and token setup for plugins |
| `panelTitleSearchInV1` | Enable searching for dashboards using panel title in search v1 |
| `ssoSettingsApi` | Enables the SSO settings API |
## Configure feature management
**Feature toggles** is an Administration page that allows authorized users to view and toggle the feature flags available in their Grafana instance. For more information, refer to [Feature toggles](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/feature-toggles/).
By default, feature toggles are in read-only mode.
Granting admin users the ability to alter the states of feature toggles requires configuring Grafana with the optional [`allow_editing`](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#allow_editing), [`update_webhook`](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#update_webhook) and [`update_webhook_token`](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#update_webhook_token) settings.
Those configurations allow the Grafana operator to set up a webhook that Grafana must call to propagate the configuration change.
**Example request**:
```http
POST $update_webhook
Accept: application/json
Content-Type: application/json
Authorization: Bearer $update_webhook_token
{
"feature_toggles": [
{
"featureToggle1": "true",
"featureToggle2": "false",
}
],
"user": "admin@example.test",
}
```