Skip to content

Commit

Permalink
Merge branch 'main' into 527-custom-field-library-tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelsey-Ethyca committed Mar 6, 2023
2 parents 50f2456 + e07f896 commit 7ef8ba3
Show file tree
Hide file tree
Showing 159 changed files with 4,058 additions and 1,242 deletions.
2 changes: 1 addition & 1 deletion .fides/systems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ system:
- fides_db

# System Info
- fides_key: privacy_request_fullfillment
- fides_key: privacy_request_fulfillment
name: Fides Privacy Request Fulfillment
organization_fides_key: default_organization
description: Privacy request fufillment.
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
test_selection:
- "check_fides_annotations"
- "fides_db_scan"
- "generate_docs"
- "docs_check"
- "minimal_config_startup"

Expand Down Expand Up @@ -194,7 +195,7 @@ jobs:
matrix:
python_version: ["3.8.14", "3.9.14", "3.10.7"]
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
# In PRs run with the "unsafe" label, or run on a "push" event to main
if: contains(github.event.pull_request.labels.*.name, 'run unsafe ci checks') || github.event_name == 'push'
steps:
Expand Down Expand Up @@ -231,7 +232,7 @@ jobs:
matrix:
python_version: ["3.8.14", "3.9.14", "3.10.7"]
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
# In PRs run with the "unsafe" label, or run on a "push" event to main
if: contains(github.event.pull_request.labels.*.name, 'run unsafe ci checks') || github.event_name == 'push'
steps:
Expand Down Expand Up @@ -262,7 +263,7 @@ jobs:
External-SaaS-Connectors:
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
# In PRs run with the "unsafe" label, or run on a "push" event to main
if: contains(github.event.pull_request.labels.*.name, 'run unsafe ci checks') || github.event_name == 'push'
permissions:
Expand All @@ -289,7 +290,7 @@ jobs:
uses: actions/checkout@v3

