Skip to content

Commit a79f428

Browse files
authored
feat: keycloak setup for sso documentation (#1048)
1 parent 80cf2ce commit a79f428

File tree

7 files changed

+74
-16
lines changed

7 files changed

+74
-16
lines changed

platform/sso/sso_keycloak.mdx

Lines changed: 67 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,77 @@ Single Sign-On is available for enterprise plans. [Upgrade your plan](https://to
1414
If you use the self-hosted version, you must [set up the license](/platform/self_hosting/licensing) and then follow the [sso server setup guide](/platform/sso/sso_server_setup) to use this feature.
1515
:::
1616

17-
This guide will help you set up Single Sign-On (SSO) for your organization using Keycloak. See the [SSO Getting Started](/platform/sso/sso_getting_started) guide for more generalized steps on setting up SSO.
17+
This guide will help you set up Single Sign-On (SSO) for your organization using Keycloak.
18+
See the [SSO Getting Started](/platform/sso/sso_getting_started) guide for more generalized steps on setting up SSO.
1819

19-
## Set Up Keycloak
20+
## Setting up Keycloak
2021

21-
Coming soon...
22-
[//]: # (TODO)
22+
To enable SSO with Keycloak, you first need to create a client in your Keycloak instance.
23+
Log in to Keycloak, choose the correct **Realm**, then navigate to **Clients** and click **Create client**.
2324

24-
## Set Up Tolgee
25+
<ScreenshotWrapper src="/img/docs/platform/sso/sso_keycloak_create_client.png" />
2526

26-
When you have all the necessary information from Keycloak, you need to enable the SSO feature in your organization settings and provide the necessary information to Tolgee.
27-
You can find how to enable SSO in the [SSO Getting Started](/platform/sso/sso_getting_started) guide.
27+
Enter a **Client ID** (e.g., `tolgee`), select **OpenID Connect** as the **Client Type**, and click **Next**.
2828

29-
## Log In with SSO
29+
<ScreenshotWrapper src="/img/docs/platform/sso/sso_keycloak_create_client_step1.png" />
3030

31-
Once you have set up SSO, you can log in to Tolgee using the **Log in with SSO** button on the login page and enter the domain name.
31+
Now configure the capabilities. You can see how the configuration should look in the image below.
32+
33+
* **Client authentication**: Enabled
34+
* We will be using Keycloak for authentication; authorization by third-party providers is not supported.
35+
* **Authentication flow**: Standard flow
36+
* Enables the standard OAuth 2.0 authorization code flow.
37+
38+
<ScreenshotWrapper src="/img/docs/platform/sso/sso_keycloak_create_client_step2.png" />
39+
40+
Set login settings as follows. You can also see the configuration in the image below.
41+
42+
* **Root URL**: `https://app.tolgee.io` (for Tolgee Cloud) or your Tolgee instance URL
43+
* **Home URL**: Same as **Root URL**
44+
* **Valid redirect URIs**: `/login/auth_callback/sso`
45+
* This is the callback URL where Keycloak will redirect users after successful authentication.
46+
47+
You can also set `Valid post logout redirect URIs` and `Web origins` if you want to, though
48+
Keycloak logout flow is not supported.
49+
50+
:::info Logout and disabled accounts handling
51+
Tolgee handles logout and general account availability automatically by checking token validity
52+
every few minutes if a client tries to access Tolgee.
53+
:::
54+
55+
<ScreenshotWrapper src="/img/docs/platform/sso/sso_keycloak_create_client_step3.png" />
56+
57+
Once saved, navigate to the **Credentials** tab to get your **Client Secret**. You can see it in the image below.
58+
59+
<ScreenshotWrapper src="/img/docs/platform/sso/sso_keycloak_client_credentials.png" />
60+
61+
### Finding the endpoints
62+
63+
You can find all the required endpoints in Keycloak’s **OpenID Provider Configuration** (Well-Known URL).
64+
65+
```
66+
https://<your-keycloak-domain>/realms/<your-realm-name>/.well-known/openid-configuration
67+
```
68+
69+
Look for `authorization_endpoint` (the URL where users are redirected to authenticate) and
70+
`token_endpoint` (the URL where Tolgee exchanges the authorization code for access tokens).
71+
72+
73+
## Setting up Tolgee
74+
75+
You will need the following values for Tolgee:
76+
77+
* **Client ID**: The same as the client ID you entered in the first step above
78+
* **Client Secret**: Found in the **Credentials** tab
79+
* **Authorization endpoint**: Found in the response of the [well-known request](#finding-the-endpoints)
80+
* **Token endpoint**: Found in the response of the [well-known request](#finding-the-endpoints)
81+
82+
When you have all the necessary information from Keycloak, you need to enable the SSO feature
83+
in your organization settings and provide the necessary information to Tolgee.
84+
You can find detailed instructions on how to enable SSO in Tolgee in the [SSO Getting Started](/platform/sso/sso_getting_started) guide.
85+
86+
## Logging in with SSO
87+
88+
Once you have set up SSO, you can log in to Tolgee using the **Log in with SSO** button
89+
on the login page and enter the domain name.
3290
After that, you will be redirected to the Keycloak login page to authenticate.

platform/sso/sso_okta.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ If you use the self-hosted version, you must [set up the license](/platform/self
1616

1717
This guide will help you set up Single Sign-On (SSO) for your organization using OpenID Connect with Okta. See the [SSO Getting Started](/platform/sso/sso_getting_started) guide for more generalized steps on setting up SSO.
1818

19-
## Set Up Okta
19+
## Setting up Okta
2020

2121
First, you must set up an **OpenID Connect application** in Okta. To do this, log in to your Okta account
22-
and navigate to the **Admin** panel. Then find the **Applications** section and click on **Create App Integration**:
22+
and navigate to the **Admin** panel. Then find the **Applications** section and click on **Create App Integration**.
2323
<ScreenshotWrapper src="/img/docs/platform/sso/sso_okta_create_app.png" />
2424

25-
Now select **OIDC - OpenID Connect** as the Sign-in method and **Web Application** click **Next**:
25+
Now select **OIDC - OpenID Connect** as the Sign-in method and **Web Application** click **Next**.
2626

2727
<ScreenshotWrapper src="/img/docs/platform/sso/sso_okta_app_settings.png" />
2828

2929
Fill in the **Application settings**:
3030
- Grant type: **Authorization Code**
3131
- Login redirect URIs: **https://app.tolgee.io/login/auth_callback/sso** (if you use Tolgee cloud) or your Tolgee instance URL ending with `/login/auth_callback/sso`
3232

33-
Click **Save**. Here is how the settings can look like:
33+
Click **Save**. Bellow you can see how the settings can look.
3434

3535
<ScreenshotWrapper src="/img/docs/platform/sso/sso_okta_general_settings.png" />
3636

@@ -52,12 +52,12 @@ all user tokens will stop working until the user logs in again. This will break
5252

5353
To find the **Well-Known configuration URL**, click on the chosen **Authorization Server** and navigate to **Metadata URI**.
5454

55-
## Set Up Tolgee
55+
## Setting up Tolgee
5656

5757
When you have all the necessary information from Okta, you need to enable the SSO feature in your organization settings and provide the necessary information to Tolgee.
58-
You can find how to enable SSO in the [SSO Getting Started](/platform/sso/sso_getting_started) guide.
58+
You can find how to enable SSO in Tolgee in the [SSO Getting Started](/platform/sso/sso_getting_started) guide.
5959

60-
## Log In with SSO
60+
## Logging in with SSO
6161

6262
Once you have set up SSO, you can log in to Tolgee using the **Log in with SSO** button on the login page and enter the domain name.
6363
After that, you will be redirected to the Okta login page to authenticate.
99.1 KB
Loading
135 KB
Loading
260 KB
Loading
314 KB
Loading
297 KB
Loading

0 commit comments

Comments
 (0)