Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to subscription cookie #3512

Merged
merged 4 commits into from
Nov 1, 2024
Merged

Conversation

miasma13
Copy link
Contributor

@miasma13 miasma13 commented Nov 1, 2024

Task/Issue URL: https://app.asana.com/0/1108686900785972/1208264562025859/f

Description:
Initial PR -> #3488
Update to how the subscription cookie operates:

  • constraint the cookie to subscriptions.duckduckgo.com
  • on sign out do not fully remove the cookie - just clear the value
  • gate the feature behind the setAccessTokenCookieForSubscriptionDomains privacy config feature flag

Steps to test this PR:
To inspect website cookies use "Cookies" in the debug menu. Please mind that cookies may appear empty with no WebView being instantiated (no tabs), ensure there is at least tab with webpage open (unless required not to).
To test purchase use the real device and test the Alpha target.

  1. Verify that feature flag gates the operation (JSON BLOB and its editor)
  2. Ensure that cookie is set properly for the new domain
  3. Test that when feature flag is enabled after the purchase the token is set in the cookie
    4.Test that when feature flag is enabled after signing out of the subscription the cookie is updated with empty value
  4. Test that when feature flag is turned to disabled the cookie independent of its value is cleared

Internal references:

Software Engineering Expectations
Technical Design Template

@miasma13 miasma13 changed the base branch from main to release/7.143.0 November 1, 2024 00:26
@miasma13 miasma13 requested a review from samsymons November 1, 2024 00:40
miasma13 added a commit to duckduckgo/BrowserServicesKit that referenced this pull request Nov 1, 2024
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1108686900785972/1208264562025859/f
iOS PR: duckduckgo/iOS#3512
macOS PR: duckduckgo/macos-browser#3489
What kind of version bump will this require?: Patch

**Description**:
Update to how the subscription cookie operates:
- constraint the cookie to `subscriptions.duckduckgo.com`
- on sign out do not fully remove the cookie - just clear the value
- gate the feature behind the
`setAccessTokenCookieForSubscriptionDomains` privacy config feature flag

**Steps to test this PR**:
See client PRs

<!--
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
-->

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
@miasma13 miasma13 merged commit cc7929e into release/7.143.0 Nov 1, 2024
13 checks passed
@miasma13 miasma13 deleted the michal/update-subs-cookie branch November 1, 2024 12:31
samsymons added a commit that referenced this pull request Nov 1, 2024
…the-os

# By Daniel Bernal (6) and others
# Via Daniel Bernal (4) and Michal Smaga (1)
* main:
  Update build number
  Update build number
  Bump rexml from 3.3.8 to 3.3.9 (#3495)
  Release 7.142.1-1 (#3525)
  Add a debouncer to NavBars animator (#3519)
  Release 7.143.0-1 (#3516)
  Update to subscription cookie (#3512)
  Bug Fix: Phishing Detection Dataset Discrepancies (#3469)
  Duckplayer New Tab + Refactor (#3491)
  Blind attempt to fix Omnibar-related crash (#3514)
  Fix VPN server info metadata (#3501)

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
samsymons added a commit that referenced this pull request Nov 4, 2024
# By Daniel Bernal (6) and others
# Via Daniel Bernal (3) and others
* main: (21 commits)
  Validate VPN errors before re-throwing them (#3513)
  Allowing users to delete suggestions on macOS (#3465)
  Update build number
  Update build number
  Bump rexml from 3.3.8 to 3.3.9 (#3495)
  Release 7.142.1-1 (#3525)
  Add a debouncer to NavBars animator (#3519)
  Release 7.143.0-1 (#3516)
  Update to subscription cookie (#3512)
  Bug Fix: Phishing Detection Dataset Discrepancies (#3469)
  Duckplayer New Tab + Refactor (#3491)
  Blind attempt to fix Omnibar-related crash (#3514)
  Fix VPN server info metadata (#3501)
  Set version_check_wait_retry_limit to 1 (#3511)
  BSK changes for macOS release note screen update (#3466)
  Onboarding Add to Dock Promo view (#3505)
  Update BSK with autofill 15.1.0 (#3507)
  Update tests to use new tagline (#3439)
  adding impression pixels for duckplayer in landscape mode (#3493)
  Update autoconsent to v10.17.0 (#3504)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
samsymons added a commit that referenced this pull request Nov 5, 2024
# By Daniel Bernal (7) and others
# Via Daniel Bernal (3) and others
* main: (29 commits)
  Send pixel on sync secure storage failure (#3542)
  Onboarding Add to Dock Refactor for Intro scenario (#3538)
  Update C-S-S to 6.29.0 (#3541)
  Change save password Never for Site button to Not Now (#3471)
  Release 7.144.0-1 (#3540)
  UserDefaults misbehavior monitoring (#3510)
  Send pixel on sync secure storage read failure (#3530)
  Remove NewTabPage retain cycles (#3532)
  Update release notes (#3529)
  Release 7.144.0-0 (#3528)
  Add Privacy Config feature to control ad attribution reporting (#3506)
  Validate VPN errors before re-throwing them (#3513)
  Allowing users to delete suggestions on macOS (#3465)
  Update build number
  Update build number
  Bump rexml from 3.3.8 to 3.3.9 (#3495)
  Release 7.142.1-1 (#3525)
  Add a debouncer to NavBars animator (#3519)
  Release 7.143.0-1 (#3516)
  Update to subscription cookie (#3512)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants