-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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-9723] Refresh: LoginViaAuthRequestComponent #11545
[PM-9723] Refresh: LoginViaAuthRequestComponent #11545
Conversation
…(), and buildAuthRequestLoginCredentials()
…eqDeletedOrDenied()
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11545 +/- ##
==========================================
- Coverage 33.46% 33.44% -0.02%
==========================================
Files 2858 2863 +5
Lines 89396 89638 +242
Branches 17018 17059 +41
==========================================
+ Hits 29919 29983 +64
- Misses 57120 57294 +174
- Partials 2357 2361 +4 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
New Issues
Fixed Issues
|
…already authed via SSO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work. No major issues - just a few comments below:
libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts
Show resolved
Hide resolved
…ing legacy LoginViaAuthRequestV1Components
libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts
Outdated
Show resolved
Hide resolved
libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts
Outdated
Show resolved
Hide resolved
We shouldn't use the type of auth request (Standard/Admin) to determine what the backToRoute should be, since SSO TD authed users have the option to use either a Standard or Admin flow. Instead, this commit uses the user's authStatus to determine the backToRoute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work on this. Thank you very much for all the rounds of testing and thorough documentation. This is so much cleaner.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-9723
📔 Objective
Creates a refreshed and consolidated
LoginViaAuthRequestComponent
for use on all visual clients, which will be used when theUnauthenticatedExtensionUIRefresh
is on.Standard Auth Request Flows
Flow 1: Unauthed user requests approval from device; Approving device has a masterKey in memory.
/login-with-device
which creates a StandardAuthRequest >receives approval from a device with authRequestPublicKey(masterKey) > decrypts masterKey > decrypts userKey >
proceed to vault
Flow 2: Unauthed user requests approval from device; Approving device does NOT have a masterKey in memory.
Unauthed user clicks "Login with device" > navigates to
/login-with-device
which creates a StandardAuthRequest > receives approval from a device with authRequestPublicKey(userKey) > decrypts userKey > proceeds to vaultNote: this flow is an uncommon scenario and relates to TDE off-boarding. The following describes how a user could get into this flow:
Flow 3: Authed SSO TD user requests approval from device; Approving device has a masterKey in memory.
/login-initiated
> clicks "Approve from your other device" > navigates to/login-with-device
which creates a StandardAuthRequest > receives approval from device with authRequestPublicKey(masterKey) > decrypts masterKey > decrypts userKey > establishes trust (if required) > proceeds to vaultFlow 4: Authed SSO TD user requests approval from device; Approving device does NOT have a masterKey in memory.
/login-initiated
> clicks "Approve from your other device" > navigates to/login-with-device
which creates a StandardAuthRequest > receives approval from device with authRequestPublicKey(userKey) > decrypts userKey > establishes trust (if required) > proceeds to vaultAdmin Auth Request Flow
Flow: Authed SSO TD user requests admin approval.
/login-initiated
> clicks "Request admin approval" > navigates to/admin-approval-requested
which creates an AdminAuthRequest > receives approval from device with authRequestPublicKey(userKey) > decrypts userKey > establishes trust (if required) > proceeds to vaultSummary Table
[active route]
[/login]
/login-with-device
[/login]
/login-with-device
[/login-initiated]
/login-with-device
[/login-initiated]
/login-with-device
[/login-initiated]
/admin-approval-requested
Note 1: The phrase "in memory" here is important. It is possible for a user to have a master password for their account, but not have a masterKey IN MEMORY for a specific device. For example, if a user registers an account with a master password, then joins an SSO TD org, then logs in to a device via SSO and admin auth request, they are now logged into that device but that device does not have masterKey IN MEMORY.
📸 Screenshots
Standard Auth Request Flow 1
Unauthed user requests approval from device; Approving device has a
masterKey
in memory.standard-flow-1.mov
Standard Auth Request Flow 2
Unauthed user requests approval from device; Approving device does NOT have a
masterKey
in memory.Note: this flow is an uncommon scenario and relates to TDE off-boarding. The following describes how a user could get into this flow:
masterKey
in memory.2a. Changes the member decryption options from "Trusted devices" to "Master password" AND
2b. Turns off the "Require single sign-on authentication" policy
masterKey
in memory (see step 1 above).standard-flow-2.mov
Standard Auth Request Flow 3
Authed SSO TD user requests approval from device; Approving device has a
masterKey
in memory.standard-flow-3.mov
Standard Auth Request Flow 4
Authed SSO TD user requests approval from device; Approving device does NOT have a
masterKey
in memory.standard-flow-4.mov
Admin Auth Request Flow
Authed SSO TD user requests admin approval.
(In the screencast, at the end there is a console.log that says "Admin Auth Request 2". Ignore the "2". It's just the Admin Auth Request Flow.)
admin-flow-2.mov
⏰ Reminders before review
🦮 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