From f4cf504009569926ebb7999e685b64e8daa288eb Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:02:46 -0600 Subject: [PATCH] [v10.3.x] Added Descope as an OAuth2 provider (#81165) Added Descope as an OAuth2 provider (#80050) * added Descope as an OAuth2 provider Added docs for customers of ours that have asked us how to use Descope with Grafana. We wanted to make sure they can easily find these docs on both our website and Grafana's. * Update docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md Co-authored-by: Ieva * Update docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md Co-authored-by: Ieva * Update docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com> * Changed note to use admonition * Prettier Signed-off-by: Jack Baldry --------- Signed-off-by: Jack Baldry Co-authored-by: Ieva Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com> Co-authored-by: Jack Baldry (cherry picked from commit f726ea1e523b7b7a91beb207d8e4df40d62c238e) Co-authored-by: Kevin J Gao <32936811+gaokevin1@users.noreply.github.com> --- .../generic-oauth/index.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md b/docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md index 0e0c2d60d40..780bf99099c 100644 --- a/docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md +++ b/docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md @@ -326,6 +326,40 @@ Payload: This section includes examples of setting up generic OAuth2 integration. +### Set up OAuth2 with Descope + +To set up generic OAuth2 authentication with Descope, follow these steps: + +1. Create a Descope Project [here](https://app.descope.com/gettingStarted), and go through the Getting Started Wizard to configure your authentication. You can skip step if you already have Descope project set up. + +1. If you wish to use a flow besides `Sign Up or In`, go to the **IdP Applications** menu in the console, and select your IdP application. Then alter the **Flow Hosting URL** query parameter `?flow=sign-up-or-in` to change which flow id you wish to use. + +1. Click **Save**. + +1. Update the `[auth.generic_oauth]` section of the Grafana configuration file using the values from the **Settings** tab: + + {{% admonition type="note" %}} + You can get your Client ID (Descope Project ID) under [Project Settings](https://app.descope.com/settings/project). Your Client Secret (Descope Access Key) can be generated under [Access Keys](https://app.descope.com/accesskeys). + {{% /admonition %}} + + ```bash + [auth.generic_oauth] + enabled = true + allow_sign_up = true + auto_login = false + team_ids = + allowed_organizations = + name = Descope + client_id = + client_secret = + scopes = openid profile email descope.claims descope.custom_claims + auth_url = https://api.descope.com/oauth2/v1/authorize + token_url = https://api.descope.com/oauth2/v1/token + api_url = https://api.descope.com/oauth2/v1/userinfo + use_pkce = true + use_refresh_token = true + ``` + ### Set up OAuth2 with Auth0 To set up generic OAuth2 authentication with Auth0, follow these steps: