fxa/packages/fxa-support-panel
dependabot[bot] 7df93dbe22
chore(deps): bump @nestjs/config from 2.2.0 to 2.3.1
Bumps [@nestjs/config](https://github.com/nestjs/config) from 2.2.0 to 2.3.1.
- [Release notes](https://github.com/nestjs/config/releases)
- [Changelog](https://github.com/nestjs/config/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/config/compare/2.2.0...2.3.1)

---
updated-dependencies:
- dependency-name: "@nestjs/config"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-06 07:08:42 +00:00
..
.vscode chore(multiple): update mocha wherever used 2022-06-28 09:03:42 -07:00
src task(support-panel): Adds tracing to support panel 2022-09-15 13:50:05 -07:00
test task(CI): build, unit test, and integration test jobs 2023-01-10 12:52:01 -08:00
views fix(fxa-auth-server) change user-facing 'verify' references to 'confirm' in emails 2022-08-10 15:40:13 -07:00
.nsprc fix(deps): Add exception for yargs-parser nsp advisory 1500 2020-05-11 11:40:27 -07:00
CHANGELOG.md Merge pull request #13572 from mozilla/FXA-5496-stop-generating-changelogs-in-our-release-script 2022-07-11 16:20:36 -07:00
README.md feat(payments): remove Coupons Feature Flag (#11576) 2022-02-09 11:35:44 -08:00
nest-cli.json feat(support): convert to NestJS framework 2020-12-16 11:04:41 -08:00
package.json chore(deps): bump @nestjs/config from 2.2.0 to 2.3.1 2023-03-06 07:08:42 +00:00
pm2.config.js task(support-panel): Adds tracing to support panel 2022-09-15 13:50:05 -07:00
tsconfig.build.json feat(support): convert to NestJS framework 2020-12-16 11:04:41 -08:00
tsconfig.json feat(support): convert to NestJS framework 2020-12-16 11:04:41 -08:00

README.md

fxa-support-panel

The Firefox Accounts Support Panel is a small web service that is intended for use as an embedded iframe in the Zendesk Support UX. It's intended to show Subscription Support Agents relevant data about a users Firefox Account so that they may assist the users support request.

Software Architecture

The primary source of truth on FxA user data is the fxa-auth-server. That service is configured to use OAuth for user and service access to account data, and has write access to the user data. Since this view is intended purely for read-only access to user data for assisting a support agent, this service instead uses read-restricted mysql credentials.

Read-only access is enforced on the database by using a MySQL user restricted to the stored procedures needed to run the queries that fetch basic profile information.

Local Development

In order to make API calls, the support panel needs a shared secret bearer token with the auth server. This can be done by setting the corresponding environment variables for each server to match to the same string value:

  • fxa-support-panel: AUTH_SECRET_BEARER_TOKEN
  • fxa-auth-server: SUPPORT_PANEL_AUTH_SECRET_BEARER_TOKEN

Note: the default config for each server should already have this set up.

The support panel can be viewed locally by going to http://localhost:${port}/?uid=${uid}, where:

  • port is the port as defined in ./pm2.config.js
  • uid is a local FxA user ID

Testing

This package uses Jest to test its code. By default yarn test will test all files ending in .spec.ts.

Test commands:

# Test with coverage
yarn test:cov

# Test on file change
yarn test:watch