Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds config for notification service type, genericize concept of email to messaging #1519

Merged
merged 28 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f5bd39e
Adds config for notification service type, starts work to genericize …
eastandwestwind Oct 21, 2022
b9dd6d9
make messaging details nullable
eastandwestwind Oct 27, 2022
c2367f6
Adds twilio client, config, and refactor get_messaging_method
eastandwestwind Oct 28, 2022
3e3a9d5
linter fixes
eastandwestwind Oct 31, 2022
2b11a81
update twilio postman
eastandwestwind Oct 31, 2022
bb74f61
regenerate migration
eastandwestwind Oct 31, 2022
6adcf54
adds sqlalchemy import
eastandwestwind Oct 31, 2022
c4dfd2c
rename emailconfig to messagingconfig in db_dataset.yml
eastandwestwind Oct 31, 2022
7ebbbbd
more renaming, adding validator for twilio sms secrets, add mypy igno…
eastandwestwind Nov 1, 2022
a510b90
removing original email config table migration
eastandwestwind Nov 1, 2022
201e2c6
rename dispatch_email to dispatch_message
eastandwestwind Nov 2, 2022
aebb901
fixes some test data
eastandwestwind Nov 2, 2022
96cf23a
format
eastandwestwind Nov 2, 2022
441166e
fixes type error, adds tests for messaging config endpoints
eastandwestwind Nov 2, 2022
3c18ca8
fix unit/integration tests
eastandwestwind Nov 2, 2022
5fa23bd
format
eastandwestwind Nov 3, 2022
51d57e2
formatting to phone number
eastandwestwind Nov 3, 2022
e2ae08a
fixing tests
eastandwestwind Nov 3, 2022
9f86914
more unit test fixes, fix bug in twilio sms validation
eastandwestwind Nov 3, 2022
091cf3f
more tests fixes
eastandwestwind Nov 3, 2022
9cba9f1
fix err message
eastandwestwind Nov 3, 2022
a61c055
changes from CR
eastandwestwind Nov 4, 2022
d4dfa70
fix test, update changelog
eastandwestwind Nov 4, 2022
b81957d
adding validator for mailgun config details, catching that valueerror…
eastandwestwind Nov 4, 2022
aca5b77
format
eastandwestwind Nov 4, 2022
ca9be4c
update validator for mailgun details and tests
eastandwestwind Nov 7, 2022
a7fa6a2
remove unneeded assert
eastandwestwind Nov 7, 2022
4667a63
rerunning ci
eastandwestwind Nov 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .fides/db_dataset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -871,8 +871,8 @@ dataset:
data_categories:
- system.operations
data_qualifier: aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified
- name: emailconfig
description: 'Fides Generated Description for Table: emailconfig'
- name: messagingconfig
description: 'Fides Generated Description for Table: messagingconfig'
data_categories: []
data_qualifier: aggregated.anonymized.unlinked_pseudonymized.pseudonymized.identified
fields:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The types of changes are:
* Config Wizard: Added a column selector to the scan results page of the config wizard [#1590](https://github.com/ethyca/fides/pull/1590)
* Config Wizard: Flow for runtime scanner option [#1640](https://github.com/ethyca/fides/pull/1640)
* Access support for Twilio Conversations API [#1520](https://github.com/ethyca/fides/pull/1520)
* Message Config: Adds Twilio Email/SMS support [#1519](https://github.com/ethyca/fides/pull/1519)

### Changed

Expand Down
205 changes: 173 additions & 32 deletions docs/fides/docs/development/postman/Fides.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"info": {
"_postman_id": "002813f4-12b7-4467-9377-a57706b6dbc8",
"_postman_id": "652de86a-b40e-4711-b488-4b26252683ab",
"name": "Fidesops",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "13396647"
},
"item": [
{
Expand Down Expand Up @@ -72,7 +73,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "[\n \"client:create\",\n \"client:update\",\n \"client:read\",\n \"client:delete\",\n \"config:read\",\n \"connection_type:read\",\n \"connection:read\",\n \"connection:create_or_update\",\n \"connection:delete\",\n \"connection:instantiate\",\n \"consent:read\",\n \"dataset:create_or_update\",\n \"dataset:delete\",\n \"dataset:read\",\n \"encryption:exec\",\n \"email:create_or_update\",\n \"email:read\",\n \"email:delete\",\n \"policy:create_or_update\",\n \"policy:read\",\n \"policy:delete\",\n \"privacy-request:read\",\n \"privacy-request:delete\",\n \"rule:create_or_update\",\n \"rule:read\",\n \"rule:delete\",\n \"scope:read\",\n \"storage:create_or_update\",\n \"storage:delete\",\n \"storage:read\",\n \"privacy-request:resume\",\n \"webhook:create_or_update\",\n \"webhook:read\",\n \"webhook:delete\",\n \"saas_config:create_or_update\",\n \"saas_config:read\",\n \"saas_config:delete\",\n \"privacy-request:review\",\n \"user:create\",\n \"user:delete\"\n]",
"raw": "[\n \"client:create\",\n \"client:update\",\n \"client:read\",\n \"client:delete\",\n \"config:read\",\n \"connection_type:read\",\n \"connection:read\",\n \"connection:create_or_update\",\n \"connection:delete\",\n \"connection:instantiate\",\n \"consent:read\",\n \"dataset:create_or_update\",\n \"dataset:delete\",\n \"dataset:read\",\n \"encryption:exec\",\n \"messaging:create_or_update\",\n \"messaging:read\",\n \"messaging:delete\",\n \"policy:create_or_update\",\n \"policy:read\",\n \"policy:delete\",\n \"privacy-request:read\",\n \"privacy-request:delete\",\n \"rule:create_or_update\",\n \"rule:read\",\n \"rule:delete\",\n \"scope:read\",\n \"storage:create_or_update\",\n \"storage:delete\",\n \"storage:read\",\n \"privacy-request:resume\",\n \"webhook:create_or_update\",\n \"webhook:read\",\n \"webhook:delete\",\n \"saas_config:create_or_update\",\n \"saas_config:read\",\n \"saas_config:delete\",\n \"privacy-request:review\",\n \"user:create\",\n \"user:delete\"\n]",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -4104,10 +4105,10 @@
]
},
{
"name": "Primary Email Config",
"name": "Messaging Config - Email",
"item": [
{
"name": "Post Email Config",
"name": "Post Messaging Config",
"request": {
"auth": {
"type": "bearer",
Expand All @@ -4123,20 +4124,20 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"key\": \"{{email_config_key}}\",\n \"name\": \"mailgun\",\n \"service_type\": \"mailgun\",\n \"details\": {\n \"domain\": \"{{mailgun_domain}}\"\n }\n}\n\n",
"raw": "{\n \"key\": \"{{mailgun_config_key}}\",\n \"name\": \"mailgun\",\n \"service_type\": \"mailgun\",\n \"details\": {\n \"domain\": \"{{mailgun_domain}}\"\n }\n}\n\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/email/config/",
"raw": "{{host}}/messaging/config/",
"host": [
"{{host}}"
],
"path": [
"email",
"messaging",
"config",
""
]
Expand All @@ -4145,7 +4146,7 @@
"response": []
},
{
"name": "Patch Email Config By Key",
"name": "Patch Messaging Config By Key",
"request": {
"auth": {
"type": "bearer",
Expand All @@ -4161,29 +4162,29 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"key\": \"{{email_config_key}}\",\n \"name\": \"mailgun\",\n \"service_type\": \"mailgun\",\n \"details\": {\n \"domain\": \"{{mailgun_domain}}\"\n }\n}\n\n",
"raw": "{\n \"key\": \"{{mailgun_config_key}}\",\n \"name\": \"mailgun\",\n \"service_type\": \"mailgun\",\n \"details\": {\n \"domain\": \"{{mailgun_domain}}\"\n }\n}\n\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/email/config/{{email_config_key}}",
"raw": "{{host}}/messaging/config/{{mailgun_config_key}}",
"host": [
"{{host}}"
],
"path": [
"email",
"messaging",
"config",
"{{email_config_key}}"
"{{mailgun_config_key}}"
]
}
},
"response": []
},
{
"name": "Get Email Configs",
"name": "Get Messaging Configs",
"request": {
"auth": {
"type": "bearer",
Expand All @@ -4198,12 +4199,12 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{host}}/email/config/",
"raw": "{{host}}/messaging/config/",
"host": [
"{{host}}"
],
"path": [
"email",
"messaging",
"config",
""
]
Expand All @@ -4212,7 +4213,7 @@
"response": []
},
{
"name": "Get Email Config By Key",
"name": "Get Messaging Config By Key",
"request": {
"auth": {
"type": "bearer",
Expand All @@ -4227,21 +4228,21 @@
"method": "GET",
"header": [],
"url": {
"raw": "{{host}}/email/config/{{email_config_key}}",
"raw": "{{host}}/messaging/config/{{mailgun_config_key}}",
"host": [
"{{host}}"
],
"path": [
"email",
"messaging",
"config",
"{{email_config_key}}"
"{{mailgun_config_key}}"
]
}
},
"response": []
},
{
"name": "Delete Email Config By Key",
"name": "Delete Messaging Config By Key",
"request": {
"auth": {
"type": "bearer",
Expand All @@ -4257,29 +4258,29 @@
"header": [],
"body": {
"mode": "raw",
"raw": "[\n {\n \"key\": \"{{email_config_key}}\",\n \"name\": \"mailgun\",\n \"service_type\": \"mailgun\",\n \"details\": {\n \"domain\": \"{{mailgun_domain}}\"\n }\n }\n]\n",
"raw": "[\n {\n \"key\": \"{{mailgun_config_key}}\",\n \"name\": \"mailgun\",\n \"service_type\": \"mailgun\",\n \"details\": {\n \"domain\": \"{{mailgun_domain}}\"\n }\n }\n]\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/email/config/{{email_config_key}}",
"raw": "{{host}}/messaging/config/{{mailgun_config_key}}",
"host": [
"{{host}}"
],
"path": [
"email",
"messaging",
"config",
"{{email_config_key}}"
"{{mailgun_config_key}}"
]
}
},
"response": []
},
{
"name": "Email Config Secrets",
"name": "Messaging Config Secrets",
"request": {
"auth": {
"type": "bearer",
Expand All @@ -4303,14 +4304,134 @@
}
},
"url": {
"raw": "{{host}}/email/config/{{email_config_key}}/secret",
"raw": "{{host}}/messaging/config/{{mailgun_config_key}}/secret",
"host": [
"{{host}}"
],
"path": [
"email",
"messaging",
"config",
"{{email_config_key}}",
"{{mailgun_config_key}}",
"secret"
]
}
},
"response": []
}
]
},
{
"name": "Messaging Config - SMS",
"item": [
{
"name": "Post Messaging Config",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{client_token}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"key\": \"{{twilio_config_key}}\",\n \"name\": \"twilio\",\n \"service_type\": \"twilio_text\"\n}\n\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/messaging/config/",
"host": [
"{{host}}"
],
"path": [
"messaging",
"config",
""
]
}
},
"response": []
},
{
"name": "Patch Messaging Config By Key",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{client_token}}",
"type": "string"
}
]
},
"method": "PATCH",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"key\": \"{{twilio_config_key}}\",\n \"name\": \"twilio\",\n \"service_type\": \"twilio_text\"\n}\n\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/messaging/config/{{twilio_config_key}}",
"host": [
"{{host}}"
],
"path": [
"messaging",
"config",
"{{twilio_config_key}}"
]
}
},
"response": []
},
{
"name": "Messaging Config Secrets",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{client_token}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"twilio_account_sid\": \"{{twilio_account_sid}}\",\n \"twilio_auth_token\": \"{{twilio_auth_token}}\",\n \"twilio_messaging_service_sid\": \"{{twilio_messaging_service_id}}\"\n}\n\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/messaging/config/{{twilio_config_key}}/secret",
"host": [
"{{host}}"
],
"path": [
"messaging",
"config",
"{{twilio_config_key}}",
"secret"
]
}
Expand Down Expand Up @@ -4732,8 +4853,8 @@
"value": "manual_key"
},
{
"key": "email_config_key",
"value": "my_email_config",
"key": "mailgun_config_key",
"value": "my_mailgun_config",
"type": "string"
},
{
Expand Down Expand Up @@ -4785,6 +4906,26 @@
"key": "verification_code",
"value": "",
"type": "string"
},
{
"key": "twilio_config_key",
"value": "my_twilio_config",
"type": "string"
},
{
"key": "twilio_account_sid",
"value": "",
"type": "string"
},
{
"key": "twilio_auth_token",
"value": "",
"type": "string"
},
{
"key": "twilio_messaging_service_id",
"value": "",
"type": "string"
}
]
}
}
Loading