You can find the following instructions within the SMARTFENSE platform under Settings > Components > Simulations > Delivery Method. Select: Direct Message Injection for Google.
Configuration Instructions for DMI through Google
- Enter the following URL to create a project in Google Cloud: https://console.cloud.google.com/projectcreate
- Define a representative name in “Project Name,” for example: SMARTFENSE-DMI.
- Once created, a dashboard like the following will appear:
- From the APIs panel, click “Go to APIs overview”:
- Click “Enable APIS AND SERVICES”.
- Search for the API: “Gmail API” and enable it.
- Search for the API: “Admin SDK API” and enable it.
- Click “Credentials” on the side menu.
- Find the “Service Accounts” panel and click “Manage service accounts”.
- Click “Create Service Account”.
- Fill in the form with a name and a description. For example:
- First Name: SMARTFENSE-DMI
- Description: Direct Message Injection for SMARTFENSE simulation emails.
12. Click “Continue”.
13. Finally, click “Done”.
14. Once the “Service Account” is created, you must log in again to add a new “Key.”.
15. Click “Create new key”.
16. Select the JSON option and create the “key”.
17. When finished, a file with “json” extension will be automatically downloaded. Save this file securely.
18. Go toadmin.google.com
19. Go to “API controls” as shown in this image.
20. Click “Manage Domain Wide Delegation“”.
21. Click the “Add new” button and complete the Client ID with the corresponding “Service Account” created in point 10.
22. In Oauth permissions, enter:
- https://www.googleapis.com/auth/admin.directory.user
- https://www.googleapis.com/auth/gmail.insert
- https://www.googleapis.com/auth/gmail.readonly
SMARTFENSE does not use the granted permissions for any purpose other than those explicitly specified here in the guide.
23. In the SMARTFENSE platform, enter this in the field Service Account Email the “Service Account” email address created in point 10.
24. Also, in the field JSON Private Key of SMARTFENSE, paste the JSON file content downloaded in point 17.
25. Click on the Save button in SMARTFENSE.