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

Add a Connection - SaaS connector's configuration parameters #761

Closed
adriaaaa opened this issue Jun 30, 2022 · 7 comments · Fixed by #1099
Closed

Add a Connection - SaaS connector's configuration parameters #761

adriaaaa opened this issue Jun 30, 2022 · 7 comments · Fixed by #1099
Assignees
Labels
enhancement New feature or request

Comments

@adriaaaa
Copy link

adriaaaa commented Jun 30, 2022

Use Cases

As the owner of a system that contains PII, I need the ability to configure connection details of my application so that Fides can query that system to fulfill a privacy request.

Assumptions

Acceptance Criteria

  1. Demonstrate that once a user selects a connector from the list, that can configure the connector's parameters, which include:
  • Name (required; must be unique)
  • Description (optional)
  • that specific connectors configuration parameters
    ** this is different for every connector (we have an API that returns the parameters for a connector)
    ** the API returns which field is optional or required.
  1. Show that once a user has inputted all the required fields that they can save
  • The "Test Connection" button should be disabled until the params are saved
  1. Confirm that the following are also represented on these pages:
  • logo of the connector
  • whether the connector is active or disabled.
  1. Show that this pages descriptions says "Connect to your Stripe environment by providing credential information below. Once you have saved your connector credentials, you can review what data is included when processing a privacy request in your Dataset configuration."

Mockups

Figma

Image

Image

Q&A

  1. for test requests is it handled on the backend if we can handle the connection. Ans: we support this on the backend
  2. verify rate limiting exists. Ans: a problem to solve later.
  3. generate unique id based on name. Ans: ticket SaaS Connector Templates #814 will verify that the name is unique so we will handle on the save.
@adriaaaa adriaaaa changed the title Add a Connector - ability to save configuration credetials (FE) Add a Connector - ability to configure Datastore credentials (FE) Jun 30, 2022
@adriaaaa adriaaaa changed the title Add a Connector - ability to configure Datastore credentials (FE) Add a Connector - configure a connector's configuration parameters Jul 15, 2022
@adriaaaa adriaaaa added the enhancement New feature or request label Jul 15, 2022
@chriscalhoun1974
Copy link
Contributor

@adriaaaa When a given user enters a Name value should the data validation be done immediately after the Name text box loses focus? Or upon the user clicking the Save button? There will need to be an additional API endpoint to validate the unique Name value.

@pattisdr
Copy link
Contributor

pattisdr commented Jul 20, 2022

Existing API endpoints

  • PATCH api/v1/connection: Creates the overall connectionconfig and corresponds to the first few fields on the page.
[
    {"name": "My Stripe Connector",
    "key": "my_stripe_connector",
    "connection_type": "saas",
    "access": "write",
    "description": "This is a connection to stripe",
    "disabled": false
}]
  • GET api/v1/connection_type/{connection_type}/secret. Returns the type of secrets you need to supply to connect to a particular connector. You can use this to dynamically add the inputs below name/description

For example: GET /api/v1/connection_type/sentry/secret

{
    "title": "sentry_connector_schema",
    "description": "Sentry secrets schema",
    "type": "object",
    "properties": {
        "access_token": {
            "title": "Access Token",
            "type": "string"
        },
        "domain": {
            "title": "Domain",
            "default": "sentry.io",
            "type": "string"
        }
    },
    "required": [
        "access_token"
    ],
    "additionalProperties": false
}
  • PUT /api/v1/connection/connection_key/secret. Use this endpoint to save the secrets to the connection config. For example, sentry might be:
    PUT api/v1/connection/my_sentry_connector/secret
{
    "domain": "{{sentry_host}}",
    "access_token": "{{sentry_access_token}}"
}
  • PUT api/v1//connection/{connection_key}/test. Use this endpoint to see if you can use the supplied secret credentials to make a test connection. In the case of saas configs, you're often making an API request to a trivial endpoint with the supplied authentication.

@eastandwestwind
Copy link
Contributor

Just a note to say I've reviewed these endpoints @pattisdr and it looks good!

Since we're going to be adding a fides_key (Naming TDB. We initially said connection identifier but something like dataset identifier would prob be most descriptive here) field for the datasets/saas_configs on this screen, we'll be adding additional endpoint requirements.

We anticipate going ahead and making endpoint call(s) to save the default configs/datasets upon clicking this screen's "save" button.

The specific endpoint(s) needed to do this depends on approach for #814

@pattisdr
Copy link
Contributor

thank you @eastandwestwind I like your suggestion of dataset identifier

@adriaaaa adriaaaa changed the title Add a Connector - configure a connector's configuration parameters Add a Connector - configure a SaaS connector's configuration parameters Jul 21, 2022
@adriaaaa adriaaaa changed the title Add a Connector - configure a SaaS connector's configuration parameters Add a Connector - SaaS connector's configuration parameters Jul 21, 2022
@adriaaaa adriaaaa changed the title Add a Connector - SaaS connector's configuration parameters Add a Connection - SaaS connector's configuration parameters Jul 21, 2022
@pattisdr
Copy link
Contributor

pattisdr commented Jul 28, 2022

Backend Note: After discussing #814, instead of having this page make multiple individual requests to the existing API endpoints to 1) create the endpoint, 2) add the secrets, 3) add saas config and 4) and later add the datasets, the "Save" button will create all of this in one request #814 from a template and the form inputs here.

@adriaaaa
Copy link
Author

Ticket Breakdown:
There will be an add connection component, based on "step" it will serve as the driver to determine which component to deliver.

  1. Test result display (3)
  2. Left hand configuration - when user clicks on the right hand side, it will change the component + status of connector (3)
  3. Everything else (name, description, secrets): this is the dynamic form (5)
  4. Tech debt ticket to throw in the backlog to handle when things break (@seanpreston to help create this one)

@seanpreston
Copy link
Contributor

This is currently blocked by #814

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants