Docs: Improve the SSO settings API docs (#87599)

* improve SSO settings API docs

* address feedback
This commit is contained in:
Mihai Doarna 2024-05-31 11:22:54 +03:00 committed by GitHub
parent 17ca61d7f8
commit d83288b8c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,10 +23,17 @@ title: SSO Settings API
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
{{% admonition type="note" %}}
Available in Public Preview in Grafana 10.4 and on Grafana Cloud behind the `ssoSettingsApi` feature toggle.
Available since Grafana 11. SAML support is in public preview behind the `ssoSettingsSAML` feature flag.
{{% /admonition %}}
The API can be used to create, update, delete, get, and list SSO Settings.
The API can be used to create, update, delete, get, and list SSO Settings for OAuth2 and SAML.
The settings managed by this API are stored in the database and override
[settings from other sources]({{< relref "../../setup-grafana/configure-security/configure-authentication" >}})
(arguments, environment variables, settings file, etc).
Therefore, every time settings for a specific provider are removed or reset to the default settings at runtime,
the settings are inherited from the other sources in the reverse order of precedence
(`arguments > environment variables > settings file`).
## List SSO Settings
@ -34,6 +41,8 @@ The API can be used to create, update, delete, get, and list SSO Settings.
Lists the SSO Settings for all providers.
The providers or SSO keys that are not managed by this API are retrieved from the other sources (settings file, environment variables, default values).
**Required permissions**
See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation.
@ -99,6 +108,8 @@ Status Codes:
Gets the SSO Settings for a provider.
The SSO keys that are not managed by this API are retrieved from the other sources (settings file, environment variables, default values).
**Required permissions**
See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation.
@ -151,6 +162,17 @@ Status Codes:
Updates the SSO Settings for a provider.
When you submit new settings for a provider via API,
Grafana verifies whether the given settings are allowed and valid.
If they are, then Grafana stores the settings in the database and reloads
Grafana services with no need to restart the instance.
{{% admonition type="note" %}}
If you run Grafana in high availability mode, configuration changes
may not get applied to all Grafana instances immediately. You may need
to wait a few minutes for the configuration to propagate to all Grafana instances.
{{% /admonition %}}
**Required permissions**
See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation.