Skip to content

Commit bd1dd1d

Browse files
authored
Merge branch 'main' into mntor-5029
2 parents cb2c0b6 + e718961 commit bd1dd1d

File tree

197 files changed

+5472
-7372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+5472
-7372
lines changed

.env

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ NEXTAUTH_URL=http://localhost:6060
99
DISABLE_DOCKERFLOW=
1010

1111
# Database server
12-
DATABASE_URL=postgres://postgres@localhost:5432/blurts
12+
DATABASE_URL=postgres://blurts:blurts@localhost:5432/blurts
1313
# How many seconds can unverified subscribers remain in the database
1414
DELETE_UNVERIFIED_SUBSCRIBERS_TIMER=86400
1515

@@ -145,9 +145,9 @@ MONTHLY_SCANS_QUOTA=
145145
STATS_TOKEN=
146146

147147
# GCP PubSub Project ID and subscription name
148-
GCP_PUBSUB_PROJECT_ID=
149-
GCP_PUBSUB_TOPIC_NAME=
150-
GCP_PUBSUB_SUBSCRIPTION_NAME=
148+
GCP_PUBSUB_PROJECT_ID=your-project-name
149+
GCP_PUBSUB_TOPIC_NAME=hibp-breaches
150+
GCP_PUBSUB_SUBSCRIPTION_NAME=hibp-cron
151151

152152
# Randomly-generated UUIDv5 namespace, until/unless we are approved to use FxA UID for Nimbus User ID.
153153
NIMBUS_UUID_NAMESPACE=00000000-0000-0000-0000-000000000000
@@ -169,7 +169,5 @@ SENTRY_AUTH_TOKEN=
169169
# Whether GA4 sends data or not. NOTE: must be set in build environment.
170170
NEXT_PUBLIC_GA4_DEBUG_MODE=true
171171

172-
GA4_API_SECRET=unsafe-default-secret-for-dev
173-
174172
# Data broker removal estimates data
175173
DATA_BROKER_REMOVAL_ESTIMATES_DATA=[]

