From 6e8e4a8b77b0d0bc7a82acde35ca13c779b02dbf Mon Sep 17 00:00:00 2001 From: colin-stuart Date: Mon, 22 Jan 2024 12:20:16 -0500 Subject: [PATCH] Auth: Add docs for the SSO Settings List endpoint (#80927) * add docs for SSO Settings List endpoint * Update docs/sources/developers/http_api/sso-settings.md Co-authored-by: Misi * Update docs/sources/developers/http_api/sso-settings.md Co-authored-by: Misi --------- Co-authored-by: Misi --- .../developers/http_api/sso-settings.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/docs/sources/developers/http_api/sso-settings.md b/docs/sources/developers/http_api/sso-settings.md index f8d2a45923b..e1e284c76d8 100644 --- a/docs/sources/developers/http_api/sso-settings.md +++ b/docs/sources/developers/http_api/sso-settings.md @@ -24,6 +24,71 @@ title: SSO Settings API The API can be used to create, update, delete, get, and list SSO Settings. +## List SSO Settings + +`GET /api/v1/sso-settings` + +Lists the SSO Settings for all providers. + +**Required permissions** + +See note in the [introduction]({{< ref "#sso-settings" >}}) for an explanation. + +| Action | Scope | +| --------------- | ---------------------------- | +| `settings:read` | `settings:auth.{provider}:*` | + +**Example Request**: + +```http +GET /api/v1/sso-settings HTTP/1.1 +Accept: application/json +Content-Type: application/json +Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk +``` + +**Example Response**: + +```http +HTTP/1.1 200 +Content-Type: application/json +[ + { + "id": "1", + "provider": "github", + "settings": { + "apiUrl": "https://api.github.com/user", + "clientId": "my_github_client", + "clientSecret": "*********", + "enabled": true, + "scopes": "user:email,read:org" + // rest of the settings + }, + "source": "system", + }, + { + "id": "2", + "provider": "azuread", + "settings": { + "authUrl": "https://login.microsoftonline.com/00000000-0000-0000-0000-000000000000/oauth2/v2.0/authorize", + "clientId": "my_azuread_client", + "clientSecret": "*********", + "enabled": true, + "scopes": "openid,email,profile" + // rest of the settings + }, + "source": "system", + } +] +``` + +Status Codes: + +- **200** – SSO Settings found +- **400** – Bad Request +- **401** – Unauthorized +- **403** – Access Denied + ## Get SSO Settings `GET /api/v1/sso-settings/:provider`