-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Auth/PM-26745 - Rename SSO management component to SsoManageComponent to make SSO components distinct + Strict TS update #16893
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
Auth/PM-26745 - Rename SSO management component to SsoManageComponent to make SSO components distinct + Strict TS update #16893
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 #16893 +/- ##
==========================================
- Coverage 40.47% 40.46% -0.01%
==========================================
Files 3496 3496
Lines 99968 99983 +15
Branches 14981 14987 +6
==========================================
+ Hits 40462 40463 +1
- Misses 57790 57805 +15
+ Partials 1716 1715 -1 โ View full report in Codecov by Sentry. ๐ New features to boost your workflow:
|
โฆsso-components-to-be-distinct + sso-manage.component merge conflict fixes
7fc2e3c
|
Claude finished @JaredSnider-Bitwarden's task โโ View job PR Review Complete โSummary of ChangesThis PR renames
๐ด Critical Issues1. Potential Runtime Error - Missing Null Check (sso-manage.component.ts:248-250)Location: this.ssoConfigForm
.get("configType")
?.valueChanges.pipe(takeUntil(this.destroy$))Issue: While you added optional chaining ( Solution: Either assert the control exists or handle the null case: const configTypeControl = this.ssoConfigForm.get("configType");
if (configTypeControl) {
configTypeControl.valueChanges.pipe(takeUntil(this.destroy$))
.subscribe((newType: SsoType) => {
// ... existing logic
});
}Or use 2. Same Issue with spSigningBehavior Subscription (sso-manage.component.ts:264-266)Location: this.samlForm
.get("spSigningBehavior")
?.valueChanges.pipe(takeUntil(this.destroy$))Issue: Same problem as above - potential runtime error if the control is unexpectedly null. Solution: Use direct control access or add null handling: const spSigningBehaviorControl = this.samlForm.get("spSigningBehavior");
if (spSigningBehaviorControl) {
spSigningBehaviorControl.valueChanges.pipe(takeUntil(this.destroy$))
.subscribe(() => this.samlForm.get("idpX509PublicCert")?.updateValueAndValidity());
}
|




๐๏ธ Tracking
https://bitwarden.atlassian.net/browse/PM-26745
๐ Objective
We have 2
SsoComponents today. One used for authentication and one where users configure their SSO setup. We should better distinguish between them by naming the setup/management componentSsoManageComponent. I elected to keep the other component asSsoComponentsince it is still clear without adding something likeSsoAuthComponentand it would also require renaming theSSOComponentServices. I also updated the component to meet Strict TS while I was in here.๐ธ Screenshots
PM-26745.-.Sso.manage.component.loads.works.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