This repository has been archived by the owner on Nov 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Send an email for each email-based dataset at the end of privacy request execution. - Add a migration to create a new audit log type. Create an audit log for the email send. - Throw an exception for email-based connectors and catch to override the default execution log. - Add a draft of an email template - Connect sending a "test email" with dummy data. A fidesops admin could configure to check their email config was working. * Add more "checkpoints" to privacy request execution - these are locations from which we can resume privacy request execution without having to run from the beginning. - Add more options to CurrentStep Enum - Cache the checkpoint if an email send fails, so we can retry from the same step. * Don't send an email if the connection config is read only or there are no updates to be applied to any of the collections on the dataset. * Don't assume there's a collection when building "resume" details. A failed privacy request can be resumed outside of the traversal. * Add a first draft of docs for setting up an email connector. * Moves the email connector send method to the email connector file. * Update mock location. * Bump downrev. * update email connector guides * correct link, broken sentence * Create a new EmailRequestFulfillmentBodyParams type to be used once the cached email details are extracted by dataset. * Fix missed test. Co-authored-by: Cole <[email protected]>
- Loading branch information
Showing
26 changed files
with
911 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# Configure Email Communications | ||
## What is email used for? | ||
# Configure Automatic Emails | ||
## What is a fidesops Email Connection? | ||
|
||
Fidesops supports email server configurations for sending processing notices to privacy request subjects. Future updates will support outbound email communications with data processors. | ||
Fidesops supports configuring third party email servers to handle outbound communications. | ||
|
||
Supported modes of use: | ||
|
||
- Subject Identity Verification - for more information on identity verification in subject requests, see the [Privacy Requests](privacy_requests.md#subject-identity-verification) guide. | ||
|
||
- Subject Identity Verification - sends a verification code to the user's email address prior to processing a subject request. for more information on identity verification, see the [Privacy Requests](privacy_requests.md#subject-identity-verification) guide. | ||
- Erasure Request Email Fulfillment - sends an email to configured third parties to process erasures for a given data subject. See [creating email Connectors](#email-third-party-services) for more information. | ||
|
||
## Prerequisites | ||
|
||
|
@@ -16,12 +16,12 @@ Fidesops currently supports Mailgun for email integrations. Ensure you register | |
|
||
Follow the [Mailgun documentation](https://documentation.mailgun.com/en/latest/api-intro.html#authentication-1) to create a new Domain Sending Key for fidesops. | ||
|
||
!!! Note | ||
Mailgun automatically generates a **primary account API key** when you sign up for an account. This key allows you to perform all CRUD operations via Mailgun's API endpoints, and for any of your sending domains. For security purposes, using a new **domain sending key** is recommended over your primary API key. | ||
!!! Note | ||
Mailgun automatically generates a **primary account API key** when you sign up for an account. This key allows you to perform all CRUD operations via Mailgun's API endpoints, and for any of your sending domains. For security purposes, using a new **domain sending key** is recommended over your primary API key. | ||
|
||
## Configuration | ||
|
||
### Create the email configuration | ||
### Create the email config | ||
|
||
```json title="<code>POST api/v1/email/config" | ||
{ | ||
|
@@ -47,7 +47,7 @@ Fidesops currently supports Mailgun for email integrations. Ensure you register | |
|
||
### Add the email configuration secrets | ||
|
||
```json title="<code>POST api/v1/email/config/{{email_config_key}}/secret" | ||
```json title="<code>POST api/v1/email/config/{email_config_key}/secret" | ||
{ | ||
"mailgun_api_key": "nc123849ycnpq98fnu" | ||
} | ||
|
@@ -58,3 +58,102 @@ Fidesops currently supports Mailgun for email integrations. Ensure you register | |
|---|----| | ||
| `mailgun_api_key` | Your Mailgun Domain Sending Key. | | ||
|
||
## Email third-party services | ||
|
||
Once your email server is configured, you can create an email connector to send automatic erasure requests to third-party services. Fidesops will gather details about each collection described in the connector, and send a single email to the service after all collections have been visited. | ||
|
||
!!! Note | ||
Fidesops does not collect confirmation that the erasure was completed by the third party. | ||
|
||
|
||
### Create the connector | ||
|
||
Ensure you have created your [email configuration](#configuration) prior to creating a new email connector. | ||
|
||
```json title="<code>PATCH api/v1/connection</code>" | ||
[ | ||
{ | ||
"name": "Email Connection Config", | ||
"key": "third_party_email_connector", | ||
"connection_type": "email", | ||
"access": "write" | ||
} | ||
] | ||
``` | ||
|
||
| Field | Description | | ||
|----|----| | ||
| `key` | A unique key used to manage your email connector. This is auto-generated from `name` if left blank. Accepted values are alphanumeric, `_`, and `.`. | | ||
| `name` | A unique user-friendly name for your email connector. | | ||
| `connection_type` | Must be `email` to create a new email connector. | | ||
| `access` | Email connectors must be given `write` access in order to send an email. | | ||
|
||
|
||
### Configure notifications | ||
|
||
Once your email connector is created, configure any outbound email addresses: | ||
|
||
```json title="<code>PUT api/v1/connection/{email_connection_config_key}/secret</code>" | ||
{ | ||
"test_email": "[email protected]", | ||
"to_email": "[email protected]" | ||
} | ||
``` | ||
|
||
| Field | Description | | ||
|----|----| | ||
| `{email_connection_config_key}` | The unique key that represents the email connection to use. | | ||
| `to_email` | The user that will be notified via email to complete an erasure request. *Only one `to_email` is supported at this time.* | | ||
| `test_email` | *Optional.* An email to which you have access for verifying your setup. If your email configuration is working, you will receive an email with mock data similar to the one sent to third-party services. | | ||
|
||
### Configure the dataset | ||
|
||
Lastly, configure the collections and fields you would like to request be erased or masked. Fidesops will use these fields to compose an email to the third-party service. | ||
|
||
```json title="<code>PUT api/v1/connection/{email_connection_config_key}/dataset" | ||
[ | ||
{ | ||
"fides_key": "email_dataset", | ||
"name": "Dataset not accessible automatically", | ||
"description": "Third party data - will email to request erasure", | ||
"collections": [ | ||
{ | ||
"name": "daycare_customer", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"data_categories": [ | ||
"system.operations" | ||
], | ||
"fidesops_meta": { | ||
"primary_key": true | ||
} | ||
}, | ||
{ | ||
"name": "child_health_concerns", | ||
"data_categories": [ | ||
"user.biometric_health" | ||
] | ||
}, | ||
{ | ||
"name": "user_email", | ||
"data_categories": [ | ||
"user.contact.email" | ||
], | ||
"fidesops_meta": { | ||
"identity": "email" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
``` | ||
|
||
| Field | Description | | ||
|----|----| | ||
| `fides_key` | A unique key used to manage your email dataset. This is auto-generated from `name` if left blank. Accepted values are alphanumeric, `_`, and `.`. | | ||
| `name` | A unique user-friendly name for your email dataset. | | ||
| `description` | Any additional information used to describe this email dataset. | | ||
| `collections` | Any collections and associated fields belonging to the third party service, similar to a configured fidesops [Dataset](datasets.md). If you do not know the exact data structure of a third party's database, you can configure a single collection with the fields you would like masked. **Note:** A primary key must be specified on each collection. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
SUBJECT_IDENTITY_VERIFICATION_TEMPLATE = "subject_identity_verification.html" | ||
EMAIL_ERASURE_REQUEST_FULFILLMENT = "erasure_request_email_fulfillment.html" |
Oops, something went wrong.