Skip to content

Commit 1faba87

Browse files
defguard-communitygitbook-bot
authored andcommitted
GITBOOK-336: change request with no subject merged in GitBook
1 parent 4c19caa commit 1faba87

File tree

10 files changed

+100
-29
lines changed

10 files changed

+100
-29
lines changed

.gitbook/assets/image (57).png

61.5 KB
Loading

.gitbook/assets/image (58).png

440 KB
Loading

.gitbook/assets/image (59).png

602 KB
Loading

.gitbook/assets/image (60).png

457 KB
Loading

.gitbook/assets/image (61).png

198 KB
Loading

SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
* [Keycloak](enterprise/all-enteprise-features/external-openid-providers/keycloak.md)
8181
* [JumpCloud](enterprise/all-enteprise-features/external-openid-providers/jumpcloud.md)
8282
* [Okta](enterprise/all-enteprise-features/external-openid-providers/okta.md)
83+
* [Custom](enterprise/all-enteprise-features/external-openid-providers/custom.md)
8384
* [External OIDC secure enrollment](enterprise/all-enteprise-features/external-oidc-secure-enrollment.md)
8485
* [VPN & Client behavior customization](enterprise/all-enteprise-features/behavior-customization.md)
8586

enterprise/all-enteprise-features/external-openid-providers/README.md

+40
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,46 @@ For this to work, make sure you have the following two things set:
7878

7979
If you disable the option above, new users won't be able to automatically go through the enrollment. You will need to create their accounts by hand (with the same email address as the one they have set on your OIDC provider's side) and only then they will have an option to activate it by logging through the provider.
8080

