Step 1: Create a Service Account
-
Navigate to Google Cloud Console:
- Go to Google Cloud Console and sign in with your admin credentials.
-
Create a New Project for the Service account:
- Navigate to IAM & Admin > Create a Project
- Enter a Project name *
- Select Organization *
- Select Parent resource *
- Click Create the save button.
-
Enable Admin SDK API:
- Navigate to APIs & Services > Library.
- Search for "Admin SDK".
- Click on "Admin SDK API" and enable it.
-
Create a Service Account:
- Navigate to IAM & Admin
- Select Service Accounts
-
Access IAM & Admin:
- Click on "IAM & Admin".
- Select "Service Accounts".
-
Create a Service Account:
- Click "+Create Service Account".
- Fill in the Service account name and description.
- Click "Create and Continue".
-
Grant Access to Project:
- From Permissions add the following Roles:
- Search and assign access to the project:
- "Service Account Admin"
- "Service Account User"
- Click "Done".
- Search and assign access to the project:
- From Permissions add the following Roles:
Step 2: Set Up Domain-Wide Delegation
-
Configure Domain-Wide Delegation:
- Navigate to the "Actions" column and click on "Manage details".
- Click on "Advanced Settings"
- Copy the "Client ID:" number and click on the "View Google Workspace Admin Console" button.
-
Configure API Access:
- Open the Admin console.
- Navigate to "Security" > "Access and data control" > "API Controls".
- Click "Manage domain wide delegation".
-
Add New API Client:
- Click "Add new" under "API clients".
- Enter the Unique ID from the Service account details page.
-
For OAuth scopes, copy and paste the following:
https://mail.google.com/,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.labels
- Click "Authorize".
Step 3: Generate a JSON Key
-
Navigate to Google Cloud Console:
- Go to Google Cloud Console and sign in with your admin credentials.
-
Access the Service Account:
- Return to the "Service Accounts" page.
- Click on the newly created service account.
- Ensure the Service account status is set to "Enabled".
-
Create a Key:
- Navigate to the "Keys" section.
- Click "Add Key" and select "Create new key".
- Choose "JSON" as the key type and click "Create".
- Save the JSON file securely as it contains the credentials for the service account.
-
Upload the JSON File to Dune Platform
-
Send the JSON file you generated to your Account Manager at Dune Security. This is necessary to complete DMI setup.
Note: Regarding rotating keys, please contact the Solutions Engineering team when credentials expire.
-
Step 3: Set Up Domain-Wide Delegation
-
Access Domain-Wide Delegation:
- Go to the "Details" tab of your service account.
- Click on "Advanced Settings" and then "Learn more about domain-wide delegation".
-
Configure API Access:
- Open the Admin console.
- Navigate to "Security" > "Access and data control" > "API Controls".
- Click "Manage domain wide delegation".
-
Add New API Client:
- Click "Add new" under "API clients".
- Enter the Unique ID from the Service account details page.
-
For OAuth scopes, copy and paste the following:
https://mail.google.com/,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.labels
- Click "Authorize".
Step 4: Enable Gmail API
-
Access Google Cloud Console:
- Open your web browser and navigate to the Google Cloud Console.
-
Navigate to APIs & Services:
- In the left-hand navigation panel, click on APIs & Services.
-
Search for Gmail API:
- In the APIs & Services dashboard, find the search bar at the top and type Gmail API.
-
Enable the Gmail API:
- Click on the Gmail API result from the search.
- On the Gmail API page, click the Enable button.
Step 5: Finalize Configuration
- Verification:
- Ensure all settings are saved and verified.
- Conduct a test to confirm the configuration is working as expected.
Optional: SMTP Setup for Google Phishing Simulations
Direct Mail Injection is the recommended delivery method for Google phishing simulations. However, if your organization is unable to use DMI, Dune also supports SMTP-based delivery.
SMTP requires additional mail routing and allowlisting configuration in Google Workspace to ensure simulation emails are delivered successfully and are not blocked, filtered, or marked as spam by Google’s security controls.
To configure SMTP for Google phishing simulations, follow the setup guide here:
Setting Up Simple Mail Transfer Protocol (SMTP) for Google Phishing Simulations
Once SMTP configuration is complete, log in to the Dune platform and send a test simulation to confirm delivery.
Comments
0 comments
Please sign in to leave a comment.