- name: Get Vault Token
uses: hashicorp/vault-action@v2.4.2
uses: hashicorp/vault-action@v2.5.0
with:
url: ${{ secrets.VAULT_ADDR }}
namespace: ${{ secrets.VAULT_NAMESPACE }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ tmp/*
# docs
docs/fides/site/
docs/fides/docs/api/openapi.json
docs/fidesops/docs/api/openapi.json
docs/fidesops/site
docs/fides/docs/config/fides.toml

# python specific
*.pyc
Expand Down
17 changes: 13 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The types of changes are:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [Unreleased](https://github.com/ethyca/fides/compare/2.7.0...main)
## [Unreleased](https://github.com/ethyca/fides/compare/2.7.1...main)

### Added

Expand All @@ -31,26 +31,30 @@ The types of changes are:
* Improve "Upload a new dataset YAML" [#1531](https://github.com/ethyca/fides/pull/2258)
* Access and erasure support for Yotpo [#2708](https://github.com/ethyca/fides/pull/2708)
* Custom Field Library Tab [#527](https://github.com/ethyca/fides/pull/2693)
* Allow SendGrid template usage [#2728](https://github.com/ethyca/fides/pull/2728)

### Changed

* Admin UI
* Add flow for selecting system types when manually creating a system [#2530](https://github.com/ethyca/fides/pull/2530)
* Updated forms for privacy declarations [#2648](https://github.com/ethyca/fides/pull/2648)
* Delete flow for privacy declarations [#2664](https://github.com/ethyca/fides/pull/2664)
* Add framework to have UI elements respect the user's scopes [#2682](https://github.com/ethyca/fides/pull/2682)
* "Manual Webhook" has been renamed to "Manual Process". [#2717](https://github.com/ethyca/fides/pull/2717)
* Convert all config values to Pydantic `Field` objects [#2613](https://github.com/ethyca/fides/pull/2613)
* Add warning to 'fides deploy' when installed outside of a virtual environment [#2641](https://github.com/ethyca/fides/pull/2641)
* Redesigned the default/init config file to be auto-documented. Also updates the `fides init` logic and analytics consent logic [#2694](https://github.com/ethyca/fides/pull/2694)
* Change how config creation/import is handled across the application [#2622](https://github.com/ethyca/fides/pull/2622)
* Update the CLI aesthetics & docstrings [#2703](https://github.com/ethyca/fides/pull/2703)
* Updates Roles->Scopes Mapping [#2744](https://github.com/ethyca/fides/pull/2744)
* Return user scopes as an enum, as well as total scopes [#2741](https://github.com/ethyca/fides/pull/2741)

### Developer Experience

* Set the security environment of the fides dev setup to `prod` instead of `dev` [#2588](https://github.com/ethyca/fides/pull/2588)
* Removed unexpected default Redis password [#2666](https://github.com/ethyca/fides/pull/2666)
* Privacy Center
* Typechecking and validation of the `config.json` will be checked for backwards-compatibility. [#2661](https://github.com/ethyca/fides/pull/2661)

### Developer Experience

* Combined conftest.py files [#2669](https://github.com/ethyca/fides/pull/2669)

### Fixed
Expand All @@ -61,6 +65,11 @@ The types of changes are:
* Admin UI
* Remove Identifiability (Data Qualifier) from taxonomy editor [2684](https://github.com/ethyca/fides/pull/2684)
* FE: Custom field selections binding issue on Taxonomy tabs [#2659](https://github.com/ethyca/fides/pull/2693/)
* Fix Privacy Request Status when submitting a consent request when identity verification is required [#2736](https://github.com/ethyca/fides/pull/2736)

## [2.7.1](https://github.com/ethyca/fides/compare/2.7.0...2.7.1)

* Fix error with the classify dataset feature flag not writing the dataset to the server [#2675](https://github.com/ethyca/fides/pull/2675)

## [2.7.0](https://github.com/ethyca/fides/compare/2.6.6...2.7.0)

Expand Down
68 changes: 68 additions & 0 deletions clients/admin-ui/cypress/e2e/home.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { stubPlus } from "cypress/support/stubs";

import { RoleRegistry } from "~/types/api";

const ALL_TILES = [
"View data map",
"Add systems",
"View systems",
"Configure privacy requests",
"Review privacy requests",
];

const verifyExpectedTiles = (expectedTiles: string[]) => {
expectedTiles.forEach((tile) => {
cy.getByTestId(`tile-${tile}`);
});
const remainingTiles = ALL_TILES.filter((t) => !expectedTiles.includes(t));
remainingTiles.forEach((item) => {
cy.getByTestId(`tile-${item}`).should("not.exist");
});
};

describe("Home page", () => {
beforeEach(() => {
cy.login();
});

describe("permissions", () => {
beforeEach(() => {
// For these tests, let's say we always have systems and connectors
cy.intercept("GET", "/api/v1/system", {
fixture: "systems/systems.json",
}).as("getSystems");
cy.intercept("GET", "/api/v1/connection*", {
fixture: "connectors/list.json",
}).as("getConnectors");
stubPlus(true);
});

it("renders all tiles when all scopes are available", () => {
cy.assumeRole(RoleRegistry.ADMIN);
cy.visit("/");
verifyExpectedTiles(ALL_TILES);
});

it("renders viewer only tiles", () => {
cy.assumeRole(RoleRegistry.VIEWER);
cy.visit("/");
verifyExpectedTiles(["View data map", "View systems"]);
});

it("renders privacy request manager tiles", () => {
cy.assumeRole(RoleRegistry.PRIVACY_REQUEST_MANAGER);
cy.visit("/");
verifyExpectedTiles(["Review privacy requests"]);
});

it("renders privacy request manager + viewer tiles", () => {
cy.assumeRole(RoleRegistry.VIEWER_AND_PRIVACY_REQUEST_MANAGER);
cy.visit("/");
verifyExpectedTiles([
"View data map",
"View systems",
"Review privacy requests",
]);
});
});
});
45 changes: 36 additions & 9 deletions clients/admin-ui/cypress/e2e/privacy-requests.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,33 +138,60 @@ describe("Privacy Requests", () => {
cy.getByTestId("option-local").click();
cy.wait("@createConfigurationSettings").then((interception) => {
const { body } = interception.request;
expect(body.fides.storage.active_default_storage_type).to.eql("local");
expect(body.storage.active_default_storage_type).to.eql("local");
});

cy.wait("@createStorage").then((interception) => {
const { body } = interception.request;
expect(body.type).to.eql("local");
expect(body.format).to.eql("json");
});

cy.contains("Configure active storage type saved successfully");
cy.contains("Configure storage type details saved successfully");
});

it("Can configure S3 storage", () => {
cy.getByTestId("option-s3").click();
cy.wait("@createConfigurationSettings").then((interception) => {
const { body } = interception.request;
expect(body.fides.storage.active_default_storage_type).to.eql("s3");
expect(body.storage.active_default_storage_type).to.eql("s3");
});
cy.wait("@getStorageDetails");
});
});

describe("Message Configuration", () => {
beforeEach(() => {
cy.visit("/privacy-requests/configure/messaging");
});

it("Can configure Mailgun email", () => {
cy.getByTestId("option-mailgun").click();
cy.getByTestId("input-domain").type("test-domain");
cy.getByTestId("save-btn").click();
cy.wait("@createStorage").then((interception) => {
cy.wait("@createMessagingConfiguration").then((interception) => {
const { body } = interception.request;
expect(body.type).to.eql("s3");
expect(body.service_type).to.eql("MAILGUN");
cy.contains(
"Mailgun email successfully updated. You can now enter your security key."
);
});
});

it("Can configure Twilio email", () => {
cy.getByTestId("option-twilio-email").click();
cy.getByTestId("input-email").type("test-email");
cy.getByTestId("save-btn").click();
cy.wait("@createMessagingConfiguration").then(() => {
cy.contains(
"Twilio email successfully updated. You can now enter your security key."
);
});
});

it("Can configure Twilio SMS", () => {
cy.getByTestId("option-twilio-sms").click();
cy.wait("@createMessagingConfiguration").then(() => {
cy.contains("Messaging provider saved successfully.");
});
cy.contains("S3 storage credentials successfully updated.");
cy.contains("Configure active storage type saved successfully.");
});
});
});
56 changes: 56 additions & 0 deletions clients/admin-ui/cypress/e2e/routes.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { stubPlus } from "cypress/support/stubs";

import { RoleRegistry } from "~/types/api";

describe("Routes", () => {
beforeEach(() => {
cy.login();
});

describe("permissions", () => {
beforeEach(() => {
// For these tests, let's say we always have systems and connectors
cy.intercept("GET", "/api/v1/system", {
fixture: "systems/systems.json",
}).as("getSystems");
cy.intercept("GET", "/api/v1/connection*", {
fixture: "connectors/list.json",
}).as("getConnectors");
stubPlus(true);
});

it("admins can access many routes", () => {
cy.assumeRole(RoleRegistry.ADMIN);
cy.visit("/");
cy.visit("/add-systems");
cy.wait("@getSystems");
cy.getByTestId("add-systems");
cy.visit("/privacy-requests");
cy.getByTestId("privacy-requests");
cy.visit("/datastore-connection");
cy.wait("@getConnectors");
cy.getByTestId("connection-grid");
});

it("viewers and/or approvers can only access limited routes", () => {
[
RoleRegistry.VIEWER,
RoleRegistry.PRIVACY_REQUEST_MANAGER,
RoleRegistry.VIEWER_AND_PRIVACY_REQUEST_MANAGER,
].forEach((role) => {
cy.assumeRole(role);
// cannot access /add-systems
cy.visit("/add-systems");
cy.getByTestId("add-systems").should("not.exist");
cy.getByTestId("home-content");
// cannot access /datastore-connection
cy.visit("/datastore-connection");
cy.getByTestId("connection-grid").should("not.exist");
cy.getByTestId("home-content");
// can access /privacy-requests
cy.visit("/privacy-requests");
cy.getByTestId("privacy-requests");
});
});
});
});
15 changes: 14 additions & 1 deletion clients/admin-ui/cypress/e2e/systems.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ describe("System management page", () => {
beforeEach(() => {
stubTaxonomyEntities();
stubSystemCrud();
cy.intercept("GET", "/api/v1/dataset", { fixture: "datasets.json" }).as(
"getDatasets"
);
cy.intercept("GET", "/api/v1/connection_type*", {
fixture: "connectors/connection_types.json",
}).as("getConnectionTypes");
Expand Down Expand Up @@ -128,7 +131,12 @@ describe("System management page", () => {
// Fill in the privacy declaration form
cy.getByTestId("tab-Data uses").click();
cy.getByTestId("add-btn").click();
cy.wait(["@getDataCategories", "@getDataSubjects", "@getDataUses"]);
cy.wait([
"@getDataCategories",
"@getDataSubjects",
"@getDataUses",
"@getDatasets",
]);
cy.getByTestId("new-declaration-form");
const declaration = system.privacy_declarations[0];
cy.getByTestId("input-data_use").click();
Expand All @@ -141,6 +149,10 @@ describe("System management page", () => {
declaration.data_subjects.forEach((ds) => {
cy.getByTestId("input-data_subjects").type(`${ds}{enter}`);
});
cy.getByTestId("input-dataset_references").click();
cy.getByTestId("input-dataset_references").within(() => {
cy.contains("Demo Users Dataset 2").click();
});

cy.getByTestId("save-btn").click();
cy.wait("@putSystem").then((interception) => {
Expand All @@ -150,6 +162,7 @@ describe("System management page", () => {
data_use: declaration.data_use,
data_categories: declaration.data_categories,
data_subjects: declaration.data_subjects,
dataset_references: ["demo_users_dataset_2"],
});
});
cy.getByTestId("new-declaration-form").within(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{
"identifier": "manual_webhook",
"type": "manual",
"human_readable": "Manual Webhook",
"human_readable": "Manual Process",
"encoded_icon": null
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"details": {
"domain": "test-domain",
"is_eu_domain": "false"
},
"service_type": "MAILGUN"
}
Loading

0 comments on commit 7ef8ba3

Please sign in to comment.