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

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:
ETag: db87f729761898ee
{
```
Status Codes:
- **200** SSO Settings found
- **400** Bad Request
@ -151,6 +162,17 @@ Status Codes:
Status Codes:
- **204** SSO Settings updated
- **400** Bad Request
- **401** Unauthorized
- **403** Access Denied
## Delete SSO Settings
`DELETE /api/v1/sso-settings/:provider`
Deletes an existing SSO Settings entry for a provider.
**Required permissions**
See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation.