Closed Bug 1518258 Opened 6 years ago Closed 6 years ago

Inject pref based consumer_key into discovery stream layout_endpoint pref

Categories

(Firefox :: New Tab Page, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 67
Iteration:
67.1 - Jan 28 - Feb 10
Tracking Status
firefox66 + verified
firefox67 --- verified

People

(Reporter: thecount, Assigned: pdahiya)

References

Details

(Keywords: github-merged)

Attachments

(2 files)

Right now our discovery stream layout pref has consumer_key baked into it, but there should be a pref for this, and we just need to inject it when we do the fetch.

This is currently how the old top stories fetch works, example: consumer_key=$apiKey

Iteration: --- → 67.1 - Jan 28 - Feb 10
Priority: -- → P2
Blocks: 1512725

[Tracking Requested - why for this release]: When we do experiments on release, we would like to have API keys less exposed to users.

Assignee: nobody → pdahiya
Priority: P2 → P1
Keywords: github-merged

How to test:

  1. go to about:config
  2. search for discoverystream.config
  3. Verify preference is set to
    {"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":true,"show_spocs":true,"layout_endpoint":"https://getpocket.com/v3/newtab/layout?version=1&consumer_key=$apiKey&layout_variant=basic"}

With this fix consumer_key is no longer exposed in layout_endpoint and picking value from pref 'extensions.pocket.oAuthConsumerKey'

Blocks: 1528119
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED

Brahmini, can you test? Steps in comment #3.

Flags: needinfo?(bnagabandi)

I have verified in Nightly v67.0a1 on Mac OS 10.14.3 that browser.newtabpage.activity-stream.discoverystream.config is set to {"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":true,"show_spocs":true,"layout_endpoint":"https://getpocket.com/v3/newtab/layout?version=1&consumer_key=$apiKey&layout_variant=basic"}

Flags: needinfo?(bnagabandi)
Status: RESOLVED → VERIFIED

Comment on attachment 9044309 [details]
Bug 1518258 - Inject pref based consumer_key into discovery stream layout_endpoint pref

Beta/Release Uplift Approval Request

Feature/Bug causing the regression

Bug 1512725

User impact if declined

In about:config, user will see consumer key hard coded inside browser.newtabpage.activity-stream.discoverystream.config pref

Is this code covered by automated tests?

Yes

Has the fix been verified in Nightly?

Yes

Needs manual test from QE?

Yes

If yes, steps to reproduce

https://bugzilla.mozilla.org/show_bug.cgi?id=1518258#c3

List of other uplifts needed

None

Risk to taking this patch

Low

Why is the change risky/not risky? (and alternatives if risky)

This patch touches pocket new tab discovery experiment that's not turned on by default in beta

String changes made/needed

None

Attachment #9044309 - Flags: approval-mozilla-beta?

Comment on attachment 9044309 [details]
Bug 1518258 - Inject pref based consumer_key into discovery stream layout_endpoint pref

Planned work for pocket/new tab. Verified in Nightly.
OK for beta uplift, should land for beta 9.
Landing order: bug 1519879, bug 1525494, bug 1526861, bug 1524669, bug 1527195, bug 1525391, bug 1527347, bug 1525366, bug 1527626, bug 1527397, bug 1518258, bug 1527701, bug 1527370.

Attachment #9044309 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I tested on Windows.

FF Nightly version : 67.0a1 (2019-02-15)
OS : Windows 10 Pro

pref browser.newtabpage.activity-stream.discoverystream.config is set to
{"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":true,"show_spocs":true,"layout_endpoint":"https://getpocket.com/v3/newtab/layout?version=1&consumer_key=$apiKey&layout_variant=basic"}

(In reply to Wolasi from comment #7)

I have verified in Nightly v67.0a1 on Mac OS 10.14.3 that
browser.newtabpage.activity-stream.discoverystream.config is set to
{"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":true, "show_spocs":true,"layout_endpoint":"https://getpocket.com/v3/newtab/ layout?version=1&consumer_key=$apiKey&layout_variant=basic"}

Can you also please verify this issue on Firefox 66 Beta 9 (https://archive.mozilla.org/pub/firefox/candidates/66.0b9-candidates/build1/)?

Flags: qe-verify+
Flags: needinfo?(wkonu)

(In reply to Camelia Badau [:cbadau], Release Desktop QA from comment #12)

(In reply to Wolasi from comment #7)

I have verified in Nightly v67.0a1 on Mac OS 10.14.3 that
browser.newtabpage.activity-stream.discoverystream.config is set to
{"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":true, "show_spocs":true,"layout_endpoint":"https://getpocket.com/v3/newtab/ layout?version=1&consumer_key=$apiKey&layout_variant=basic"}

Can you also please verify this issue on Firefox 66 Beta 9 (https://archive.mozilla.org/pub/firefox/candidates/66.0b9-candidates/build1/)?

I have verified on Firefox v66.09b, the discovery stream pref shows {"api_key_pref":"extensions.pocket.oAuthConsumerKey","enabled":false,"show_spocs":true,"layout_endpoint":"https://getpocket.com/v3/newtab/layout?version=1&consumer_key=$apiKey&layout_variant=basic"} as expected

Flags: needinfo?(wkonu)

Thanks for verifying this!

Flags: qe-verify+
Component: Activity Streams: Newtab → New Tab Page
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: