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

refactor(active-user-state-refactor): [PM-12040] Remove ActiveUserSta… #13149

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

Conversation

Patrick-Pimentel-Bitwarden
Copy link
Contributor

@Patrick-Pimentel-Bitwarden Patrick-Pimentel-Bitwarden commented Jan 29, 2025

🎟️ Tracking

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

📔 Objective

Update the SSO Login Service to use SingleUserState instead of deprecated ActiveUserState.

Screenshots

Web TDE Flow

Screen.Recording.2025-02-02.at.10.11.01.PM.mov

Web Master Password Flow

Screen.Recording.2025-02-02.at.10.12.06.PM.mov

Desktop Master Password Flow

Screen.Recording.2025-02-03.at.11.02.40.AM.mov

Browser Master Password Flow

Screen.Recording.2025-02-03.at.11.15.05.AM.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

…te from SSO Service - First pass of work to update the state. In the middle of testing.
…om SSO Service - Fix for jslib-services.module.ts
Copy link
Contributor

github-actions bot commented Jan 29, 2025

Logo
Checkmarx One – Scan Summary & Details43cdcda1-2981-46da-9728-b6e2f5ab2219

Fixed Issues (2)

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

Severity Issue Source File / Package
HIGH CVE-2024-21538 Npm-cross-spawn-7.0.3
MEDIUM CVE-2024-55565 Npm-nanoid-3.3.7

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 58.33333% with 15 lines in your changes missing coverage. Please review.

Project coverage is 35.54%. Comparing base (ca53ecc) to head (6354f1b).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...ular/src/auth/components/set-password.component.ts 0.00% 7 Missing ⚠️
libs/auth/src/angular/sso/sso.component.ts 0.00% 2 Missing ⚠️
apps/browser/src/background/main.background.ts 0.00% 1 Missing ⚠️
...ents/base-login-decryption-options-v1.component.ts 0.00% 1 Missing ⚠️
libs/angular/src/auth/components/sso.component.ts 75.00% 0 Missing and 1 partial ⚠️
...nents/two-factor-auth/two-factor-auth.component.ts 75.00% 0 Missing and 1 partial ⚠️
...ngular/src/auth/components/two-factor.component.ts 66.66% 0 Missing and 1 partial ⚠️
...tion-options/login-decryption-options.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13149      +/-   ##
==========================================
+ Coverage   35.48%   35.54%   +0.05%     
==========================================
  Files        3007     3008       +1     
  Lines       90899    90933      +34     
  Branches    16908    16917       +9     
==========================================
+ Hits        32260    32319      +59     
+ Misses      56137    56109      -28     
- Partials     2502     2505       +3     

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

@Patrick-Pimentel-Bitwarden Patrick-Pimentel-Bitwarden force-pushed the auth/pm-12040/remove-active-user-state-from-sso-login branch from 4ade22d to 0091a20 Compare January 29, 2025 23:59
Copy link
Contributor

@JaredSnider-Bitwarden JaredSnider-Bitwarden left a comment

Choose a reason for hiding this comment

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

Nice work on this! Would you mind adding recordings of SSO login working still on each client on the PR? Just a few nits below:

libs/common/src/auth/services/sso-login.service.spec.ts Outdated Show resolved Hide resolved
libs/common/src/auth/services/sso-login.service.ts Outdated Show resolved Hide resolved
@Patrick-Pimentel-Bitwarden
Copy link
Contributor Author

Patrick-Pimentel-Bitwarden commented Jan 31, 2025

Nice work on this! Would you mind adding recordings of SSO login working still on each client on the PR? Just a few nits below:

@JaredSnider-Bitwarden

I think some of the flows seem to concern TDE here and here. Am I understanding that correctly? In my own testing of these changes with SSO flows without TDE I didn't see these populate with values and moved on before chasing the end of the trail there. I'll give it another go.

@JaredSnider-Bitwarden
Copy link
Contributor

Nice work on this! Would you mind adding recordings of SSO login working still on each client on the PR? Just a few nits below:

@JaredSnider-Bitwarden

I think some of the flows seem to concern TDE here and here. Am I understanding that correctly? In my own testing of these changes with SSO flows without TDE I didn't see these populate with values and moved on before chasing the end of the trail there. I'll give it another go.

Yes, sorry I missed that. Let me know if you need any help running through the SSO TDE flows.

@Patrick-Pimentel-Bitwarden
Copy link
Contributor Author

@JaredSnider-Bitwarden I have uploaded videos of all the clients going through at least master password flows. Would you like me to verify TDE flows for all of them as well?

@JaredSnider-Bitwarden
Copy link
Contributor

ing through at least master password flows. Would you like me to verify TDE flows for all of them as well?

No, the videos were sufficient! Thank you!

Copy link
Contributor

@JaredSnider-Bitwarden JaredSnider-Bitwarden left a comment

Choose a reason for hiding this comment

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

Nice work!

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