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

Con 102mg ada chatbot #4382

Merged
merged 30 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3e9424e
Ada_chatbot start
MarcGEthyca Oct 31, 2023
437cc23
Adding
MarcGEthyca Oct 31, 2023
9ae9be8
Adding env var we need for the erasure
MarcGEthyca Nov 1, 2023
2b20e44
Better config added
MarcGEthyca Nov 3, 2023
fdd2432
Ada - test connection working
MarcGEthyca Nov 3, 2023
8c45a3f
Testing
MarcGEthyca Nov 3, 2023
5f176a4
More testing
MarcGEthyca Nov 3, 2023
5f20391
Merge branch 'main' into CON-102mgAdaChatbot
MarcGEthyca Nov 3, 2023
b06b815
This change to Delete from Update in the config
MarcGEthyca Nov 3, 2023
08d74c0
More testing 3 of 4 passing. Failing on Strict
MarcGEthyca Nov 3, 2023
a9f4aa7
3 passing 1 failing (non strict failing)
MarcGEthyca Nov 6, 2023
0f0ce55
Polish
MarcGEthyca Nov 6, 2023
d363bfb
Cleanup 1
MarcGEthyca Nov 6, 2023
ae189ea
Cleaned up labels and definitions
MarcGEthyca Nov 6, 2023
196c91b
More cleanup
MarcGEthyca Nov 6, 2023
88f23aa
Polish
MarcGEthyca Nov 7, 2023
77de6c5
Removed changes made previously
MarcGEthyca Nov 7, 2023
d2d3c3c
Undoing this change
MarcGEthyca Nov 7, 2023
25d91c8
Added changes to changelog
MarcGEthyca Nov 7, 2023
4f1ca3c
Fixed the wording
MarcGEthyca Nov 7, 2023
f58f6bb
Merge branch 'main' into CON-102mgAdaChatbot
MarcGEthyca Nov 7, 2023
e4284d8
Merge branch 'main' into CON-102mgAdaChatbot
MarcGEthyca Nov 7, 2023
a661c68
Merge branch 'main' into CON-102mgAdaChatbot
galvana Nov 8, 2023
c7e9382
Misc cleanup
galvana Nov 8, 2023
e60560a
Reverting fides.toml changes
galvana Nov 8, 2023
aba7242
Cleaned up labels
MarcGEthyca Nov 8, 2023
163670e
Clean up
MarcGEthyca Nov 8, 2023
04d5f6e
Cleanup
MarcGEthyca Nov 8, 2023
fedc2b9
Merge branch 'main' into CON-102mgAdaChatbot
galvana Nov 8, 2023
45a4f79
Fixing descriptions
galvana Nov 8, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
51 changes: 51 additions & 0 deletions data/saas/config/ada_chatbot_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
saas_config:
fides_key: <instance_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: <domain>
authentication:
strategy: bearer
configuration:
token: <compliance_access_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": "[email protected]"
}

endpoints:
- name: chatter
requests:
delete:
method: POST
path: /api/v1/data-subject-request
body: |
{
"type": "ERASURE",
"email": "<email>"
}
param_values:
- name: email
identity: email
7 changes: 7 additions & 0 deletions data/saas/dataset/ada_chatbot_dataset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dataset:
- fides_key: <instance_fides_key>
name: Ada Chatbot Dataset
description: A sample dataset representing the Ada Chatbot connector for Fides
collections:
- name: chatter
fields: []
16 changes: 16 additions & 0 deletions data/saas/icon/ada_chatbot.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions tests/fixtures/saas/ada_chatbot_fixtures.py
Original file line number Diff line number Diff line change
@@ -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)
27 changes: 27 additions & 0 deletions tests/ops/integration_tests/saas/test_ada_chatbot_task.py
Original file line number Diff line number Diff line change
@@ -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}
Loading