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 5 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

Changes to the two-factor setup to remove outdated "supported devices":
image

⏰ 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 & Details8e46118f-4e25-471a-a144-fda8c5b4232a

Fixed Issues (1)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/username-generator.component.html: 3

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.34%. Comparing base (ca420d7) to head (4aa3b7e).

✅ 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.34%   34.34%   -0.01%     
==========================================
  Files        2965     2965              
  Lines       90514    90515       +1     
  Branches    16976    16977       +1     
==========================================
  Hits        31086    31086              
- Misses      56964    56965       +1     
  Partials     2464     2464              

☔ 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
Hinton
Hinton previously requested changes 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?

@quexten
Copy link
Contributor Author

quexten commented Jan 15, 2025

@Hinton Product seems good with the current messaging for this error since security-key / passkey users are pretty technical cc @micahblut

@quexten quexten requested review from a team and Patrick-Pimentel-Bitwarden January 15, 2025 14:02
@quexten quexten requested a review from Hinton January 15, 2025 14:02
@Hinton
Copy link
Member

Hinton commented Jan 16, 2025

Can't say I agree since I'm fairly technical and getting a "authentication was cancelled" error would not tell me anything. That said If product is fine I'm removing my request for changes.

@Hinton Hinton dismissed their stale review January 16, 2025 11:47

Product is fine with the verbiage.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Looks good to me

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