-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[PM-28264] Consolidate and update the UI for key connector migration/confirmation #17642
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
base: main
Are you sure you want to change the base?
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #17642 +/- ##
==========================================
+ Coverage 41.70% 41.72% +0.02%
==========================================
Files 3571 3571
Lines 103817 103837 +20
Branches 15605 15608 +3
==========================================
+ Hits 43294 43326 +32
+ Misses 58688 58676 -12
Partials 1835 1835 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Claude finished @Thomas-Avery's task —— View job Code Review Complete ✅Tasks
Review SummaryOverall Assessment: ✅ APPROVE This PR successfully consolidates three platform-specific Key Strengths👍 Component Consolidation Done Right
👍 Security & Data Handling
👍 Backward Compatibility
Review Feedback❓ QUESTION: Test coverage for error scenarios in API service The While the component-level tests ( Current component handling looks correct - it catches errors and continues with 🎨 SUGGESTED: Consider consolidating duplicate tooltip implementation Both
<button
type="button"
[label]="'keyConnectorDomainTooltip' | i18n"
tooltipPosition="above-center"
bitIconButton="bwi-info-circle"
size="small"
></button>Consider extracting this into a reusable component or template reference to maintain consistency. However, given these are the only two uses and the code is simple, current duplication is acceptable. 🎨 SUGGESTED: Add error test case for non-ErrorResponse errors In For consistency and completeness, consider adding a test case for Current test coverage is adequate, but this would improve consistency. ❓ QUESTION: Backward compatibility handling for PM-29133 cleanup
// PM-29133 Remove during cleanup.
if (this.organizationName == undefined) {
this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({
pageTitle: { key: "verifyYourDomainToLogin" },
});
}Is there a tracking task PM-29133 to remove this backward compatibility code once minimum server version requirements are updated? The fallback behavior is well-implemented with appropriate logging. 🎨 SUGGESTED: Enhance API service error handling documentation
Consider adding JSDoc comments to clarify the API contract: /**
* Fetches key connector confirmation details for an organization.
* Requires authentication.
* @param orgSsoIdentifier - Organization SSO identifier (will be URL-encoded)
* @returns Organization details including name
* @throws Will throw if API endpoint doesn't exist (older servers) or network error occurs
*/
async getConfirmationDetails(
orgSsoIdentifier: string,
): Promise<KeyConnectorConfirmationDetailsResponse> {ConclusionThe PR is well-implemented with good test coverage and proper handling of edge cases. The component consolidation successfully reduces code duplication while maintaining functionality across all platforms. The suggestions above are minor improvements that don't block approval. Recommendation: ✅ Approve |
libs/key-management-ui/src/key-connector/remove-password.component.html
Outdated
Show resolved
Hide resolved
libs/common/src/key-management/key-connector/services/default-key-connector-api.service.ts
Show resolved
Hide resolved
libs/key-management-ui/src/key-connector/confirm-key-connector-domain.component.ts
Show resolved
Hide resolved
JaredSnider-Bitwarden
left a comment
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.
Approving auth single test file change without reviewing rest of PR.
coroiu
left a comment
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.
Cleaning up loose components, nice 👍
libs/key-management-ui/src/key-connector/confirm-key-connector-domain.component.ts
Show resolved
Hide resolved
quexten
left a comment
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.
Approving, but i've put a request for a follow-up ticket. Preferably it is linked directly here in the code.
7890c14
|
Updated all screenshots with the latest changes. |
coroiu
left a comment
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.
No platform change since last review, approving
quexten
left a comment
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.
Approving but there is merge conflicts. Please ping for re-approval.
5de86cc

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-28264
📔 Objective
The objective is to:
RemovePasswordComponentinto one shared HTML and angular component.Requires the server PR bitwarden/server#6635 for fetching the key connector confirmation details.
Team reviewer notes:
Auth team
Had to update a unit test because of adding a new property to
KeyConnectorDomainConfirmation.📸 Screenshots
Expand sections to see before and after.
Confirm key connector
The UI showed to new SSO users being setup for a Key connector organization.
Web
Before

After
Browser extension
Before

After
Desktop
Before

After
Remove master password
Converts a pre-existing master password user to a key connector user.
Web
Before

After
Browser extension
Before

After
Desktop
Before

After

Tooltip
Edge case handling
For the key connector confirmation there is a possibility for a new client to be using an old self host server that can't provide the key connector confirmation details. If this edge case occurs the new client will still work but won't display the organization data.
⏰ 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