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

macOS: Bundle-Specfic Autofill Secure Vault Keychain Items #2652

Merged
merged 14 commits into from
Apr 23, 2024

Conversation

aataraxiaa
Copy link
Contributor

@aataraxiaa aataraxiaa commented Apr 17, 2024

Task/Issue URL: https://app.asana.com/0/72649045549333/1206924205159008/f
Tech Design URL: https://app.asana.com/0/481882893211075/1206942775357851/f
BSK PR: duckduckgo/BrowserServicesKit#785
CC:

Description:
See BSK PR Description

Testing Pre-requisites

1. Testing involves using two Mac App variants - App Store (or DMG) + Debug via Xcode

  • We will call these variants AppStore and Debug
  • If you use DDG browser as your main browser (like me!), back up your passwords as needed (although they should be fine, but just as a precaution)

2. Save some Autofill data

  • Run Debug on main via Xcode
  • Save at least 1 of each Autofill type

3. Set up Sync

  • Setup Sync between the Debug build, running on main, and a phone
  • Ensure it is working

4. Prepare the Keychain

  • Open the Keychain Access app and search for all items named DuckDuckGo Secure Vault v2 (you should find 3 items)
  • Edit the Access Control of each item, ensuring that only AppStore has access (i.e remove access for Debug). The result for each item should look as follows:
Screenshot 2024-04-17 at 14 36 17

5. Reproduce the issue
- Again, launch Debug from main branch via Xcode
- Observe you are asked for keychain access repeatedly on launch. Do NOT SELECT ‘Always Allow’ from the Keychain access prompt.
- Before moving to testing, ensure the Keychain is still in a prepared state as described in Step 4 above

Steps to test this PR

1. Keychain Data Migration

  • Launch Debug from the PR branch
  • Observe you are asked for your password three times. Each time, input your password and select ‘Allow’, NOT ‘Always Allow’
  • Stop running the app
  • Check the Keychain Access app. You should now see three new DuckDuckGo Secure Vault v3 entries. Check the Access Control of each, and you should see the Debug variant as the only app listed
  • Launch the app again via Xcode
  • Observe you are not asked for passwords
  • Open up Autofill, and ensure you are not prompted for Keychain access

2. Smoke Test Password Management

  • Add/edit/delete entries
  • Ensure at no point at you prompted for your Keychain access password

3. Smoke Test Autofill

  • Navigate to fill.dev
  • Login with new credentials
  • Ensure you are prompted to save
  • Ensure at no point at you prompted for your Keychain access password
  • Navigate back to login
  • Ensure you are prompted to enter credentials
  • Ensure at no point at you prompted for your Keychain access password

4. Smoke Test Sync

  • Ensure that the credentials added in Test 2 above have synced to phone
  • Add credentials to phone, and ensure they are synced to desktop

<!—
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be marked with the DO NOT MERGE label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the Pending Product Review label.

If at any point it isn't actively being worked on/ready for review/otherwise moving forward (besides the above PR/PFR exception) strongly consider closing it (or not opening it in the first place). If you decide not to close it, make sure it's labelled to make it clear the PRs state and comment with more information.
—>

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Apr 17, 2024
@aataraxiaa aataraxiaa removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Apr 17, 2024
@aataraxiaa aataraxiaa marked this pull request as ready for review April 18, 2024 15:18
@aataraxiaa aataraxiaa requested review from ayoy and samsymons April 18, 2024 15:18
Copy link
Collaborator

@ayoy ayoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 💪

Just a naming change suggestion, which would cause a massive renaming across all 3 PRs, and perhaps we could live without it, so only address it if you're really up for it :) Thanks @aataraxiaa!

DuckDuckGo/Menus/MainMenuActions.swift Show resolved Hide resolved
Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No additional comments here, this looks solid. Great work!

@aataraxiaa aataraxiaa merged commit 3561c79 into main Apr 23, 2024
16 checks passed
@aataraxiaa aataraxiaa deleted the pete/autofill-bundle-specific-keychain-items branch April 23, 2024 12:22
samsymons added a commit that referenced this pull request Apr 24, 2024
* main: (22 commits)
  Fix DataBrokerProtectionProcessor.swift lint
  Fix SwiftLint
  Add parameter allowed encoding to error descriptions (#2691)
  Remove debug flags
  Bump version to 1.85.0 (174)
  Revert interrupt logic (#2699)
  Fix downloads not appearing (#2693)
  Bump version to 1.85.0 (173)
  DBP interrupt fixes for release  (#2696)
  Bookmark All Tabs (#2683)
  Fix DBP interrupt function not being cleared on succesful completion (#2690)
  Bump version to 1.85.0 (172)
  Validate DBP permissions (#2673)
  Bump BSK (#2688)
  Add Untitled tab title (#2650)
  Stop first scan completed notification being sent if there's an error (#2685)
  DBP: Rename scanAllBrokers to startManualScan (#2679)
  macOS: Bundle-Specfic Autofill Secure Vault Keychain Items (#2652)
  Bump version to 1.85.0 (171)
  [Release PR] Link Lottie with the NetworkProtectionUI library (#2676)
  ...
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.

3 participants