-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial cut of saas request overrides. include mailchimp as an example and test case. minor refactor of some of the saas request execution to enable smoother override * fix rebase issue by moving saas override tests into ops subdir * import path updates to resolve conflicts caused by rebase * add session parameter into graph task calls to fix saas override integration tests caused by rebase * update changelog * tweaks to saas connector overrides and associated tests * expose override factory register as module variable for clenaer decorator calls Co-authored-by: Adam Sachs <adam@Adams-MacBook-Pro.local>
- Loading branch information
Showing
20 changed files
with
1,458 additions
and
17 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
81 changes: 81 additions & 0 deletions
81
data/saas/config/request_override/mailchimp_override_config.yml
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
saas_config: | ||
fides_key: mailchimp_override_connector_example | ||
name: Mailchimp SaaS Override Config | ||
type: mailchimp | ||
description: A sample schema representing the Mailchimp connector for Fidesops that includes request function overrides | ||
version: 0.0.1 | ||
|
||
connector_params: | ||
- name: domain | ||
- name: username | ||
- name: api_key | ||
|
||
client_config: | ||
protocol: https | ||
host: <domain> | ||
authentication: | ||
strategy: basic | ||
configuration: | ||
username: <username> | ||
password: <api_key> | ||
|
||
test_request: | ||
method: GET | ||
path: /3.0/lists | ||
|
||
endpoints: | ||
- name: messages | ||
requests: | ||
read: | ||
request_override: mailchimp_messages_access | ||
param_values: | ||
- name: conversation_id | ||
references: | ||
- dataset: mailchimp_override_connector_example | ||
field: conversations.id | ||
direction: from | ||
- name: conversations | ||
requests: | ||
read: | ||
method: GET | ||
path: /3.0/conversations | ||
query_params: | ||
- name: count | ||
value: 1000 | ||
- name: offset | ||
value: 0 | ||
param_values: | ||
- name: placeholder | ||
identity: email | ||
data_path: conversations | ||
pagination: | ||
strategy: offset | ||
configuration: | ||
incremental_param: offset | ||
increment_by: 1000 | ||
limit: 10000 | ||
- name: member | ||
requests: | ||
read: | ||
method: GET | ||
path: /3.0/search-members | ||
query_params: | ||
- name: query | ||
value: <email> | ||
param_values: | ||
- name: email | ||
identity: email | ||
data_path: exact_matches.members | ||
update: | ||
request_override: mailchimp_member_update | ||
param_values: | ||
- name: list_id | ||
references: | ||
- dataset: mailchimp_override_connector_example | ||
field: member.list_id | ||
direction: from | ||
- name: subscriber_hash | ||
references: | ||
- dataset: mailchimp_override_connector_example | ||
field: member.id | ||
direction: from |
145 changes: 145 additions & 0 deletions
145
data/saas/dataset/request_override/mailchimp_override_dataset.yml
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 |
---|---|---|
@@ -0,0 +1,145 @@ | ||
dataset: | ||
- fides_key: mailchimp_override_connector_example | ||
name: Mailchimp Override Dataset | ||
description: A sample dataset representing the Mailchimp connector for Fidesops | ||
collections: | ||
- name: messages | ||
fields: | ||
- name: id | ||
data_categories: [system.operations] | ||
- name: conversation_id | ||
data_categories: [system.operations] | ||
- name: from_label | ||
data_categories: [system.operations] | ||
- name: from_email | ||
data_categories: [user.provided.identifiable.contact.email] | ||
fidesops_meta: | ||
data_type: string | ||
- name: subject | ||
data_categories: [system.operations] | ||
- name: message | ||
data_categories: [user.provided.nonidentifiable] | ||
- name: read | ||
data_categories: [system.operations] | ||
- name: timestamp | ||
data_categories: [system.operations] | ||
- name: conversations | ||
fields: | ||
- name: id | ||
data_categories: [system.operations] | ||
- name: campaign_id | ||
data_categories: [system.operations] | ||
- name: list_id | ||
data_categories: [system.operations] | ||
- name: from_email | ||
data_categories: [user.provided.identifiable.contact.email] | ||
- name: from_label | ||
data_categories: [user.provided.identifiable.contact.email] | ||
- name: subject | ||
data_categories: [user.provided.nonidentifiable] | ||
- name: member | ||
fields: | ||
- name: id | ||
data_categories: [user.derived.identifiable.unique_id] | ||
fidesops_meta: | ||
primary_key: True | ||
- name: list_id | ||
data_categories: [system.operations] | ||
- name: email_address | ||
data_categories: [user.provided.identifiable.contact.email] | ||
fidesops_meta: | ||
data_type: string | ||
- name: unique_email_id | ||
data_categories: [user.derived.identifiable.unique_id] | ||
fidesops_meta: | ||
data_type: string | ||
- name: web_id | ||
data_categories: [user.derived.identifiable.unique_id] | ||
fidesops_meta: | ||
data_type: string | ||
- name: email_type | ||
data_categories: [system.operations] | ||
- name: status | ||
data_categories: [system.operations] | ||
- name: merge_fields | ||
fields: | ||
- name: FNAME | ||
data_categories: [user.provided.identifiable.name] | ||
fidesops_meta: | ||
data_type: string | ||
- name: LNAME | ||
data_categories: [user.provided.identifiable.name] | ||
fidesops_meta: | ||
data_type: string | ||
- name: ADDRESS | ||
fields: | ||
- name: addr1 | ||
data_categories: [user.provided.identifiable.contact.street] | ||
fidesops_meta: | ||
data_type: string | ||
- name: addr2 | ||
data_categories: [user.provided.identifiable.contact.street] | ||
fidesops_meta: | ||
data_type: string | ||
- name: city | ||
data_categories: [user.provided.identifiable.contact.city] | ||
fidesops_meta: | ||
data_type: string | ||
- name: state | ||
data_categories: [user.provided.identifiable.contact.state] | ||
fidesops_meta: | ||
data_type: string | ||
- name: zip | ||
data_categories: [user.provided.identifiable.contact.postal_code] | ||
fidesops_meta: | ||
data_type: string | ||
- name: country | ||
data_categories: [user.provided.identifiable.contact.country] | ||
fidesops_meta: | ||
data_type: string | ||
- name: PHONE | ||
data_categories: [user.provided.identifiable.contact.phone_number] | ||
fidesops_meta: | ||
data_type: string | ||
- name: BIRTHDAY | ||
data_categories: [user.provided.identifiable.date_of_birth] | ||
fidesops_meta: | ||
data_type: string | ||
- name: ip_signup | ||
data_categories: [user.derived.identifiable.device.ip_address] | ||
fidesops_meta: | ||
data_type: string | ||
- name: timestamp_signup | ||
data_categories: [system.operations] | ||
- name: ip_opt | ||
data_categories: [system.operations] | ||
- name: timestamp_opt | ||
data_categories: [system.operations] | ||
- name: language | ||
data_categories: [system.operations] | ||
- name: email_client | ||
data_categories: [system.operations] | ||
- name: location | ||
fields: | ||
- name: latitude | ||
data_categories: [system.operations] | ||
- name: longitude | ||
data_categories: [system.operations] | ||
- name: gmtoff | ||
data_categories: [system.operations] | ||
- name: dstoff | ||
data_categories: [system.operations] | ||
- name: country_code | ||
data_categories: [user.provided.identifiable.contact.country] | ||
fidesops_meta: | ||
data_type: string | ||
- name: timezone | ||
data_categories: [system.operations] | ||
- name: source | ||
data_categories: [system.operations] | ||
- name: tags | ||
fields: | ||
- name: id | ||
data_categories: [system.operations] | ||
- name: name | ||
data_categories: [system.operations] |
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
Oops, something went wrong.