Because:
- we don't need to use our own fork and branch of webcrypto-liner now
that it implements hkdf
- we will continue to polyfill since node's webcrypto module is still
experimental as of v18
This commit:
- uses mainline webcrypto-liner
Because:
* We're converting our views from Backbone to React
This commit:
* Serves the 'account_recovery_confirm_key' page to the React side if the feature flag is on
* Modifies fxa-auth-client recoveryKey.ts so we can get the recovery key ID by itself
* Adds all page functionality to AccountRecoveryConfirmKey, including adding needed methods to the account model, making the calls, and handling errors
* Refactors CompleteResetPassword and redirects if the account has a recovery key, but does not redirect if a user has clicked that they've lost their key on AccountRecoveryConfirmKey
* Creates useLinkStatus hooks to give back parameters and validates link status
* Adds AppLayout around LinkExpired, LinkDamaged, and LinkUsed to simplify return/rendering
Closes FXA-6126
Because:
- We are migrating content server to react
This Commit:
- Ports relier models
- Adds ability to bind models to generic context via an @bind property decorator
- Adds ability to validate field state via a set of validators that can be specified on the @bind decorator
- Provides implementation to bind a model to url search query string context
- Provides implementation to bind a model to url hash state context
- Provides implementation to bind a model to a storage context
- Adds a creational factory pattern for initializing relier models and their state
- Adds relier factory to app context
- Adds a useRelier hook so that we can easily access relier models in components
Because:
- We wanted to run a few preliminary checks before proceeding to more
expensive CI jobs. Checks include:
- Compiling typescript in commonly referenced workspace packages
- Linting code that has changed
- Executing Unit Tests for code that has changed
- We wanted to partition test operations into unit tests, and
integration tests. Unit tests can be run relatively quickly and
require no additional infrastructure. Integration tests require
additional infrastructure and generally have longer execution
times. Now that jobs are blocked from running until preliminary
checks pass, one of which is unit tests, it is important to draw a
distinction between these two types of tests.
- We want to avoid unnecessary yarn installs and typescript
compilations, which are time consuming.
- We want to make sure that test results are published and failing tests
can be easily viewed in the CI.
This Commit:
- Creates a build-and-validate job in the CI that builds, lints, and
unit tests code prior to running any other jobs.
- Creates unit-test job in CI config
- Creates integration-test job in CI config
- Removes redundant calls to compile workspace packages. These
are now built up front, cached, and restored as needed for future
runs.
- Extends the create-lists script functionality to generate commands
that can be executed with the parallel command.
- Removes unnecessary yarn install operations. Invoking yarn workspace
focus results in a yarn install. In the case of running tests this is largely
unnecessary, because we already do a yarn install in the base-install
step.
- Make sure test results are exported as junit xml so the CI can report
back on tests that were failing. This was done for a couple workspace
packages, but many were lacking the capability. All test:unit and
test:integration npm scripts now export this data.
- Fixes the following issues encountered along the way:
- Adds logs to monitor heap usage of jest tests. Some
jest tests are still using a lot of memory.
- Moves a few slow / long running tests from unit test to
integration tests.
- Ensures that jest.transform for ts-jest is always instructed
to have the config option isolateModules is set to true. This
definitely decreases memory overhead and resolves some
of the OOM errors we were hitting. It was configured in
some places but not everywhere.
- Exports test results files for all tests
- Exports all test artifacts
- Uses gnu parallel to run tests in parallel. Turns out yarn
workspaces foreach would give a false positive when an OOM
was encountered. Fortunately, the parallel command offered an
acceptable work around, and even offers some nice features
like the load argument, which allows to control test execution a
bit more efficiently.
Because:
- We cannot add parameters to job triggered through circleci's API
This Commit:
- Removes parameters from the `test-content-server-remote` job
Because:
- we want to re-auth an existing session through the gql-api
This commit:
- proxy a session reauth request through the gql-api to the auth-server
Because:
- We want to speed up pipeline startup.
This Commit:
- Optimizes docker base image builds for the smallest images possible.
- Enables hard links for yarn cache
- Enables global yarn cache
- Avoids needlessly installing playwright browsers.
- Avoids needlessly running yarn install.
- Uses mozilla/fxa-circleci:ci-base-latest image for running test pipelines
- Uses mozilla/fxa-circleci:ci-base-browsers image for running functional tests pipelines
- Creates configurable executors that can be reused across pipelines
- Upgrades to yarn 3.3.0
- Enabled direct check out of PR code to test, which is faster than circle ci’s checkout command.
- Upgrades functional test to X-Large. This was already the case for playwright tests, but is now extended to content server tests too. This decision was made due to running lots of pipelines and realizing flakiness was largely due to CPU or memory hitting 100% for long periods of time.
- Turns off tracing, since it saves a bit of runtime.
Because:
- We want to separate unit tests and integrations tests
This Commit:
- Tags all unit tests, i.e. tests that can run without infrastructure and in a fairly short amount of time, with #unit.
- Adds a test:unit npm command to each package
- Adds a test:integration npm command to each package, and adds '#integration' tags to jest tests since jest has no --invert option like mocha.
Because:
- we might want to sign in through the gql-api instead of auth-server
This commit:
- add a mutation to proxy a sign in request to the auth-server
Because:
* Users should be able to set a password after they've created an account via a third-party oauth login
This commit:
* Adds a new 'create_password' route and page for users without a set password to access instead of "change" password, which displays a new FormPassword component, shared with PageChangePassword
* Adds metrics events to PageCreatePassword: engage, submit, success, fail
* Adds createPassword method + the mutation to the Account model
* Updates the Settings > Security > Password section accordingly
* Redirects users from change_password/create_password routes
* Minor HTML/CSS tweaks - remove superfluous div and empty h2 FlowContainer + ChangePassword header tweak, and ensure disabled buttons don't receive hover treatment
* Updates some Storybook states
Because:
- We want to remove AET (Account Ecosystem Telemetry) related code.s
This Commit:
- Removes account-ecosystem-telmetry.js module
- Removes functions / endpoints that relied exclusively on that module. Specifically operations surrounding updating and fetching the ecosystem_anon_id
- Removed the ecosystem anon id from data payloads.
- Removes ecosystem_anon_id configuration
Closes: #9127
Because:
* When generating new recovery codes, there was no confirmation step, which might make it easy for a user to overlook the fact they should download / record their recovery codes.
This commit:
* Introduces the same dialog, which existed in the initial 2FA flow, that prompted a user for at least one recovery code as a way to validate users had recorded them.
* Introduces back end support for creating and updating recovery codes as a two step process.
* Shifts recovery code generation to cient, relocating lib/random.ts.
* Adds validation for recovery codes being updated
* Exposes recovery code length / count settings to client
* Add section about running playwrite tests to readme
Closes#9530