Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Human Readable Names for Connection Types [#1096] #1297

Merged
merged 8 commits into from
Sep 13, 2022

Conversation

pattisdr
Copy link
Contributor

@pattisdr pattisdr commented Sep 12, 2022

Purpose

Update our ConnectionType endpoint to surface an additional human readable name of the connector (database/saas/manual)

Changes

My goal was to keep these mappings out of the database.

  • For database/manual ConnectionTypes, add a property with a mapping on the ConnectionType enum. Add a unit test so that if we have a new Connection but no entry in the human readable mapping, unit tests will fail.
  • For SaasConnection types, add a required human_readable attribute to the registry.

Updated endpoint

GET /connection_type

{
    "items": [
        {
            "identifier": "bigquery",
            "type": "database",
            "human_readable": "BigQuery"
        },
        {
            "identifier": "mariadb",
            "type": "database",
            "human_readable": "MariaDB"
        },
        {
            "identifier": "mongodb",
            "type": "database",
            "human_readable": "MongoDB"
        },
        {
            "identifier": "mssql",
            "type": "database",
            "human_readable": "Microsoft SQL Server"
        },
        {
            "identifier": "mysql",
            "type": "database",
            "human_readable": "MySQL"
        },
        {
            "identifier": "postgres",
            "type": "database",
            "human_readable": "PostgreSQL"
        },
        {
            "identifier": "redshift",
            "type": "database",
            "human_readable": "Amazon Redshift"
        },
        {
            "identifier": "snowflake",
            "type": "database",
            "human_readable": "Snowflake"
        },
        {
            "identifier": "adobe_campaign",
            "type": "saas",
            "human_readable": "Adobe Campaign"
        },
        {
            "identifier": "auth0",
            "type": "saas",
            "human_readable": "Auth0"
        },
        {
            "identifier": "datadog",
            "type": "saas",
            "human_readable": "Datadog"
        },
        {
            "identifier": "hubspot",
            "type": "saas",
            "human_readable": "HubSpot"
        },
        {
            "identifier": "mailchimp",
            "type": "saas",
            "human_readable": "Mailchimp"
        },
        {
            "identifier": "outreach",
            "type": "saas",
            "human_readable": "Outreach"
        },
        {
            "identifier": "salesforce",
            "type": "saas",
            "human_readable": "Salesforce"
        },
        {
            "identifier": "segment",
            "type": "saas",
            "human_readable": "Segment"
        },
        {
            "identifier": "sendgrid",
            "type": "saas",
            "human_readable": "SendGrid"
        },
        {
            "identifier": "sentry",
            "type": "saas",
            "human_readable": "Sentry"
        },
        {
            "identifier": "shopify",
            "type": "saas",
            "human_readable": "Shopify"
        },
        {
            "identifier": "stripe",
            "type": "saas",
            "human_readable": "Stripe"
        },
        {
            "identifier": "zendesk",
            "type": "saas",
            "human_readable": "Zendesk"
        },
        {
            "identifier": "manual_webhook",
            "type": "manual",
            "human_readable": "Manual Webhook"
        }
    ],
    "total": 23,
    "page": 1,
    "size": 50
}

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #1096

@pattisdr pattisdr marked this pull request as ready for review September 12, 2022 19:25
pattisdr and others added 2 commits September 13, 2022 09:04
Co-authored-by: Paul Sanders <paul@ethyca.com>
…eadable_connector_type

# Conflicts:
#	CHANGELOG.md
@sanders41 sanders41 merged commit 67e9a2e into main Sep 13, 2022
@sanders41 sanders41 deleted the fidesops_1096_human_readable_connector_type branch September 13, 2022 14:28
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Expose a human readable name in the connection type endpoints.

Add a human_readable_name to the saas connector registry and a separate human readable mapping for ConnectionTypes.

* Update changelog and connection type endpoint docs.

* mypy

* Update ConnectorTemplate test.

* Mypy

* Update tests/ops/models/test_connectionconfig.py

Co-authored-by: Paul Sanders <paul@ethyca.com>

Co-authored-by: Paul Sanders <paul@ethyca.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ConnectionSystemTypeMap Endpoint to return Human-Readable Version
2 participants