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-16978] Add support for fido2 2fa on mac #12823

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

quexten
Copy link
Contributor

@quexten quexten commented Jan 13, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-16978

📔 Objective

Fido2 on electron desktop on mac works, when no pin is required, only the pin is unimplemented. Therefore, we can just enable it for 2fa.

📸 Screenshots

Screen.Recording.2025-01-13.at.13.13.50.mov

⏰ 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

@quexten quexten requested a review from coroiu January 13, 2025 09:00
coroiu
coroiu previously approved these changes Jan 13, 2025
Copy link
Contributor

github-actions bot commented Jan 13, 2025

Logo
Checkmarx One – Scan Summary & Details4d772acb-72d5-48da-8fad-a2a9413c4086

Great job, no security vulnerabilities found in this Pull Request

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 34.13%. Comparing base (c1e3836) to head (814cee0).
Report is 21 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...atform/services/electron-platform-utils.service.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12823      +/-   ##
==========================================
- Coverage   34.13%   34.13%   -0.01%     
==========================================
  Files        2936     2936              
  Lines       90428    90441      +13     
  Branches    16988    16992       +4     
==========================================
+ Hits        30869    30871       +2     
- Misses      57102    57112      +10     
- Partials     2457     2458       +1     

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

@quexten quexten marked this pull request as ready for review January 13, 2025 09:15
@quexten quexten requested a review from a team as a code owner January 13, 2025 09:15
@quexten quexten changed the title Add support for fido2 2fa on mac [PM-16978] Add support for fido2 2fa on mac Jan 13, 2025
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

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

I suspect there are several flows which do trigger prompts. Security Keys can be configured to always perform UV. TouchID might need UV?

It should be clear to the user that they need to change 2fa method as the default tends to be WebAuthn which might not work.

Comment on lines 80 to 81
// Temporarily restricted to only Windows until https://github.com/electron/electron/pull/28349
// has been merged and an updated electron build is available.
Copy link
Member

Choose a reason for hiding this comment

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

Comment should be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the comment. Also doesn't seem like electron will ever add support here, so I removed the reference to the PR and noted this has to be added in a different way.

@quexten quexten requested a review from a team as a code owner January 13, 2025 12:06
@quexten quexten requested a review from rr-bw January 13, 2025 12:06
@quexten quexten requested review from Hinton and coroiu and removed request for a team, tangowithfoxtrot and rr-bw January 13, 2025 12:08
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

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

Did we plan on improving the error message for users with touchID? Returning NotAllowedError is suboptimal

@quexten
Copy link
Contributor Author

quexten commented Jan 13, 2025

Sorry, should have linked that. The notallowederror is only present on the old two-factor component, but I've submitted the fix for that here: #12830; the new component shows:
image

@coroiu coroiu removed their request for review January 13, 2025 14:08
@Hinton
Copy link
Member

Hinton commented Jan 13, 2025

@quexten That error is not particularly useful to users with a TouchID 2fa though? They would need to get the error, go to our help page and troubleshoot the problem themselves to identify that the platform doesn't support non security keys?

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