.env.ci

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# local, heroku, stage, production
2+
APP_ENV=local
3+
SERVER_URL=http://localhost:6060
4+
PORT=6060
5+
NEXTAUTH_URL=http://localhost:6060
6+
NODE_ENV=development
7+
8+
# 1: disables the dockerflow endpoints
9+
# see: https://github.com/mozilla-services/Dockerflow#containerized-app-requirements
10+
DISABLE_DOCKERFLOW=
11+
12+
# Database server
13+
DATABASE_URL=postgres://blurts:blurts@localhost:5432/test-blurts
14+
# How many seconds can unverified subscribers remain in the database
15+
DELETE_UNVERIFIED_SUBSCRIBERS_TIMER=86400
16+
17+
# How many seconds until page tokens expire?
18+
PAGE_TOKEN_TIMER=0
19+
20+
# Email server
21+
SMTP_URL=
22+
# From: address used in emails
23+
EMAIL_FROM=
24+
# https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-configuration-sets.html
25+
SES_CONFIG_SET=
26+
# 1: only log messages coming back from SES
27+
SES_NOTIFICATION_LOG_ONLY=
28+
29+
# s3 bucket for cdn
30+
AWS_ACCESS_KEY_ID=
31+
AWS_SECRET_ACCESS_KEY=
32+
AWS_REGION=
33+
S3_BUCKET=
34+
35+
# Firefox Accounts OAuth
36+
FXA_SETTINGS_URL=https://accounts.stage.mozaws.net/settings
37+
38+
OAUTH_CLIENT_ID=edd29a80019d61a1
39+
OAUTH_CLIENT_SECRET=get-this-from-groovecoder-or-fxmonitor-engineering
40+
OAUTH_AUTHORIZATION_URI=https://accounts.stage.mozaws.net/authorization
41+
OAUTH_METRICS_FLOW_URI=https://accounts.stage.mozaws.net/metrics-flow
42+
OAUTH_PROFILE_URI=https://profile.stage.mozaws.net/v1/profile
43+
OAUTH_TOKEN_URI=https://oauth.stage.mozaws.net/v1/token
44+
OAUTH_ACCOUNT_URI="https://api-accounts.stage.mozaws.net/v1"
45+
46+
# HIBP API for breach data
47+
# How many seconds to wait before refreshing upstream breach data from HIBP
48+
HIBP_RELOAD_BREACHES_TIMER=600
49+
# HIBP API for range search and subscription
50+
HIBP_KANON_API_ROOT=https://enterprise.stage-api.haveibeenpwned.com
51+
HIBP_KANON_API_TOKEN=
52+
HIBP_API_ROOT=https://haveibeenpwned.com/api/v2
53+
HIBP_API_TOKEN=
54+
# How many milliseconds to wait before retrying an HIBP request
55+
HIBP_THROTTLE_DELAY=2000
56+
# Max number of times to try an HIBP request before throwing error
57+
HIBP_THROTTLE_MAX_TRIES=5
58+
# Authorization token for HIBP to present to /hibp/notify endpoint
59+
HIBP_NOTIFY_TOKEN=unsafe-default-token-for-dev
60+
# Domains we prefer to not link to
61+
HIBP_BREACH_DOMAIN_BLOCKLIST=a-blocked-domain.com,another-blocked-domain.org
62+
63+
# OneRep API for exposure scanning
64+
ONEREP_API_BASE=https://mozilla.api.onerep.com
65+
ONEREP_API_KEY=
66+
ONEREP_WEBHOOK_SECRET="unsafe-default-secret-for-dev"
67+
68+
# Firefox Remote Settings
69+
FX_REMOTE_SETTINGS_WRITER_SERVER=https://settings-writer.prod.mozaws.net/v1
70+
FX_REMOTE_SETTINGS_WRITER_USER=
71+
FX_REMOTE_SETTINGS_WRITER_PASS=
72+
73+
# DSN for Sentry error and event capturing
74+
# e.g., SENTRY_DSN=https://{key}@sentry.prod.mozaws.net/408
75+
SENTRY_DSN=
76+
SENTRY_DSN_LEGACY=
77+
78+
BREACH_RESOLUTION_ENABLED=1
79+
PRODUCT_PROMOS_ENABLED=1
80+
81+
# Experiment Flag
82+
EXPERIMENT_ACTIVE=0
83+
84+
REDIS_URL=redis://redis.mock
85+
86+
SUPPORTED_LOCALES=cs,cy,da,de,el,en,en-CA,en-GB,es-AR,es-CL,es-ES,es-MX,fi,fr,fy-NL,gn,hu,kab,ia,id,it,ja,ko,nl,nn-NO,pt-BR,pt-PT,ru,sk,sl,sq,sv-SE,th,tr,uk,vi,zh-CN,zh-TW
87+
88+
# Locales blocked from viewing Mozilla VPN promos. Use CSV without whitespace.
89+
VPN_PROMO_BLOCKED_LOCALES=zh-CN
90+
91+
# MaxMind GeoLite2 geolocation service used for VPN Banner
92+
# For Heroku deploys, the following 3 vars are generated automatically via Buildpack https://github.com/HiMamaInc/heroku-buildpack-geoip-geolite2
93+
# Staging and production environments will need variables set manually
94+
# Local environment uses a test database with limited data (preset here)
95+
GEOIP_GEOLITE2_PATH=./tests/mmdb/
96+
GEOIP_GEOLITE2_CITY_FILENAME=GeoLite2-City-Test.mmdb
97+
GEOIP_GEOLITE2_COUNTRY_FILENAME=GeoLite2-Country-Test.mmdb
98+
99+
# Educational video src urls, hosted by SRE team on a CDN
100+
EDUCATION_VIDEO_URL_RELAY=https://monitor.cdn.mozilla.net/videos/FF_Relay_version_02.mp4
101+
EDUCATION_VIDEO_URL_VPN=https://monitor.cdn.mozilla.net/videos/Mozilla_VPN.mp4
102+
103+
# Email addresses that are allowed to test and send emails
104+
ADMINS=
105+
106+
# Enable monthly cron-job, currently for sending unresolved breach reminder emails
107+
MONTHLY_CRON_ENABLED=
108+
109+
# Functional tests
110+
E2E_TEST_ENV=ci # need to not be 'local' because of imports
111+
E2E_TEST_SECRET=test-secret
112+
E2E_TEST_ACCOUNT_BASE_EMAIL=test-account
113+
E2E_TEST_ACCOUNT_BASE_PASSWORD=test-password
114+
115+
# Monitor Premium features
116+
# Link to start user on the subscription process. PREMIUM_ENABLED must be set to `true`.
117+
SUBSCRIPTION_BILLING_AMOUNT_MONTHLY_US=42.42
118+
SUBSCRIPTION_BILLING_AMOUNT_BUNDLE_INDIVIDUAL_MONTHLY_US=424
119+
SUBSCRIPTION_BILLING_AMOUNT_BUNDLE_MONTHLY_US=42
120+
121+
# SubPlat 2.0 URL, product and plan IDs, used for Plus subscriptions:
122+
FXA_SUBSCRIPTIONS_URL=https://accounts.stage.mozaws.net/subscriptions
123+
PREMIUM_PRODUCT_ID=prod_NErZh679W62lai
124+
PREMIUM_PLAN_ID_MONTHLY_US=price_1MUNq0Kb9q6OnNsL4BoJgepf
125+
PREMIUM_PLAN_ID_YEARLY_US=price_1NvqawKb9q6OnNsLRTnYrtrV
126+
127+
# SubPlat 3.0 URL and offering ID, used for Plus subscriptions:
128+
SUBPLAT_SUBSCRIPTIONS_URL=https://payments-next.stage.fxa.nonprod.webservices.mozgcp.net
129+
SUBPLAT_MONITOR_OFFERING_ID=monitorplusstage
130+
SUBPLAT_BUNDLE_OFFERING_ID=privacyprotectionplan/yearly
131+
SUBPLAT_BUNDLE_PRODUCT_ID=prod_SFb8iVuZIOPREe
132+
SUBPLAT_BUNDLE_PRICE_ID=price_1RMAopKb9q6OnNsLSGe1vLtt
133+
134+
# Mozilla privacy product URLs
135+
FIREFOX_RELAY_LANDING_URL=https://stage.fxprivaterelay.nonprod.cloudops.mozgcp.net
136+
MOZILLA_VPN_LANDING_URL=https://www-dev.allizom.org/products/vpn
137+
138+
# This date is used to direct users who signed up after data broker scanning
139+
# was released to the welcome flow. Users who had signed up before and thus
140+
# have seen data breach results before, will be able to see their known breaches
141+
# first:
142+
BROKER_SCAN_RELEASE_DATE=2024-02-06
143+
144+
MONTHLY_SUBSCRIBERS_QUOTA=
145+
MONTHLY_SCANS_QUOTA=
146+
STATS_TOKEN=
147+
148+
# GCP PubSub Project ID and subscription name
149+
GCP_PUBSUB_PROJECT_ID=your-project-name
150+
GCP_PUBSUB_TOPIC_NAME=hibp-breaches
151+
GCP_PUBSUB_SUBSCRIPTION_NAME=hibp-cron
152+
PUBSUB_HOST=localhost
153+
PUBSUB_PORT=8085
154+
PUBSUB_EMULATOR_HOST="${PUBSUB_HOST}:${PUBSUB_PORT}"
155+
156+
157+
# Randomly-generated UUIDv5 namespace, until/unless we are approved to use FxA UID for Nimbus User ID.
158+
NIMBUS_UUID_NAMESPACE=00000000-0000-0000-0000-000000000000
159+
NIMBUS_SIDECAR_URL=http://localhost:8001
160+
161+
# The maximum number of jobs that the email breach alert worker will process.
162+
EMAIL_BREACH_ALERT_MAX_MESSAGES = 10000
163+
164+
# The maximum number of scans and profiles allowed. May be used for alerts, and for redirecting to waitlist.
165+
MAX_MANUAL_SCANS=100
166+
MAX_INITIAL_SCANS=100
167+
MAX_PROFILES_ACTIVATED=100
168+
MAX_PROFILES_CREATED=100
169+
170+
# Used during CI to upload sourcemaps to Sentry.
171+
UPLOAD_SENTRY_SOURCEMAPS=false
172+
SENTRY_AUTH_TOKEN=
173+
174+
# Whether GA4 sends data or not. NOTE: must be set in build environment.
175+
NEXT_PUBLIC_GA4_DEBUG_MODE=true
176+
177+
GA4_API_SECRET=unsafe-default-secret-for-dev
178+
179+
# Data broker removal estimates data
180+
DATA_BROKER_REMOVAL_ESTIMATES_DATA=[]

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
persist-credentials: false
1717
- name: Use Node.js
18-
uses: actions/setup-node@v5
18+
uses: actions/setup-node@v6
1919
with:
2020
node-version: "20.19.x"
2121
- run: npm ci

