Repository navigation
Conversation
| 'profile:uid', | ||
| ], | ||
| vpn: ['https://identity.mozilla.com/apps/vpn', 'profile'], | ||
| monitor: ['https://identity.mozilla.com/apps/monitor', 'profile'], |
There was a problem hiding this comment.
This config will be deleted in https://mozilla-hub.atlassian.net/browse/FXA-14509
| '9ebfe2c2f9ea3c58', | ||
| ], | ||
| smartwindow: ['5882386c6d801776'], | ||
| monitor: ['5882386c6d801776', '946bfd23df91404c', '802d56ef2a9af9fa'], |
There was a problem hiding this comment.
This config has an override on the webservices-infra side: https://github.com/mozilla/webservices-infra/pull/13160
And will be moved to the DB here: https://mozilla-hub.atlassian.net/browse/FXA-14804
| relay: 'https://identity.mozilla.com/apps/relay', | ||
| smartwindow: 'https://identity.mozilla.com/apps/smartwindow', | ||
| vpn: 'https://identity.mozilla.com/apps/vpn', | ||
| monitor: 'https://identity.mozilla.com/apps/monitor', |
There was a problem hiding this comment.
This config will be moved to the DB here: https://mozilla-hub.atlassian.net/browse/FXA-14804
There was a problem hiding this comment.
🟡 Changes recommended
Address the four unresolved findings covering authorization allowlist tests, exchange-gate isolation, shared integration typing, and positive Monitor resolution coverage.
2 open issues
What changed in this PR
Adds service=monitor support across Firefox OAuth settings, authorization, token exchange, and functional tests.
Changes:
- Registers Monitor as a native OAuth service and WebChannel service.
- Configures Monitor scopes and authorized clients.
- Adds unit, integration, and functional coverage.
| File | Description |
|---|---|
packages/fxa-settings/src/models/integrations/utils.test.ts |
Updates service-resolution tests. |
packages/fxa-settings/src/models/integrations/oauth-native-integration.ts |
Adds Monitor integration behavior. |
packages/fxa-settings/src/models/integrations/oauth-native-integration.test.ts |
Tests Monitor integration behavior. |
packages/fxa-settings/src/lib/constants.ts |
Adds the Monitor display name. |
packages/fxa-settings/src/lib/channels/firefox.ts |
Adds the Monitor WebChannel type. |
packages/fxa-auth-server/test/remote/account_consents_exchange.in.spec.ts |
Tests consent-gated Monitor exchange. |
packages/fxa-auth-server/config/index.ts |
Configures Monitor scopes and clients. |
packages/functional-tests/tests/misc/monitorIntegration.spec.ts |
Adds Monitor sign-in coverage. |
packages/functional-tests/lib/scopes.ts |
Adds the Monitor scope constant. |
packages/functional-tests/lib/query-params.ts |
Adds Monitor OAuth parameters. |
libs/accounts/oauth/src/lib/oauth.ts |
Adds the Monitor enum value. |
libs/accounts/oauth/src/lib/oauth.spec.ts |
Tests the new enum value. |
Review effort: Lite
| '9ebfe2c2f9ea3c58', | ||
| ], | ||
| smartwindow: ['5882386c6d801776'], | ||
| monitor: ['5882386c6d801776', '946bfd23df91404c', '802d56ef2a9af9fa'], |
There was a problem hiding this comment.
IMO we already have good coverage for this In authorization.spec.ts and the "consents" integration tests. We don't need to add new tests every time to cover new client IDs.
| isFirefoxClientServiceMonitor() { | ||
| return ( | ||
| this.isFirefoxClient() && | ||
| this.data.service === OAuthNativeServices.Monitor | ||
| ); | ||
| } |
There was a problem hiding this comment.
Added the false default to the base Integration so it can be called on any integration. I left it out of the Pick<> lists: no page or component calls the per-service predicates directly, only isFirefoxNonSync(), getWebChannelServices() and getServiceName(), which are already in those contracts. Adding it there would only mean stubbing it in about ten mocks.
Because: - Monitor is integrating into Firefox and needs its own browser service. - Monitor's silent token exchange must be gated on accountAuthorizations. This commit: - Adds monitor to OAuthNativeServices and treats it as a non-Sync service. - Sends monitor in the web channel services and names it on sign-in. - Maps monitor to apps/monitor in exchange and authorization serviceScopes. - Allows Firefox Desktop and Monitor web (stage, prod) to write Monitor rows. - Adds unit, exchange integration and Monitor desktop sign-in tests. Fixes FXA-14723 Fixes FXA-14746

Because
service=value, like Relay, SmartWindow and VPN.accountAuthorizationsrather than fall through to the Firefox client'sallowedScopes.This pull request
monitortoOAuthNativeServices; fxa-settings treats it as a non-Sync browser service, sends{ monitor: {} }in the web channel services and names it "Mozilla Monitor".monitortoapps/monitorinoauthServer.exchange.serviceScopes, and toapps/monitor+profileinoauthServer.authorization.serviceScopes.946bfd23df91404c, prod802d56ef2a9af9fa) write Monitor authorization rows.Issue that this pull request solves
Closes: FXA-14723
Closes: FXA-14746
Checklist
Put an
xin the boxes that applyOther information (Optional)
oauth_exchange_allowed_clients_for_service, so the matching change is in mozilla/webservices-infra#13160.Draft because I'd like to test locally.Tested locally. Try to runyarn firefoxand go through a Firefox service flow but change it toservice=monitor. It says "Firefox Monitor" and follows the same flows as Smart Window, VPN etc.