clients icon indicating copy to clipboard operation
clients copied to clipboard

[PM-18721][PM-21271] Integrate InputPasswordComponent in EmergencyAccessTakeoverDialogComponent

Open rr-bw opened this issue 8 months ago â€ĸ 4 comments

đŸŽŸī¸ Tracking

PM-18721 PM-21271

  • This PR stacks on top of: https://github.com/bitwarden/clients/pull/14226
  • This PR should go out with the following server changes: PM-21921 - https://github.com/bitwarden/server/pull/5886

📔 Objective

This PR integrates the InputPasswordComponent within the EmergencyAccessTakeoverDialogComponent

Notes:

  • When the Grantor is a member (but not the Owner) of an org that has enforced MP policies set, we do NOT show any MP policies in the callout, nor do we require that the New Password must adhere to those policies. This is because the Grantor in this case is going to be removed from the org anyway upon Takeover, so policies are irrelevant.
  • When the Grantor is the Owner of an org that has enforced MP policies set, we do show MP policies in the callout and require the the New Password must adhere to them.

(see Help Docs > Emergency Access > User Access)

📸 Screenshots

PM16117_ChangeExistingPasswordRefactor flag ON ✅

Grantor is not part of an org

  • No MP policy callout is shown, and no MP policies are enforced (this is expected)

https://github.com/user-attachments/assets/6bb892d0-43dc-4487-b383-390b7ced9160

Grantor is an org member (but not an Owner) of an org that has MP policies set

  • No MP policy callout is shown, and no MP policies are enforced (this is expected)

https://github.com/user-attachments/assets/c1957111-39b6-4271-b5f2-5d2943648f17

Grantor is an org Owner of an org that has MP policies set

  • MP policy callout is shown, and MP policies are enforced

https://github.com/user-attachments/assets/e4f3aaf0-598a-47ad-96af-95c0ee0090dd

Grantor is member (not Owner) of an org that has MP enforced, AND Grantee is Owner of an org that has MP enforced

  • No MP policy callout is shown, and no MP policies are enforced (this is expected)

https://github.com/user-attachments/assets/44a00872-f9a8-4f4f-8978-0808d14c2b73

PM16117_ChangeExistingPasswordRefactor flag OFF ❌

https://github.com/user-attachments/assets/0a140ab2-be1e-487f-b9c5-c86dda9593c4

⏰ 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

rr-bw avatar May 05 '25 19:05 rr-bw

Codecov Report

Attention: Patch coverage is 12.56831% with 160 lines in your changes missing coverage. Please review.

Project coverage is 36.85%. Comparing base (012ce25) to head (81aa2bf). Report is 2 commits behind head on main.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...angular/input-password/input-password.component.ts 0.00% 94 Missing :warning:
...over/emergency-access-takeover-dialog.component.ts 30.61% 34 Missing :warning:
...ngs/emergency-access/emergency-access.component.ts 18.75% 13 Missing :warning:
...c/angular/input-password/input-password.stories.ts 0.00% 9 Missing :warning:
...rgency-access/services/emergency-access.service.ts 28.57% 3 Missing and 2 partials :warning:
...gular/change-password/change-password.component.ts 0.00% 3 Missing :warning:
...-initiation/complete-trial-initiation.component.ts 0.00% 1 Missing :warning:
...gistration-finish/registration-finish.component.ts 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14636      +/-   ##
==========================================
- Coverage   36.89%   36.85%   -0.04%     
==========================================
  Files        3227     3228       +1     
  Lines       93254    93378     +124     
  Branches    14030    14053      +23     
==========================================
+ Hits        34406    34419      +13     
- Misses      57424    57533     +109     
- Partials     1424     1426       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar May 05 '25 19:05 codecov[bot]

Logo Checkmarx One – Scan Summary & Details – 3530bfd9-f6ce-45a8-886d-ec4e585daec7

New Issues (1)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
HIGH CVE-2025-5280 Npm-electron-36.4.0
detailsRecommended version: 37.0.0
Description: Out-of-bounds Write in V8 in Google Chrome prior to 137.0.7151.55 allowed a remote attacker to potentially exploit heap corruption via a crafted HT...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: ererWjo8blUHANDwCZi6lcDhctYhJZON%2FmLTH1jdJTs%3D
Vulnerable Package

github-actions[bot] avatar May 05 '25 19:05 github-actions[bot]

@Patrick-Pimentel-Bitwarden

  • https://github.com/bitwarden/clients/pull/14636/commits/3eba30599d1284a15502417209807a501bd5cf9d - is a fix for https://bitwarden.atlassian.net/browse/PM-22624
  • I retested relevant scenarios locally

rr-bw avatar Jun 13 '25 21:06 rr-bw