Skip to content

Conversation

matt-livefront
Copy link
Collaborator

@matt-livefront matt-livefront commented Aug 22, 2025

🎟️ Tracking

PM-23576 - Validate local KDF settings are correct when updating server KDF
PM-23277 - Upgrade KDF settings to minimums

📔 Objective

This adds forced KDF updates if the PBKDF2 iterations is below the minimum (600k). KDF updates can be performed without user interaction when unlocking the vault with a master password. Otherwise, there's a check on the vault list after syncing. In this flow, the user will have to input their master password before the update can proceed.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 98.48485% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.79%. Comparing base (232ed85) to head (5575424).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...rvices/API/Account/Requests/UpdateKdfRequest.swift 60.00% 2 Missing ⚠️
...enShared/Core/Platform/Services/StateService.swift 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1880      +/-   ##
==========================================
- Coverage   81.33%   75.79%   -5.54%     
==========================================
  Files         825     1022     +197     
  Lines       52136    62088    +9952     
==========================================
+ Hits        42403    47062    +4659     
- Misses       9733    15026    +5293     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

github-actions bot commented Aug 22, 2025

Logo
Checkmarx One – Scan Summary & Detailsb91bfa82-9eb5-4f28-8cb1-7e33f9390660

Great job! No new security vulnerabilities introduced in this pull request

@matt-livefront matt-livefront force-pushed the matt/PM-23576-update-kdf branch from e81760c to 15ffd67 Compare September 22, 2025 19:20
@matt-livefront matt-livefront force-pushed the matt/PM-23576-update-kdf branch from 15ffd67 to bc8cf8b Compare September 26, 2025 21:59
@matt-livefront matt-livefront marked this pull request as ready for review September 26, 2025 22:00
@matt-livefront matt-livefront requested a review from a team as a code owner September 26, 2025 22:00
Copy link
Member

@fedemkr fedemkr left a comment

Choose a reason for hiding this comment

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

🤔 Should we actually sync at some point before checking if it needs to update KDF minimums? I was thinking in the scenario that the user has already updated KDF settings in other client but mobile has not synced yet (maybe missed the notification) and then by using the mobile app it tries to update it (again). Not sure if that's already handled by the server but raising it in case it produces any bad outcomes.

@matt-livefront
Copy link
Collaborator Author

🤔 Should we actually sync at some point before checking if it needs to update KDF minimums? I was thinking in the scenario that the user has already updated KDF settings in other client but mobile has not synced yet (maybe missed the notification) and then by using the mobile app it tries to update it (again). Not sure if that's already handled by the server but raising it in case it produces any bad outcomes.

@fedemkr Good callout, I updated the logic to sync and check again that the account still needs a KDF update before proceeding.

@matt-livefront matt-livefront merged commit b3a2485 into main Sep 30, 2025
13 of 14 checks passed
@matt-livefront matt-livefront deleted the matt/PM-23576-update-kdf branch September 30, 2025 20:34
"DefaultX" = "Default (%1$@)";
"UpdateYourEncryptionSettings" = "Update your encryption settings";
"TheNewRecommendedEncryptionSettingsDescriptionLong" = "The new recommended encryption settings will improve your account security. Enter your master password to update now.";
"Updating" = "Updating...";

Choose a reason for hiding this comment

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

Should be Updating…

Last time someone unify all ... (3 dots) to character

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.

4 participants