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

build: Release 5.5.0 #1565

Merged
merged 35 commits into from
Apr 6, 2021
Merged

build: Release 5.5.0 #1565

merged 35 commits into from
Apr 6, 2021

Conversation

tshuli
Copy link
Contributor

@tshuli tshuli commented Apr 6, 2021

Improvements

  • chore: add createReqMeta to verification module logging #1562
  • ref: collapse middlewares of GET /:formId/adminform/submissions route #1530
  • ref: collapse middlewares of GET /adminform/submissions/metadata route #1526
  • ref(auth-api): duplicate auth endpoints to new /api/v3 router #1551
  • refactor: convert submission limit service function to ResultAsync #1539
  • refactor: Migrate the rest of the filters to handleEncryptedSubmission #1474
  • refactor: use neverthrow in /:transactionId/otp (part 5) #1454
  • refactor: use neverthrow in /:transactionId/otp/verify #1455
  • refactor: use neverthrow in /:transactionId/reset (part 4) #1453
  • refactor: use neverthrow in /transaction (part 3) #1452
  • refactor: use neverthrow in /transaction/:transactionId #1451

Fixes

  • fix: server to respond with status code if storage mode form is archived 91551a9

Dependency Updates

  • chore(deps-dev): bump @babel/core from 7.13.13 to 7.13.14 #1478
  • chore(deps-dev): bump @types/mongodb from 3.6.10 to 3.6.12 #1557
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #1480
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #1556
  • chore(deps-dev): bump @typescript-eslint/parser from 4.19.0 to 4.20.0 #1479
  • chore(deps-dev): bump @typescript-eslint/parser from 4.20.0 to 4.21.0 #1558
  • chore(deps-dev): bump eslint-plugin-jest from 24.3.2 to 24.3.3 #1548
  • chore(deps-dev): bump eslint-plugin-jest from 24.3.3 to 24.3.4 #1559
  • chore(deps-dev): bump husky from 5.2.0 to 6.0.0 #1477
  • chore(deps-dev): bump ngrok from 3.4.1 to 4.0.0 #1469
  • chore(deps-dev): bump ngrok from 4.0.0 to 4.0.1 #1560
  • chore(deps): remove nodemailer-direct-transport, not used #1550
  • fix(deps): bump @opengovsg/spcp-auth-client from 1.4.4 to 1.4.5 #1555
  • fix(deps): bump @sentry/browser from 6.2.3 to 6.2.4 #1525
  • fix(deps): bump @sentry/browser from 6.2.4 to 6.2.5 #1545
  • fix(deps): bump @sentry/integrations from 6.2.3 to 6.2.4 #1523
  • fix(deps): bump @sentry/integrations from 6.2.4 to 6.2.5 #1543
  • fix(deps): bump aws-sdk from 2.874.0 to 2.876.0 #1527
  • fix(deps): bump aws-sdk from 2.876.0 to 2.877.0 #1546
  • fix(deps): bump aws-sdk from 2.877.0 to 2.879.0 #1549
  • [Snyk] Security upgrade mongoose from 5.11.10 to 5.12.3 #1538

mantariksh and others added 30 commits March 29, 2021 15:34
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.13.13 to 7.13.14.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.13.14/packages/babel-core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
#1474)

* refactor: Migrate the rest of the filters to handleEncryptedSubmission

* fix tests and address comments

* add encrypted string to local variables

* fix typescript lint error

