Skip to content

Commit 7c3d0b6

Browse files
authored
single sign on Authentik and Keycloak instructions (#320)
* single sign on Authentik and Keycloak instructions * feedback updates
1 parent 09b3a37 commit 7c3d0b6

16 files changed

+132
-0
lines changed
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

src/components/NavigationDocs.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ export const docsNavigation = [
154154
href: '/how-to/auto-offboard-users',
155155
isOpen: false,
156156
},
157+
{
158+
title: 'Single Sign-On',
159+
href: '/how-to/single-sign-on',
160+
isOpen: false,
161+
},
157162
]
158163
},
159164
{

src/pages/how-to/single-sign-on.mdx

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Single Sign On
2+
3+
Please follow the instructions below for your preferred provider.
4+
5+
## Authentik IdP
6+
7+
1. You need to create a new Application and Provider.
8+
- Browse to the Applications Administration menu, click on Application, and then click on Create with Provider:
9+
10+
<p>
11+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/1-create-with-provider.png" alt="create-with-provider" className="imagewrapper-big"/>
12+
</p>
13+
- Name the Application and select a suitable explicit user flow. In the example below, we used NetBird:
14+
15+
<p>
16+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/2-new-application.png" alt="new-application" className="imagewrapper-big"/>
17+
</p>
18+
19+
- Click Next and select the OAuth2/OpenID Provider Type:
20+
21+
<p>
22+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/3-new-application-type.png" alt="new-application" className="imagewrapper-big"/>
23+
</p>
24+
25+
- Click Next and select an explicit user authorization flow, then take note of the Client ID and Client Secret:
26+
<p>
27+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/4-new-application-client-id.png" alt="new-application" className="imagewrapper-big"/>
28+
</p>
29+
30+
- Add the following redirect URL and select a signing key: <br/>
31+
URL: `https://login.netbird.io/login/callback`
32+
<p>
33+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/5-new-application-sign.png" alt="new-application" className="imagewrapper-big"/>
34+
</p>
35+
36+
- Click on Advanced protocol settings and ensure that the email, opened, and profile scopes are selected and that Based on the User’s Hash ID is selected for Subject mode:
37+
38+
<p>
39+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/6-new-application-scopes.png" alt="new-application" className="imagewrapper-big"/>
40+
</p>
41+
42+
- Click Next on the following two screens and Submit to create the provider and application:
43+
44+
<p>
45+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/7-new-application-submit.png" alt="new-application" className="imagewrapper-big"/>
46+
</p>
47+
48+
- You should see an application listed as follow:
49+
50+
<p>
51+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/8-list-applications.png" alt="list-applications" className="imagewrapper-big"/>
52+
</p>
53+
54+
2. We need to copy the OpenID Configuration URL for the new provider. You can do that by navigating to Providers in the left menu and then selecting the newly created provider. There you should see a windows similar to the following:
55+
56+
<p>
57+
<img src="/docs-static/img/how-to-guides/single-sign-on/authentik-idp/9-list-providers.png" alt="list-providers" className="imagewrapper-big"/>
58+
</p>
59+
60+
- Copy the OpenID Configuration URL.
61+
62+
63+
3. Then, share the following information with the NetBird support team at [email protected]:
64+
65+
- Client ID
66+
- Client Secret
67+
- OpenID Configuration URL
68+
- Email domains for your users
69+
70+
<Note>
71+
We recommend using a secure channel to share the Client’s secret. You can send a separate email and use a secret sharing service like: <br/>
72+
https://onetimesecret.com/en/ <br/>
73+
https://password.link/en
74+
</Note>
75+
76+
## Keycloak IdP
77+
78+
1. You need to create a new client
79+
80+
- Browse to the clients Administration menu and then click in Create client:
81+
82+
<p>
83+
<img src="/docs-static/img/how-to-guides/single-sign-on/keycloak-idp/1-new-client.png" alt="new-client" className="imagewrapper-big"/>
84+
</p>
85+
86+
2. Create a client with the type OpenID Connect and add any client ID and name for the client:
87+
88+
<p>
89+
<img src="/docs-static/img/how-to-guides/single-sign-on/keycloak-idp/2-new-client-type.png" alt="new-client" className="imagewrapper-big"/>
90+
</p>
91+
92+
3. Click Next and enable the following options for Capability config:
93+
94+
<p>
95+
<img src="/docs-static/img/how-to-guides/single-sign-on/keycloak-idp/3-new-client-capability.png" alt="new-client" className="imagewrapper-big"/>
96+
</p>
97+
98+
4. Click Next and fill the following fields:
99+
100+
Valid redirect URIs: `https://login.netbird.io/login/callback` <br/>
101+
Web origins: `+`
102+
103+
<p>
104+
<img src="/docs-static/img/how-to-guides/single-sign-on/keycloak-idp/4-new-client-callback.png" alt="new-client" className="imagewrapper-big"/>
105+
</p>
106+
107+
5. Click Save.
108+
109+
6. Next we need to retrieve the secret for the client, you can get that in the Credentials tab for the client:
110+
111+
<p>
112+
<img src="/docs-static/img/how-to-guides/single-sign-on/keycloak-idp/5-new-client-credentials.png" alt="new-client" className="imagewrapper-big"/>
113+
</p>
114+
115+
7. Then, share the following information with the NetBird support team at [email protected]:
116+
117+
- Client ID
118+
- Keycloak URL
119+
- Realm
120+
- Client Secret
121+
- Email domains for your users
122+
123+
<Note>
124+
We recommend using a secure channel to share the Client’s secret. You can send a separate email and use a secret sharing service like: <br/>
125+
https://onetimesecret.com/en/ <br/>
126+
https://password.link/en
127+
</Note>

0 commit comments

Comments
 (0)