You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: admin-and-features/openid-connect/README.md
+27-17Lines changed: 27 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,24 @@
1
-
# SSO (OpenID Connect)
1
+
# Internal SSO (OpenID Connect Provider)
2
2
3
3
## OpenID Connect
4
4
5
5
### What is OpenID Connect?
6
6
7
-
OpenID Connect is an identity layer built on top of OAuth2 it allows third-party applications to get basic information about your profile and verify your identity. Its purpose is to give you one login for multiple sites. You're probably familiar with it if you used **Login with Google**. For example, if you click Login with Google you'll be redirected to the Google page with verify form that you allow some website to get information from your profile for example email, name, etc.
7
+
OpenID Connect is an identity layer built on top of OAuth2, it allows third-party applications to get basic information about your profile and verify your identity. Its purpose is to give you one login for multiple sites. You're probably familiar with it if you used **Login with Google**. For example, if you click Login with Google you'll be redirected to the Google page with verify form that you allow some website to get information from your profile for example email, name, etc.
8
+
9
+
### Defguard as an OpenID Connect Provider
10
+
11
+
Defguard is a full-featured OIDC provider enabling SSO (Single Sign-On) across third-party applications. Apps can authenticate users through Defguard identity system using standard [OIDC flow](./#defguard-openid-flow).  
As an identity provider one of our core features is Login with Defguard which allows you to log into other websites using your Defguard account so you don't have to care about multiple passwords and leaks. At this point you may have concern and ask is it safe? Yes, it's completely safe cause all information third party app will receive is the information that you allowed on redirect page. These information then are sent to third party app as IDToken which is basically JSON Web Token with additional claims like first name or email. Your password isn't send in any step of this.
21
+
As an identity provider, one of our core features is Login with Defguard which allows you to log into other websites using your Defguard account so you don't have to care about multiple passwords and leaks. At this point you may have concern and ask is it safe? Yes, it's completely safe cause all information third party app will receive is the information that you allowed on the redirect page. This information then are sent to third party app as IDToken which is basically JSON Web Token with additional claims like first name or email. Your password isn't sent in any step of this.
12
22
13
23
### Defguard OpenID flow
14
24
@@ -18,19 +28,19 @@ As an identity provider one of our core features is Login with Defguard which al
18
28
19
29
#### Client creation
20
30
21
-
To enable login with other app first you need to add it as new OpenID client. To do it navigate to OpenID Apps on the left side navigation then click Add new button.
31
+
To enable login with other app first you need to add it as new OpenID client. To do it, navigate to OpenID Apps on the left side navigation, then click Add new button.
**Name**Name of your client **Redirect URI** URL on which user will be redirected with generated PKCE code example("https://myapp.com/redirect\_uri") **Scopes** Scopes which your client will be using
37
+
**Name** of your client **Redirect URI** URL to which user will be redirected with generated PKCE code example("https://myapp.com/redirect\_uri") **Scopes** which your client will be using
28
38
29
-
After creating your client you can click on it on list and be redirected to detailed client page with it unique Client ID and Client secret codes.
39
+
After creating your client, you can click on it on the list and be redirected to a detailed client page with it unique Client ID and Client secret codes.
30
40
31
-
**Client ID** is a public identifier for apps. Something like unique login so we can verify app URL matches it's Client ID. **Client Secret** Only known for authorization server(Defguard) and the applications as we using
41
+
**Client ID** is a public identifier for apps. Something like unique login so we can verify app URL matches its Client ID. **Client Secret** Only known for authorization server(Defguard) and the applications as we are using
32
42
33
-
Setup on authorization app if you want to login with Defguard.
43
+
Setup on authorization app if you want to log in with Defguard.
34
44
35
45
### OpenID endpoints
36
46
@@ -54,9 +64,9 @@ OpenID Connect defines a discovery mechanism, called OpenID Connect Discovery, w
54
64
55
65
#### Authentication request
56
66
57
-
Set up your login with Defguard button to redirect to authorization endpoint which is `https://defguard.company.net/openid/authorize?`
67
+
Set up your login with Defguard button to redirect to authorization endpoint, which is `https://defguard.company.net/openid/authorize?`
58
68
59
-
Below is sample authentication request which your app should do on Login with Defguard button
69
+
Below is a sample authentication request which your app should do on Login with Defguard button
@@ -69,10 +79,10 @@ client_id=<YOUR_CLIENT_ID> // Generated by Defguard available on app detail page
69
79
70
80
**Notes:**
71
81
72
-
1. Client id and secret is generated by Defguard after creating your app you can see it on app detail page
82
+
1. Client id and secret is generated by Defguard after creating your app, you can see it on app detail page
73
83
2.**Scope** must contain OpenID
74
-
3. Available scopes are profile(all available info from user profile) phone and email
75
-
4. Currently only supported **response\_type** is **code**.
84
+
3. Available scopes are profile(all available info from user profile) phone and email
85
+
4. Currently, only supported **response\_type** is **code**.
76
86
5. Redirect URI is URL on which user will be redirected with generated PKCE code (Redirect URI must match URI declared on client creation otherwise error will be returned)
77
87
78
88
**Successful authentication response**
@@ -87,7 +97,7 @@ code=SplxlOBeZQQYbYS6WxSbIA
87
97
88
98
#### Exchange code for ID Token
89
99
90
-
After receiving code from previous step you need to exchange it for token on token endpoint `defguard.company.net/api/v1/openid/token`
100
+
After receiving code from previous step, you need to exchange it for token on token endpoint `defguard.company.net/api/v1/openid/token`
91
101
92
102
Request Header and URL:
93
103
@@ -106,7 +116,7 @@ grant_type=authorization_code
106
116
107
117
**Note:**
108
118
109
-
1. Currently only supported **grant\_type** is authorization\_code
119
+
1. Currently, only supported **grant\_type** is authorization\_code
110
120
2. Code is your PKCE code received in previous step
1. As we using HS256 algorithm ID Token is signed using your app Client Secret
146
+
1. As we are using HS256 algorithm, ID Token is signed using your app Client Secret
137
147
138
148
**Authorized apps:**
139
149
140
-
Every user that used Login with Defguard option can see in his profile name of every authorized app. If you revoke app then you will have to click allow on form with permissions again.
150
+
Every user that used Login with Defguard option can see in his profile name of every authorized app. If you revoke app, then you will have to click allow on the form with permissions again.
0 commit comments