.github/workflows/docker_build_deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959
- name: Deploy to Dockerhub
6060
env:
6161
DOCKERHUB_REPO: ${{ env.DOCKERHUB_REPO }}
62+
TAGS: ${{ steps.meta.outputs.tags }}
6263
run: |
6364
# deploy main
64-
docker tag blurts-server ${{ steps.meta.outputs.tags }}
65-
docker push ${{ steps.meta.outputs.tags }}
65+
docker tag blurts-server $TAGS
66+
docker push $TAGS

.github/workflows/docker_build_deploy_v2.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ jobs:
6868

6969
- name: Build and push Docker image to GAR
7070
id: build-and-push
71+
env:
72+
TAGS: ${{ steps.meta.outputs.tags }}
7173
uses: docker/build-push-action@v6
7274
with:
7375
context: .
7476
# Push is true to push to GAR after build
7577
push: true
7678
# Tags generated by the metadata action (only GAR tag)
77-
tags: ${{ steps.meta.outputs.tags }}
79+
tags: ${{ env.TAGS }}
7880
# Pass build arguments
7981
build-args: |
8082
SENTRY_RELEASE=${{ github.sha }} # Use full SHA for Sentry release clarity
@@ -87,5 +89,7 @@ jobs:
8789
cache-to: type=gha,mode=max
8890

