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

[PM-14800] Credential Exchange implementation preparation #1198

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

fedemkr
Copy link
Member

@fedemkr fedemkr commented Dec 10, 2024

🎟️ Tracking

PM-14800

📔 Objective

This PR prepares the ground for implementing Credential Exchange flows.
The export and import flows are going to be implemented in separate PRs based on this one. So no export/import operations can be tested so far on this PR.

This is similar to #1138 but mocking the SDK export/import functions so that the app can be properly built with the current SDK version instead of targeting a local SDK version.
When the SDK PR bitwarden/sdk-internal#32 gets merged we need to update the code so it doesn't reference the mocked function anymore.

Environment Support

⚠️ This requires Xcode 16.2 (currently in RC). The code has several compiler checks #if compiler(>=6.0.3) to ensure that block of code is only compiled when in the proper version of the compiler/Xcode; this ensures Xcode stable version to continue compiling the project.

Feature enablement

⚠️ In order to enabled Credential Exchange alpha_update_cxp_infoplist.sh needs to be run first to update the Info.plist files with the proper configuration. I've also added this on select_variant.sh with a compiler flag SUPPORTS_CXP so we can trigger builds with this enabled from the CI/CD passing such flag. The configuration hasn't been added directly into the Info.plist files so when this is merged to main it doesn't display Bitwarden as an import provider as the work for Credential Exchange is not ready for production.

Make sure you have OS Settings -> Developer -> Credential Exchange enabled and (in simulator) also a Face ID enrolled and enabled.

Notes

Info.plist files have some changes regarding reordering the code after plutil commands were done. So that when the new script alpha_update_cxp_infoplist.sh is executed only the specific parts of the code are updated instead of seeing also the rendering.

⏰ 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 Dec 10, 2024

Codecov Report

Attention: Patch coverage is 61.53846% with 35 lines in your changes missing coverage. Please review.

Project coverage is 89.40%. Comparing base (b067f62) to head (054b07d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ervices/API/Extensions/JSONDecoder+Bitwarden.swift 41.17% 20 Missing ⚠️
...ices/Temp/ClientExportersProtocol+Extensions.swift 0.00% 8 Missing ⚠️
...nShared/UI/Platform/Application/AppProcessor.swift 0.00% 5 Missing ⚠️
Bitwarden/Application/SceneDelegate.swift 87.50% 1 Missing ⚠️
...nShared/Core/Platform/Services/ClientService.swift 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1198      +/-   ##
==========================================
- Coverage   89.49%   89.40%   -0.10%     
==========================================
  Files         688      692       +4     
  Lines       43840    43872      +32     
==========================================
- Hits        39236    39222      -14     
- Misses       4604     4650      +46     

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

Copy link
Contributor

github-actions bot commented Dec 10, 2024

Logo
Checkmarx One – Scan Summary & Details09ad4256-b22e-401f-a810-9bb9425f7223

No New Or Fixed Issues Found

@fedemkr fedemkr merged commit 58260a9 into main Dec 12, 2024
9 checks passed
@fedemkr fedemkr deleted the PM-14800/impl-credential-exchange branch December 12, 2024 12:52
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