diff --git a/CHANGELOG.md b/CHANGELOG.md index 9062a6dd0f..e01de2565f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The types of changes are: - Backend System-level Cookie Support [#4383](https://github.com/ethyca/fides/pull/4383) - High Level Tracking of Compass System Sync [#4397](https://github.com/ethyca/fides/pull/4397) - Erasure support for Qualtrics [#4371](https://github.com/ethyca/fides/pull/4371) +- Erasure support for Ada Chatbot [#4382](https://github.com/ethyca/fides/pull/4382) ### Changed - Add filtering and pagination to bulk vendor add table [#4351](https://github.com/ethyca/fides/pull/4351) diff --git a/data/saas/config/ada_chatbot_config.yml b/data/saas/config/ada_chatbot_config.yml new file mode 100644 index 0000000000..4a07acbda9 --- /dev/null +++ b/data/saas/config/ada_chatbot_config.yml @@ -0,0 +1,51 @@ +saas_config: + fides_key: + name: Ada Chatbot + type: ada_chatbot + description: A sample schema representing the Ada Chatbot connector for Fides + user_guide: https://docs.ethyca.com/user-guides/integrations/saas-integrations/ada_chatbot + version: 0.1.0 + + connector_params: + - name: domain + description: The domain required for your Ada Chatbot setup. For instance, if the settings indicate a URL such as https://demo-sandbox-ethyca.ada.support/, your domain would be demo-sandbox-ethyca.ada.support. + label: Domain + - name: compliance_access_token + sensitive: True + description: The Data Compliance API access token. This value can be seen by going to the Settings -> Integrations within the Admin GUI (https://developers.ada.cx/reference/authentication) + label: API access token + + client_config: + protocol: https + host: + authentication: + strategy: bearer + configuration: + token: + + # In this case, since there is currently no quick easy way to gather up user info. Ada also uses two different API keys so while we could pick + # a different endpoint to test that is a READ, those only use the data export api key. For the erasure though it requires the data compliance api + # key. + test_request: + method: POST + path: /api/v1/data-subject-request + body: | + { + "type": "ERASURE", + "email": "checkmycreds@ethyca.com" + } + + endpoints: + - name: chatter + requests: + delete: + method: POST + path: /api/v1/data-subject-request + body: | + { + "type": "ERASURE", + "email": "" + } + param_values: + - name: email + identity: email diff --git a/data/saas/dataset/ada_chatbot_dataset.yml b/data/saas/dataset/ada_chatbot_dataset.yml new file mode 100644 index 0000000000..4e97734715 --- /dev/null +++ b/data/saas/dataset/ada_chatbot_dataset.yml @@ -0,0 +1,7 @@ +dataset: + - fides_key: + name: Ada Chatbot Dataset + description: A sample dataset representing the Ada Chatbot connector for Fides + collections: + - name: chatter + fields: [] diff --git a/data/saas/icon/ada_chatbot.svg b/data/saas/icon/ada_chatbot.svg new file mode 100644 index 0000000000..f1ab936cbd --- /dev/null +++ b/data/saas/icon/ada_chatbot.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/tests/fixtures/saas/ada_chatbot_fixtures.py b/tests/fixtures/saas/ada_chatbot_fixtures.py new file mode 100644 index 0000000000..1b88152536 --- /dev/null +++ b/tests/fixtures/saas/ada_chatbot_fixtures.py @@ -0,0 +1,41 @@ +from typing import Any, Dict, Generator + +import pydash +import pytest + +from tests.ops.integration_tests.saas.connector_runner import ( + ConnectorRunner, + generate_random_email, +) +from tests.ops.test_helpers.vault_client import get_secrets + +secrets = get_secrets("ada_chatbot") + + +@pytest.fixture(scope="session") +def ada_chatbot_secrets(saas_config) -> Dict[str, Any]: + return { + "domain": pydash.get(saas_config, "ada_chatbot.domain") or secrets["domain"], + "compliance_access_token": pydash.get( + saas_config, "ada_chatbot.compliance_access_token" + ) + or secrets["compliance_access_token"], + } + + +@pytest.fixture(scope="session") +def ada_chatbot_identity_email(saas_config) -> str: + return ( + pydash.get(saas_config, "ada_chatbot.identity_email") + or secrets["identity_email"] + ) + + +@pytest.fixture +def ada_chatbot_erasure_identity_email() -> str: + return generate_random_email() + + +@pytest.fixture +def ada_chatbot_runner(db, cache, ada_chatbot_secrets) -> ConnectorRunner: + return ConnectorRunner(db, cache, "ada_chatbot", ada_chatbot_secrets) diff --git a/tests/ops/integration_tests/saas/test_ada_chatbot_task.py b/tests/ops/integration_tests/saas/test_ada_chatbot_task.py new file mode 100644 index 0000000000..89ec8b7006 --- /dev/null +++ b/tests/ops/integration_tests/saas/test_ada_chatbot_task.py @@ -0,0 +1,27 @@ +import pytest + +from fides.api.models.policy import Policy +from tests.ops.integration_tests.saas.connector_runner import ConnectorRunner + + +@pytest.mark.integration_saas +class TestAda_chatbotConnector: + def test_connection(self, ada_chatbot_runner: ConnectorRunner): + ada_chatbot_runner.test_connection() + + async def test_non_strict_erasure_request( + self, + ada_chatbot_runner: ConnectorRunner, + policy: Policy, + erasure_policy_string_rewrite: Policy, + ada_chatbot_erasure_identity_email: str, + ): + ( + access_results, + erasure_results, + ) = await ada_chatbot_runner.non_strict_erasure_request( + access_policy=policy, + erasure_policy=erasure_policy_string_rewrite, + identities={"email": ada_chatbot_erasure_identity_email}, + ) + assert erasure_results == {"ada_chatbot_instance:chatter": 1}