8991
- name: Print Image URI
92+
env:
93+
TAGS: ${{ steps.meta.outputs.tags }}
9094
run: |
91-
echo "Pushed GAR image: ${{ steps.meta.outputs.tags }}"
95+
echo "Pushed GAR image: $TAGS"

.github/workflows/functional_tests_cron.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- uses: actions/checkout@v5
3535
with:
3636
persist-credentials: false
37-
- uses: actions/setup-node@v5
37+
- uses: actions/setup-node@v6
3838
with:
3939
node-version: 20.19.x
4040

@@ -67,13 +67,13 @@ jobs:
6767
E2E_TEST_SECRET: ${{ secrets.E2E_TEST_SECRET }}
6868
E2E_TEST_ACCOUNT_BASE_EMAIL: ${{ secrets.E2E_TEST_ACCOUNT_BASE_EMAIL }}
6969
E2E_TEST_ACCOUNT_BASE_PASSWORD: ${{ secrets.E2E_TEST_ACCOUNT_BASE_PASSWORD }}
70-
- uses: actions/upload-artifact@v4
70+
- uses: actions/upload-artifact@v5
7171
if: always()
7272
with:
7373
name: playwright-report-${{ github.event_name == 'workflow_dispatch' && inputs.test_env || matrix.test_env }}
7474
path: playwright-report/
7575
retention-days: 30
76-
- uses: actions/upload-artifact@v4
76+
- uses: actions/upload-artifact@v5
7777
if: always()
7878
with:
7979
name: test-results-${{ github.event_name == 'workflow_dispatch' && inputs.test_env || matrix.test_env }}

.github/workflows/functional_tests_pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v5
3636
with:
3737
persist-credentials: false
38-
- uses: actions/setup-node@v5
38+
- uses: actions/setup-node@v6
3939
with:
4040
node-version: 20.19.x
4141

