Last updated
Was this helpful?
Last updated
Was this helpful?
Here is full Google documentation about this process.
The Google OpenID Connect can be configured in the Google Cloud Console
If you don't have any project setup already (or you want to create a new one for this purpose), create it by clicking the dropdown menu here:
If you already have project, make sure to select it in the above dropdown menu.
Now, navigate to APIs & Services
We will focus on the consent screen first, select OAuth consent screen
Pick the User Type according to your needs, this example will focus on the internal type
Fill in all required details. Make sure to fill the correct domain. This should be the top domain under which your Defguard dashboard can be accessed, not the subdomain (e.g. defguard.example.com
-> example.com
).
On the scopes config screen, click ADD OR REMOVE SCOPES
, Defguard requires at least the following scopes:
Proceed until the end and return to the OAuth consent screen dashboard.
Now, go to Credentials
, click CREATE CREDENTIALS
and choose OAuth client ID
On the next screen, fill out all required information:
Make sure to select "Web application" as the application type. The other thing to note here is the redirect URI. It is the URI to which the user will be redirected from the external provider's authorization. This URI is in the 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, make sure to enter an additional URI here in the form of <DEFGUARD_ENROLLMENT_URL>/openid/callback
.
After you proceed further, you will be presented with a popup containing your Client ID
and Client Secret
, copy them and paste on the Defguard OpenID configuration page.
This feature is currently technically limited to 10000 members or groups. High user or group counts may still trigger your provider API limits even below this threshold. If you have many users (200+), we recommend you test this feature first before you decide to turn on automatic user deletion.
This feature is available only in Defguard v1.2.0 and above
This documentation concerns only the Google directory synchronization. For more general information, see the general directory synchronization guide.
The menu can be found in Defguard settings by navigating to the "OpenID" tab.
The following configuration options are currently available in the directory synchronization menu specifically for the Google provider:
Admin email: The email of the Google Workspace admin user on whose behalf Defguard will call the Google API
Service account in use: The email of the Google service account that is currently used
To learn more about the rest of the configuration options, see the general directory synchronization guide.
Navigate to Service Accounts in the Google Cloud console
Click "Create service account"
Give your service account a descriptive name
Skip step 2 and 3 if you are not sure what to configure there.
Go to your newly created service account and add a new key in the "KEYS" tab.
A JSON file will be downloaded after you click "CREATE". Store it securely as it may grant access to your Google Workspace directory.
Next, navigate to the "DETAILS" tab and copy the unique ID of your service account.
Open the Advanced settings and under Domain-wide delegation click "View google workspace admin console"
Now in the admin console, navigate to API controls
In the API controls, click "Manage domain wide delegation"
On the next screen, add a new API client
Specify the following scopes for your client:
openid, email, profile, https://www.googleapis.com/auth/admin.directory.customer.readonly, https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.user.readonly
Navigate to the Defguard settings and upload the JSON file you obtained previously. Make sure to also input the email of the account on which behalf the API calls will be made. This account should have access to users and their groups (e.g. email of your account as an admin).
Test if you properly set everything up by clicking the "Test connection" button.