-
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-13452] - add password health raw data component #11519
Conversation
New Issues
|
const result = this.passwordStrengthService.getPasswordStrength( | ||
login.password, | ||
null, | ||
userInput.length > 0 ? userInput : null, | ||
); | ||
this.passwordStrengthCache.set(cacheKey, result.score); | ||
} | ||
const score = this.passwordStrengthCache.get(cacheKey); | ||
|
||
if (score != null && score <= 2) { | ||
this.passwordStrengthMap.set(id, this.scoreKey(score)); | ||
this.weakPasswordCiphers.push(ciph); | ||
} |
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.
Please have a look at the most recent version of the weak-password-report and how it handles adding the score to the ResultRow.
It simplifies the storage and removes the need for passwordStrengthCache and passwordStrengthMap.
Similar work has also been done on the exposed-password-report
const promise = this.auditService.passwordLeaked(login.password).then((exposedCount) => { | ||
if (exposedCount > 0) { | ||
this.exposedPasswordCiphers.push(ciph); | ||
this.exposedPasswordMap.set(id, exposedCount); | ||
if (!this.reportCipherIds.includes(ciph.id)) { | ||
this.reportCipherIds.push(ciph.id); | ||
this.reportCiphers.push(ciph); | ||
} | ||
} | ||
}); | ||
promises.push(promise); |
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.
Please have a look at the most recent version of the exposed-password-report. It removes the need for the exposedPasswordMap and the lookup from the markup.
apps/web/src/app/tools/access-intelligence/password-health.component.ts
Outdated
Show resolved
Hide resolved
apps/web/src/app/tools/access-intelligence/password-health.component.html
Outdated
Show resolved
Hide resolved
apps/web/src/app/tools/access-intelligence/password-health.component.html
Outdated
Show resolved
Hide resolved
apps/web/src/app/tools/access-intelligence/password-health.component.html
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11519 +/- ##
==========================================
+ Coverage 33.16% 33.20% +0.03%
==========================================
Files 2779 2780 +1
Lines 86225 86398 +173
Branches 16420 16465 +45
==========================================
+ Hits 28597 28688 +91
- Misses 55362 55425 +63
- Partials 2266 2285 +19 ☔ View full report in Codecov by Sentry. |
TableModule, | ||
], | ||
}) | ||
export class PasswordHealthComponent extends CipherReportComponent implements OnInit { |
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.
This component does not need to extend CipherReportComponent. This will clean-up the dependencies in the ctor.
- Within ngOnInit we'll need to get the organizationId from the route
- The
dataSource
fromCipherReportComponent
will need to be moved into this component - As there is no organization filter toggle above the table, as there is only one organization in the current context, the call to
this.filterCiphersByOrg(this.reportCiphers);
can be replaced withthis.dataSource.data = this.reportCiphers
getAllCiphers
will need to be replaced with a call to returnthis.cipherService.getAllFromApiForOrganization(this.organization.id);
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.
The changes under reports/pages don't seem to be relevant to the password-health.component
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.
this.organizationService.organizations$.pipe(takeUntilDestroyed()).subscribe((orgs) => { | ||
this.organization = orgs[0]; | ||
}); |
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.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-13452
📔 Objective
This PR adds the health report raw data component to the access intelligence page. This is part 1 of 3 of a progressively more complete version of the password health report.
📸 Screenshots
⏰ 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