@@ -86,13 +86,13 @@ jobs:
8686
PREMIUM_PLAN_ID_YEARLY_US: ${{ secrets.STAGE_PREMIUM_PLAN_ID_YEARLY_US }}
8787
PREMIUM_PRODUCT_ID: ${{ secrets.STAGE_PREMIUM_PRODUCT_ID }}
8888
REDIS_URL: "redis://redis.mock"
89-
- uses: actions/upload-artifact@v4
89+
- uses: actions/upload-artifact@v5
9090
if: always()
9191
with:
9292
name: playwright-report
9393
path: playwright-report/
9494
retention-days: 30
95-
- uses: actions/upload-artifact@v4
95+
- uses: actions/upload-artifact@v5
9696
if: always()
9797
with:
9898
name: test-results

.github/workflows/lighthouse_cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
persist-credentials: false
3030
- name: Use Node.js 20.19.x
31-
uses: actions/setup-node@v5
31+
uses: actions/setup-node@v6
3232
with:
3333
node-version: 20.19.x
3434
- name: Run Lighthouse CI

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
persist-credentials: false
1818
- name: Use Node.js
19-
uses: actions/setup-node@v5
19+
uses: actions/setup-node@v6
2020
with:
2121
node-version: '20.19.x'
2222
- run: npm ci

.github/workflows/production_deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ jobs:
6363
password: ${{ steps.gcp-auth.outputs.access_token }}
6464

6565
- name: Pull Docker Hub image
66-
run: docker pull "${{ env.DOCKERHUB_IMAGE }}:${{ env.SAFE_IMAGE_TAG }}"
66+
run: docker pull "$DOCKERHUB_IMAGE:$SAFE_IMAGE_TAG"
6767

6868
- name: Retag Docker Hub image
69-
run: docker tag "${{ env.DOCKERHUB_IMAGE }}:${{ env.SAFE_IMAGE_TAG }}" "${{ env.DOCKERHUB_IMAGE }}:${{ env.SAFE_ENVIRONMENT }}-${{ env.SAFE_IMAGE_TAG }}"
69+
run: docker tag "$DOCKERHUB_IMAGE:$SAFE_IMAGE_TAG" "$DOCKERHUB_IMAGE:$SAFE_ENVIRONMENT-$SAFE_IMAGE_TAG"
7070

7171
- name: Push Docker Hub image
72-
run: docker push "${{ env.DOCKERHUB_IMAGE }}:${{ env.SAFE_ENVIRONMENT }}-${{ env.SAFE_IMAGE_TAG }}"
72+
run: docker push "$DOCKERHUB_IMAGE:$SAFE_ENVIRONMENT-$SAFE_IMAGE_TAG"
7373

7474
- name: Pull GAR image
75-
run: docker pull "${{ env.GAR_IMAGE_BASE }}:${{ env.SAFE_IMAGE_TAG }}"
75+
run: docker pull "$GAR_IMAGE_BASE:$SAFE_IMAGE_TAG"
7676

7777
- name: Retag GAR image
78-
run: docker tag "${{ env.GAR_IMAGE_BASE }}:${{ env.SAFE_IMAGE_TAG }}" "${{ env.GAR_IMAGE_BASE }}:${{ env.SAFE_ENVIRONMENT }}-${{ env.SAFE_IMAGE_TAG }}"
78+
run: docker tag "$GAR_IMAGE_BASE:$SAFE_IMAGE_TAG" "$GAR_IMAGE_BASE:$SAFE_ENVIRONMENT-$SAFE_IMAGE_TAG"
7979

8080
- name: Push GAR image
81-
run: docker push "${{ env.GAR_IMAGE_BASE }}:${{ env.SAFE_ENVIRONMENT }}-${{ env.SAFE_IMAGE_TAG }}"
81+
run: docker push "$GAR_IMAGE_BASE:$SAFE_ENVIRONMENT-$SAFE_IMAGE_TAG"

0 commit comments

Comments
 (0)