81+
### Directory synchronization
82+
83+
{% hint style="info" %}
84+
This feature is available only in Defguard v1.2.0 and above
85+
{% endhint %}
86+
87+
Defguard supports synchronizing users' and groups' states based on the state of the external provider directory. The following things can be synchronized:
88+
89+
* **User Groups**: Automatically create and assign user groups in Defguard to reflect them in Google Workspace.
90+
* **User Deletion**: Removing a user from the provider's directory can also remove them from Defguard.
91+
* **User Status**: Disabling users in the provider's directory will disable them in Defguard.
92+
93+
Defguard doesn't automatically create users based on the users in your provider's directory. They will have to manually log in to Defguard through your provider for their Defguard accounts to be created. Defguard is responsible only for synchronizing their later state.
94+
95+
#### General configuration
96+
97+
The menu can be found in Defguard settings by navigating to the "OpenID" tab.
98+
99+
<figure><img src="../../../.gitbook/assets/image (57).png" alt=""><figcaption></figcaption></figure>
100+
101+
The following configuration options are currently available in the directory synchronization menu for all providers:
102+
103+
* **Synchronize (All/User/Group):** What to synchronize.
104+
* **All** - synchronize both user state (disabled/enabled), their deletion, and groups
105+
* **User** - synchronize only user state (disabled/enabled) and whether they've been deleted
106+
* **Group** - synchronize only user groups
107+
* **Synchronization interval (600s by default):** How often to synchronize with your provider. Very low values may cause issues with the provider API. The user state is also synchronized on login.
108+
109+
{% hint style="danger" %}
110+
If you want to delete your users based on the state of your provider we recommend trying out the "disable" behavior first to make sure everything works as expected. Always back up your database regularly.
111+
{% endhint %}
112+
113+
* **User behavior (Keep, Disable, Delete):** What to do with Defguard users who are absent from your provider's directory.
114+
* **Admin behavior (Keep, Disable, Delete):** What to do with Defguard users with admin status (in Defguard) who are absent from your provider's directory.
115+
116+
#### Currently supported providers
117+
118+
* [Google](google.md#directory-synchronization)
119+
* Microsoft
120+
81121
## Known issues
82122

83123
### JumpCloud
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Custom
2+
3+
{% hint style="warning" %}
4+
Defguard supports custom providers that allow a **code** response type in the OpenID authorization flow.
5+
{% endhint %}
6+
7+
You can also configure a custom OpenID provider. The key thing here is setting up the **Base URL** correctly. This URL is used to discover all the endpoints required for the authorization flow.
8+
9+
The easiest way of obtaining the Base URL is to find out what is the OpenID `.well-known` URL of your provider. For example, for Google it's `https://accounts.google.com/.well-known/openid-configuration`, in this case, the Base URL would be `https://accounts.google.com` (note the lack of a trailing slash). The part starting with `/.well-known` is added automatically, so it should be omitted from the Base URL. This is explained in more detail in the [Base URL](custom.md#base-url) section.
10+
11+
In order to get the **Client ID** and **Client Secret** values, refer to the documentation of your custom provider of choice.
12+
13+
When configuring your external OpenID provider, at some point you will need to provide a callback URL, which will redirect the user back to Defguard. This URL is in form of `<DEFGUARD_DASHBOARD_URL>/auth/callback`. Replace `<DEFGUARD_DASHBOARD_URL>` with the URL under which your dashboard is accessible, e.g. `https://defguard.example.com`. If you'd like to use OpenID enrollment through proxy too, make sure to enter an additional URI in the form of `<DEFGUARD_ENROLLMENT_URL>/openid/callback`.
14+
15+
If you're having issues with your custom provider's base URL, check Defguard's (core) logs. It should say what URL it expected.

enterprise/all-enteprise-features/external-openid-providers/google.md

+6-22
Original file line numberDiff line numberDiff line change
@@ -42,40 +42,24 @@ This feature is currently limited to 500 Google Workspace members or groups. It
4242
This feature is available only in Defguard v1.2.0 and above
4343
{% endhint %}
4444

45-
Defguard supports synchronization of users and groups state based on Google Workspace. The following things can be synchronized:
46-
47-
* **User Groups**: Automatically create and assign user groups in Defguard to reflect them in Google Workspace.
48-
* **User Deletion**: Removing a user in Google Workspace can also remove them in Defguard.
49-
* **User Status**: Disabling a user in Google Workspace will disable them in Defguard.
50-
51-
Defguard doesn't automatically create users based on the users in your Workspace. They will have to manually login to Defguard through your provider in order for their Defguard accounts to be created. Defguard is responsible only for synchronizing their later state.
45+
This documentation concerns only the Google directory synchronization. For more general information, see the [general directory synchronization guide](./#directory-synchronization).
5246

5347
#### Directory synchronization configuration menu
5448

5549
The menu can be found in Defguard settings by navigating to the "OpenID" tab.
5650

5751
<figure><img src="../../../.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>
5852

59-
The following configuration options are currently available in the directory synchronization menu:
60-
61-
* **Synchronize (All/User/Group):** What to synchronize.
62-
* **All** - synchronize both user state (disabled/enabled), their deletion and groups
63-
* **User** - synchronize only user state (disabled/enabled) and whether they've been deleted
64-
* **Group** - synchronize only user groups
65-
* **Synchronization interval (600s by default):** How often to synchronize with Google. Very low values may cause issues with Google API. Users are also synchronized on login.
53+
The following configuration options are currently available in the directory synchronization menu specifically for the Google provider:
6654

67-
{% hint style="danger" %}
68-
If you want to delete your users based on the state of Google Workspace we recommend trying out the "disable" behavior first to make sure everything works as expected. Always backup your database regularly.
69-
{% endhint %}
70-
71-
* **User behavior (Keep, Disable, Delete):** What to do with Defguard users not present in Google Workspace.
72-
* **Admin behavior (Keep, Disable, Delete):** What to do with Defguard users with admin status (in Defguard) who are not present in Google Workspace.
7355
* **Admin email:** The email of the Google Workspace admin user on whose behalf Defguard will call the Google API
74-
* **Service account in use:** The email of the Google service account which is currently used
56+
* **Service account in use:** The email of the Google service account that is currently used
57+
58+
To learn more about the rest of the configuration options, see the [general directory synchronization guide](./#directory-synchronization).
7559

7660
#### Directory synchronization setup
7761

78-
1. Navigate to [Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) in the Google cloud console\
62+
1. Navigate to [Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) in the Google Cloud console\
7963

8064

8165
<figure><img src="../../../.gitbook/assets/image (49).png" alt=""><figcaption></figcaption></figure>

enterprise/all-enteprise-features/external-openid-providers/microsoft.md

+38-7
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,49 @@ Make sure the Redirect URL you insert here is correct. Replace `defguard.example
3030

3131
13. Now you should be good to go. A new login button should appear on the login screen.
3232

33-
#### Custom OpenID provider
33+
### Directory synchronization
34+
35+
{% hint style="info" %}
36+
This feature is available only in Defguard 1.2.1 and above
37+
{% endhint %}
3438

3539
{% hint style="warning" %}
36-
Defguard supports custom providers that allow a **code** response type in the OpenID authorization flow.
40+
This feature is currently limited to 999 Microsoft Entra ID members or groups. It may not work correctly if you have more members than that. If this limit is an issue, report it on our GitHub.
3741
{% endhint %}
3842

39-
You can also configure a custom OpenID provider. The key thing here is setting up the **Base URL** correctly. This URL is used to discover all the endpoints required for the authorization flow.
43+
Defguard supports synchronizing groups' and users' states based on your Microsoft directory.
44+
45+
Make sure to check the [general guide to directory synchronization](./#directory-synchronization) to learn more about the available configuration options.
46+
47+
#### Setup
48+
49+
1. Go back to your app registrations in Microsoft Entra ID and select the app you registered during the provider setup.
50+
2. Navigate to API permissions\
51+
52+
53+
<figure><img src="../../../.gitbook/assets/image (58).png" alt=""><figcaption></figcaption></figure>
54+
55+
56+
3. Click "Add a permission", then select "Microsoft Graph"\
57+
58+
59+
<figure><img src="../../../.gitbook/assets/image (59).png" alt=""><figcaption></figcaption></figure>
60+
61+
62+
4. Select "Application permissions", as Defguard will perform the synchronization in the background.\
63+
64+
65+
<figure><img src="../../../.gitbook/assets/image (60).png" alt=""><figcaption></figcaption></figure>
66+
67+
68+
5. Assign the following permissions:
69+
* `GroupMember.Read.All`
70+
* `Group.Read.All`
71+
* `User.Read.All`
72+
6. Now grant admin consent for the permissions using the "Grant admin consent for" button\
4073

41-
The easiest way of obtaining the Base URL is finding out what is the OpenID `.well-known` URL of your provider. For example, for Google it's `https://accounts.google.com/.well-known/openid-configuration`, in this case, the Base URL would be `https://accounts.google.com` (note the lack of a trailing slash). The part starting with `/.well-known` is added automatically, so it should be omitted from the Base URL. This is explained in more detail in the [Base URL](microsoft.md#base-url) section.
4274

43-
In order to get the **Client ID** and **Client Secret** values, refer to the documentation of your custom provider of choice.
75+
<figure><img src="../../../.gitbook/assets/image (61).png" alt=""><figcaption></figcaption></figure>
4476

45-
When configuring your external OpenID provider, at some point you will need to provide a callback URL, which will redirect the user back to Defguard. This URL is in form of `<DEFGUARD_DASHBOARD_URL>/auth/callback`. Replace `<DEFGUARD_DASHBOARD_URL>` with the URL under which your dashboard is accessible, e.g. `https://defguard.example.com`. If you'd like to use OpenID enrollment through proxy too, make sure to enter an additional URI in the form of `<DEFGUARD_ENROLLMENT_URL>/openid/callback`.
4677

47-
If you're having issues with your custom provider's base URL, check Defguard's (core) logs. It should say what URL it expected.
78+
7. You should be good to go now. Navigate to the directory sync settings in Defguard and try to test your setup using the test connection button.

0 commit comments

Comments
 (0)