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

[PM-5499] auth request service migrations #8597

Merged
merged 9 commits into from
Apr 15, 2024

Conversation

jlf0dev
Copy link
Member

@jlf0dev jlf0dev commented Apr 3, 2024

Type of change

- [ ] Bug fix
- [x] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Migrates adminAuthRequest and approveLoginRequests to the AuthRequestService.

Keeping the refactors small in this migration, but we obviously need to show the AuthRequestService a little love in the future.

Code changes

  • file.ext: Description of what was changed and why

Screenshots

Before you submit

  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
  • Ensure that all UI additions follow WCAG AA requirements

@jlf0dev jlf0dev requested review from a team as code owners April 3, 2024 14:36
@github-actions github-actions bot added the needs-qa Marks a PR as requiring QA approval label Apr 3, 2024
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 61.76471% with 39 lines in your changes are missing coverage. Please review.

Project coverage is 27.29%. Comparing base (c8f03a0) to head (a3386c8).

Files Patch % Lines
...uth/components/login-via-auth-request.component.ts 0.00% 11 Missing ⚠️
...mmon/services/auth-request/auth-request.service.ts 64.28% 10 Missing ⚠️
...pps/desktop/src/vault/app/vault/vault.component.ts 0.00% 7 Missing ⚠️
...pps/desktop/src/app/accounts/settings.component.ts 0.00% 5 Missing ⚠️
libs/common/src/services/notifications.service.ts 0.00% 4 Missing ⚠️
.../service-factories/auth-request-service.factory.ts 0.00% 1 Missing ⚠️
...ate-migrations/migrations/56-move-auth-requests.ts 97.05% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8597      +/-   ##
==========================================
+ Coverage   27.25%   27.29%   +0.04%     
==========================================
  Files        2340     2341       +1     
  Lines       68312    68363      +51     
  Branches    12768    12776       +8     
==========================================
+ Hits        18617    18663      +46     
- Misses      48294    48301       +7     
+ Partials     1401     1399       -2     

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

Copy link
Contributor

github-actions bot commented Apr 3, 2024

Logo
Checkmarx One – Scan Summary & Details96e556fe-e1ca-447e-9599-7f87595d3a2a

New Issues

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Angular_Improper_Type_Pipe_Usage /bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.html: 28 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /bitwarden_license/bit-web/src/app/admin-console/providers/setup/setup.component.html: 1 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/browser/src/vault/popup/components/fido2/fido2-use-browser-link.component.html: 1 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/web/src/app/billing/shared/adjust-storage.component.html: 27 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/web/src/app/billing/organizations/adjust-subscription.component.html: 54 Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/web/src/app/billing/organizations/adjust-subscription.component.html: 18 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/background/runtime.background.ts: 331 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/auth/popup/account-switching/account.component.ts: 12 Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/auth/popup/account-switching/account.component.ts: 12 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/auth/settings/two-factor-verify.component.html: 3 Attack Vector
MEDIUM Client_Privacy_Violation /libs/components/src/color-password/color-password.component.ts: 25 Attack Vector
MEDIUM Client_Privacy_Violation /libs/components/src/color-password/color-password.component.ts: 26 Attack Vector
MEDIUM Client_Privacy_Violation /apps/desktop/src/auth/lock.component.html: 32 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/auth/lock.component.html: 18 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/billing/shared/add-credit.component.ts: 80 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/billing/shared/add-credit.component.ts: 30 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/billing/shared/add-credit.component.ts: 135 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/billing/shared/add-credit.component.ts: 146 Attack Vector
MEDIUM Client_Privacy_Violation /apps/web/src/app/billing/shared/add-credit.component.ts: 70 Attack Vector
LOW Client_DOM_Open_Redirect /apps/desktop/src/auth/accessibility-cookie.component.html: 18 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/tools/popup/generator/password-generator-history.component.ts: 18 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/auth/popup/account-switching/account.component.ts: 25 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/auth/popup/login-via-auth-request.component.ts: 54 Attack Vector
LOW Client_DOM_Open_Redirect /apps/desktop/src/auth/login/login-via-auth-request.component.ts: 62 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/auth/popup/account-switching/current-account.component.ts: 31 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/auth/popup/login-via-auth-request.component.ts: 54 Attack Vector
LOW Client_DOM_Open_Redirect /apps/desktop/src/auth/login/login-via-auth-request.component.ts: 62 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/vault/popup/components/vault/password-history.component.ts: 21 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/vault/popup/components/vault/attachments.component.ts: 32 Attack Vector
LOW Client_DOM_Open_Redirect /apps/browser/src/popup/settings/premium.component.ts: 27 Attack Vector
LOW Client_Hardcoded_Domain /apps/web/src/app/billing/shared/payment.component.ts: 56 Attack Vector
LOW Client_Hardcoded_Domain /apps/web/src/app/billing/shared/payment.component.ts: 56 Attack Vector

LRNcardozoWDF
LRNcardozoWDF previously approved these changes Apr 3, 2024
coroiu
coroiu previously approved these changes Apr 4, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

🎨 suggestion: some of these names don't quite follow the unit test naming convention

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed! (I think)

@jlf0dev jlf0dev dismissed stale reviews from coroiu and LRNcardozoWDF via 902073e April 4, 2024 17:58
@jlf0dev jlf0dev removed the needs-qa Marks a PR as requiring QA approval label Apr 11, 2024
coroiu
coroiu previously approved these changes Apr 11, 2024
Copy link
Contributor

@coroiu coroiu left a comment

Choose a reason for hiding this comment

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

I haven't written any migrations myself yet, but from what I can see it looks ok

rr-bw
rr-bw previously approved these changes Apr 11, 2024
LRNcardozoWDF
LRNcardozoWDF previously approved these changes Apr 15, 2024
@jlf0dev jlf0dev dismissed stale reviews from LRNcardozoWDF and rr-bw via a3386c8 April 15, 2024 13:57
@jlf0dev jlf0dev merged commit 576431d into main Apr 15, 2024
61 of 62 checks passed
@jlf0dev jlf0dev deleted the auth/pm-5499/auth-request-service-migrations branch April 15, 2024 16:34
amorask-bitwarden pushed a commit that referenced this pull request Apr 16, 2024
* move auth request storage to service

* create migrations for auth requests

* fix tests

* fix browser

* fix login strategy

* update migration

* use correct test descriptions in migration
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.

None yet

4 participants