* Remove unneeded spcpFeature and related things
Bumps [ngrok](https://github.com/bubenshchykov/ngrok) from 3.4.1 to 4.0.0.
- [Release notes](https://github.com/bubenshchykov/ngrok/releases)
- [Changelog](https://github.com/bubenshchykov/ngrok/blob/master/CHANGELOG.md)
- [Commits](bubenshchykov/ngrok@v3.4.1...v4.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [husky](https://github.com/typicode/husky) from 5.2.0 to 6.0.0.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v5.2.0...v6.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
chore: merge v5.4.0 into develop
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.3...6.2.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.3...6.2.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.874.0 to 2.876.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.874.0...v2.876.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#1530)

* feat: collapse middlewares for retrieve encrypt submission endpoint

* test(EncSubCtl): update current tests to account for new service calls

* test(EncSubCtl): add tests for new service fns called in controller

* feat: update JSDoc for handleGetEncryptedResponse

* feat: extract createEncryptedSubmissionDto util fn

* test(encryptSubmissionUtils): add createEncryptedSubmissionDto tests

* feat: add req meta in error logging

* test: move common service mocks to beforeEach
#1526)

* feat(EncSubCtl): inline auth middlewares for handleGetMetadata

* test(EncSubCtl): update tests for handleGetMetadata

* feat: move withUserAuthentication of submissions count API to the top

* feat: remove neverthrow andThen casting

* feat: set return type for getSubmissionMetadata map

* test: move common service mocks to beforeEach

* feat: remove unused authEncryptedResponseAccess constant

* fix: remove duplicate import due to branch merge
chore: merge release 5.4.1 back to develop
Bumps [@sentry/integrations](https://github.com/getsentry/sentry-javascript) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.4...6.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.876.0 to 2.877.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.876.0...v2.877.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@sentry/browser](https://github.com/getsentry/sentry-javascript) from 6.2.4 to 6.2.5.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md)
- [Commits](getsentry/sentry-javascript@6.2.4...6.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.2 to 24.3.3.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v24.3.2...v24.3.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.877.0 to 2.879.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.877.0...v2.879.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1539)

* refactor: convert submission limit service fn to ResultAsync

* test: update PrivateFormError test args
Bumps [@opengovsg/spcp-auth-client](https://github.com/opengovsg/spcp-auth-client) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/opengovsg/spcp-auth-client/releases)
- [Commits](opengovsg/spcp-auth-client@v1.4.4...v1.4.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/mongodb](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mongodb) from 3.6.10 to 3.6.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/mongodb)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 24.3.3 to 24.3.4.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v24.3.3...v24.3.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ngrok](https://github.com/bubenshchykov/ngrok) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/bubenshchykov/ngrok/releases)
- [Changelog](https://github.com/bubenshchykov/ngrok/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bubenshchykov/ngrok/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 5 commits April 6, 2021 11:25
* refactor(auth-api): duplicate auth endpoints to new /api/v3 router

- duplicate auth endpoint functionality and update endpoints
- update v3 router to use new endpoints
- update frontend api calls to use new endpoints

* test(auth-api): duplicate integration tests for new endpoint
* fix: package.json & package-lock.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-MQUERY-1089718

* refactor(mongoose): rework type defs

* refactor(models): rework form.server.model for mongoose

- recast FormSchema as FormDocumentSchema so that we can
  register methods specific to the handling of IFormDocument
- declare Schema.Types.DocumentArrayWithLooseDiscriminator
  so that we can more easily register our sub-schema

TODO - submit a patch to mongoose to loosen the type def for
`DocumentArray.discriminator()`

Co-authored-by: LoneRifle <LoneRifle@users.noreply.github.com>
@tshuli
Copy link
Contributor Author

tshuli commented Apr 6, 2021

@karrui

Tests

Intranet IE11 runthrough

  • Create email mode form with all fields and custom start/end page. Activate and submit form. Check that you can receive responses in your intranet inbox.
  • Collaborators can be added in email mode.
  • Create storage mode form with all fields and custom start/end page. Activate and submit form.
  • Response CSV can be downloaded for storage mode.
  • Responses can be viewed in Data tab in storage mode.
  • Attachments for individual fields can be downloaded from Data tab in storage mode.
  • Attachment ZIP for submission can be downloaded from Data tab in storage mode.
  • Submission IDs can be filtered in storage mode.
  • Collaborators can be added and their collaborating rights edited in storage mode.

@tshuli
Copy link
Contributor Author

tshuli commented Apr 6, 2021

@seaerchin
collapse middlewares of GET /:formId/adminform/submissions route

  • Go to view responses for a storage mode form.
    • Click into a single response without attachments. The data should decrypt properly and show no attachments to download.
    • Click into a single response with attachments. The data should decrypt properly and show attachments to download.

collapse middlewares of GET /adminform/submissions/metadata route

  • Go to view responses for a storage mode form. The list of responses should be shown properly.

@tshuli
Copy link
Contributor Author

tshuli commented Apr 6, 2021

@seaerchin

duplicate auth endpoints to new /api/v3 router

Check that new auth endpoints work by

  • Requesting OTP and signing in to user account
  • Logging out of user account

@tshuli
Copy link
Contributor Author

tshuli commented Apr 6, 2021

@tshuli

move Verification files together

Email OTP verification

  • Request for OTP and enter correct OTP. Field should be shown as verified.
  • Request for OTP and enter incorrect OTP 3 times, then enter correct OTP. Field should be shown as verified.
  • Request for OTP and enter incorrect OTP 4 times, then enter correct OTP. Field should NOT be able to be verified as max retry count has been exceeded.
  • Open network tab. Request for OTP, then within 30 seconds, replay the network request. You should get a 400 as the waiting time between OTP requests has not elapsed.
  • Request for OTP then wait for 10 minutes, then enter the OTP. OTP should not be verified as it has expired.

Mobile OTP verification

  • Request for OTP and enter correct OTP. Field should be shown as verified.
  • Request for OTP and enter incorrect OTP 3 times, then enter correct OTP. Field should be shown as verified.
  • Request for OTP and enter incorrect OTP 4 times, then enter correct OTP. Field should NOT be able to be verified as max retry count has been exceeded.
  • Open network tab. Request for OTP, then within 30 seconds, replay the network request. You should get a 400 as the waiting time between OTP requests has not elapsed.
  • Request for OTP then wait for 10 minutes, then enter the OTP. OTP should not be verified as it has expired.

@tshuli tshuli marked this pull request as ready for review April 6, 2021 05:11
@tshuli tshuli merged commit d4d50f4 into release Apr 6, 2021
@karrui karrui deleted the release-5.5.0 branch April 21, 2021 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants