Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

[PS-74] Fix user authentication state checks #721

Merged
merged 24 commits into from
Apr 29, 2022
Merged

[PS-74] Fix user authentication state checks #721

merged 24 commits into from
Apr 29, 2022

Conversation

eliykat
Copy link
Member

@eliykat eliykat commented Mar 14, 2022

Type of change

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

Objective

Fix #1557

Fix LockGuardService allowing access to the lock page when the user is actually logged out:

image (4)

Steps to reproduce: navigate to <vault URL>/#/lock when logged out.

Code changes

Currently, vaultTimeoutService.isLocked() returns true if the user is logged out OR if the vault is locked, and it's the caller's responsibility to check both those states in the correct order. That is, you have to do await stateService.getIsAuthenticated() && await vaultTimeoutService.isLocked() to know if the vault is actually locked.

#600 caused this regression by removing the getIsAuthenticated check, assuming - reasonably - that it was redundant.

Rather than restore the original code in LockGuardService, we should make vaultTimeoutService.isLocked() only return true if the vault is actually locked (and not just logged out).

I'll need to do a sweep of each client when updating jslib, to make sure this won't break existing logic anywhere else.

Testing requirements

Confirm bug is fixed.

Before you submit

  • I have checked for linting errors (npm run lint) (required)
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

@eliykat eliykat requested a review from a team March 14, 2022 04:05
@eliykat
Copy link
Member Author

eliykat commented Mar 14, 2022

Another option is to have a VaultState enum that has values for logged out, locked, or unlocked - making it clear that these are 3 mutually exclusive states and providing a single interface to get the state, whatever it is. I'm not sure that's worth doing, but I'm floating the idea here it in case the reviewer thinks it is worth doing.

@cscharf
Copy link
Contributor

cscharf commented Mar 15, 2022

Another option is to have a VaultState enum that has values for logged out, locked, or unlocked - making it clear that these are 3 mutually exclusive states and providing a single interface to get the state, whatever it is. I'm not sure that's worth doing, but I'm floating the idea here it in case the reviewer thinks it is worth doing.

I think this may be worth doing.

@mpbw2
Copy link
Contributor

mpbw2 commented Mar 15, 2022

Another option is to have a VaultState enum that has values for logged out, locked, or unlocked - making it clear that these are 3 mutually exclusive states and providing a single interface to get the state, whatever it is.

Just FYI: https://github.com/bitwarden/jslib/blob/master/common/src/enums/authenticationStatus.ts

@eliykat
Copy link
Member Author

eliykat commented Mar 15, 2022

Thanks both! I'll do this.

@eliykat eliykat marked this pull request as draft March 22, 2022 01:43
@eliykat eliykat marked this pull request as ready for review March 22, 2022 02:28
@eliykat eliykat changed the title Fix: isLocked should return false if not logged in Fix user authentication state checks Mar 22, 2022
@eliykat eliykat marked this pull request as draft March 22, 2022 03:28
@eliykat eliykat removed the request for review from a team March 22, 2022 03:28
@eliykat eliykat marked this pull request as ready for review March 29, 2022 03:45
@eliykat
Copy link
Member Author

eliykat commented Mar 29, 2022

Further additional changes after the feedback above:

  • add new method, authService.authStatus(userId?: string). This will return the AuthenticationStatus enum reflecting the state of the account.
  • remove vaultTimeoutService.isLocked, which is now deprecated
  • unfortunately we can't remove stateService.getIsAuthenticated because it's required internally for stateService's own use. We can't move it to authService because that'll create a circular dependency. And we can't move authStatus into stateService, because that will also create a circular dependency with cryptoService. 😞 So I've left this in place as a lower-level method.
  • change AuthenticationStatus to be a regular (number) enum, not a string enum. No reason to do string comparisons every time we want to check it, also this lets us use < and > which I think is neat.
  • remove the AuthenticationStatus.active value. Now that we're using this enum in other contexts, this is confusing, because an account can be active/inactive and also unlocked. It turns out we weren't really using this value anyway, so it's safe to clean up.
  • update all services etc. to use the new interface.

Related desktop PR: bitwarden/desktop#1464
That's the main client affected by this and should be reviewed in conjunction with this one.

Overall this still isn't perfect, it makes the checks more verbose in some places and less verbose in others, but on balance I still think it's an improvement and should hopefully avoid this regression popping up again.

@eliykat eliykat requested a review from a team March 29, 2022 04:01
@eliykat eliykat changed the title Fix user authentication state checks [PS-74] Fix user authentication state checks Mar 29, 2022
Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

@eliykat The code changes look fine, besides the things I commented on and some general questions/concerns

The heavy use of authStatus, does change the amount of work to be done in some parts.

For example authStatus() not only replaces stateService.getIsAuthenticated() but also vaultTimeoutService.isLocked(). Which means when a user is logged in, we always check for the lock state of the vault, even if the calling code only wants to know if a user is authed.

The same goes for vaultTimeoutService.isLocked(), which now always checks if the user is authed, which I guess is generally a good thing, just means as that method gets called often, it also does more than before.

In the first case it might be better to offer a authService.sAuthed() instead of authService.getAuthStatus() which also checks additional state.

angular/src/services/lock-guard.service.ts Outdated Show resolved Hide resolved
@@ -157,6 +159,31 @@ export class AuthService implements AuthServiceAbstraction {
return this.logInStrategy instanceof PasswordLogInStrategy;
}

async authStatus(userId?: string): Promise<AuthenticationStatus> {
Copy link
Contributor

Choose a reason for hiding this comment

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

As this a method and not a property/field of a class, I'd prefer having a name indicating what it's doing. getAuthState/retrieveAuthState

Similiar to the 'authing'-methods above. As they are returning booleans, they should maybe be renamed to isAuthingWithPassword

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed to getAuthState.

I think the 'authing' methods are clear enough, I don't really want to mess with them in this PR.

@eliykat
Copy link
Member Author

eliykat commented Mar 31, 2022

You raise some good points about performance.

It's okay that we check whether the user is authenticated when getting lock status - that's required to get an accurate answer. But I agree that the reverse (checking lock status when asking if the user is authenticated) is unnecessary.

How about we just leave all the stateService.getIsAuthenticated calls in place, and only use the new authService.authStatus:

  • as a replacement for vaultTimeoutService.isLocked()
  • where we want to know about both, e.g. as a replacement for isAuthed && isUnlocked, or routing guards where we want to take different actions based on status

Using the new method felt a bit cumbersome in some places, that might be a better balance.

@djsmith85
Copy link
Contributor

You raise some good points about performance.

It's okay that we check whether the user is authenticated when getting lock status - that's required to get an accurate answer. But I agree that the reverse (checking lock status when asking if the user is authenticated) is unnecessary.

How about we just leave all the stateService.getIsAuthenticated calls in place, and only use the new authService.authStatus:

  • as a replacement for vaultTimeoutService.isLocked()
  • where we want to know about both, e.g. as a replacement for isAuthed && isUnlocked, or routing guards where we want to take different actions based on status

Using the new method felt a bit cumbersome in some places, that might be a better balance.

That sounds like a good approach to go forward with.

@eliykat
Copy link
Member Author

eliykat commented Apr 9, 2022

These changes have been made.

@eliykat eliykat requested a review from djsmith85 April 9, 2022 22:57
@eliykat eliykat added hold Do not merge, do not approve yet and removed hold Do not merge, do not approve yet labels Apr 9, 2022
djsmith85
djsmith85 previously approved these changes Apr 22, 2022
Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

@eliykat Sorry for the delay on this. This is looking good now.

@eliykat
Copy link
Member Author

eliykat commented Apr 28, 2022

Had to resolve conflicts @djsmith85

@eliykat eliykat merged commit 2e2849b into master Apr 29, 2022
@eliykat eliykat deleted the fix/is-locked branch April 29, 2022 11:33
MGibson1 added a commit that referenced this pull request May 10, 2022
* Remove keytar and biometric logic (#706)

* [bug] CL - fix default button display and callout header class (#756)

* [EC-142] Fix error during import of 1pux containing new email field format (#758)

* Add support for complex email field type

* Ensure complex email field type gets imported on identities

* Update introduction for CL (#729)

* Add jsdoc comments for user verification, password reprompt, and appApiAction (#754)

* Rename and add comments to clarify password reprompt classes

* Add comment for appApiAction

* copy default options (#764)

* Update jest configs to remove roots (#766)

* Remove support for alreadyEncrypted (#762)

* Add tests for domain models (#768)

* Fix language always defaulting to english (#765)

* Rename Export DTOs (#763)

* [BEEEP] Allow linking to ciphers (#760)

* Remove userId from data models (#771)

* Add reorganization notice (#776)

* Add reorganization notice

* [BEEEP] Add banner component (#759)

* [EC-159] [BEEEP] Remove factory providers in Angular DI (#775)

* Forwarded email alias generation (#772)

* generate forwarded alias with SL and AD

* added forwarded email to type list

* add ApiService dep

* ApiServiceAbstraction

* use proper status codes

* only generate on button press

* reset username to `-`

* reset username when forwarded

* Authorization header for anonaddy

* use proper anonaddy json path

* firefox relay support

* update description for firefox

* log username generation errors

* PS-302 Added DeviceId to the 2FA email request and set it when calling the endpoint that's needed to see if it's a 2FA email because of a new device (#782)

* [EC-154] [BEEEP] Add token for localesDirectory (#783)

* Add token for localesDirectory

* Add token for SYSTEM_LANGUAGE

* [PS-74] Fix user authentication state checks (#721)

* Create authService.authStatus, refactor isLocked checks

* Rename authStatus -> getAuthStatus

* [CP-30] Added creditCardNumber pipe for viewing saved card numbers properly (#590)

Co-authored-by: Hinton <oscar@oscarhinton.com>

* Fix linting (#789)

* fix default forwardedService property name (#788)

* Stop clearing list on every reload (#784)

* [EC-151] Hide Subscription/Billing information for Provider-managed organizations (#777)

* add canManageBilling permission and hasProvider helper method

* [feat] End User Vault Refresh (#790)

* Move access logic to org model (#713)

* [feature] Allow for top level groupings to be collapsed (#712)

* [End User Vault Refresh] Refactor route permission checking (#727)

* Update admin access logic

* Centralize route permission handling

* Add permission check for disabled orgs

* [EndUserVaultRefresh] Add base routing guard (#732)

* Add a base class for Angular routing guards

* Update Guard naming convention

* Bump node-forge to 1.2.1 (#722)

* Remove Internet Explorer logic (#723)

* Username generator (#734)

* add support for username generation

* remove unused Router

* pr feedback

* Bump electron and related dependencies (#736)

* PS-91 make isMacAppStore return true/false (#735)

* return false if undefined from isMacAppStore

* PS-91 use strict equality instead of null coalescing

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>

* [bug] Fix Safari CSV importer for URL and Notes (#730)

* Fix import path for safari importer (#740)

* Force updates to be silent (#739)

* support for username gen website setting (#738)

* Fix jslibModule forms (#742)

* Add DatePipe provider to JslibModule (#741)

* Feature/move to jest (#744)

* Switch to jest

* Fix jslib-angular package name

* Make angular test project

* Split up tests by jslib project

* Remove obsolete node test script

* Use legacy deps with jest-preset-angular

* Move web tests to common

* Remove build from pipeline

This was only being used because we were not using ts runners.
We are now, so build is unnecessary

* Remove the VerifyMasterPasswordComponent from jslib module (#747)

* Add ellipsis pipe to jslib module (#746)

* add ellipsis pipe to jslib module

* Add ellipsis pipe to exports

* Add ColorPasswordCountPipe to JslibModule (#751)

* Generator cleanup (#753)

* type is null by default

* rename generator component

* remove showWebsiteOption

* shorthand if check

* EC-134 Fix api token refresh (#749)

* Fix apikey token refresh

* Refactor: use class for TokenRequestTwoFactor

* Remove keytar and biometric logic (#706)

* [bug] CL - fix default button display and callout header class (#756)

* [EC-142] Fix error during import of 1pux containing new email field format (#758)

* Add support for complex email field type

* Ensure complex email field type gets imported on identities

* [euvr] Separate Billing Payment/History APIs (#750)

* [euvr] Separate Billing Payment/History APIs

* Updated to new accounts billing API

* Removed getUserBilling as it will become obsolete once merged

* [end user vault refresh] Base Changes For Vault Filters (#737)

* [dependency] Update icons

* Avoid duplicate fullSync api calls (#716)

* Tweak component library slightly (#715)

* Check runtime name vs mangled name (#724)

* Add Chromatic (#719)

* Update SECURITY.md (#725)

* Update SECURITY.md

Add link to our HackerOne program for submitting potential security issues.

* Revise language on SECURITY.md

* Remove error Response type check (#731)

* Remove error Response type check

Minimization is impacting type checking in a non-consistent way.
The previous type check works locally,
but not from build artifacts 🤷. We only set `captchaRequired` on
our errors when we want a resubmit with captcha included, so we're safe
keying off that

* linter

* [JslibModule] Add JslibModule (#733)

* Add ellipsis pipe (#728)

* add ellipsis pipe

* run prettier

* Account for ellipsis length in returned string

* Fix complete words case

* Fix another complete words issue

* fix for if there are not spaces in long value

* extract length check to beginning of method

* condense if statements

* remove log

* [refactor] Add optional folders param to folderService.getAllNested()

This will be used later for use cases where the vault filters service needs to build a list of nested folders that have been filtered by organization

* [feature] Add organization filters

This is an MVP implementation of the changes needed for the vault refresh. This includes collapsable top level groupings, and organization based filters that dynamically adjust folders and collections.

* [refactor] Break down vault filter into several components

These changes rename and rewrite the GroupingsComponent into a VaultFiltersModule. The module follows typical angular patterns for structure and purpose, and contain components for each filter type. The mostly communicate via Input and Output, and depend on a VaultFilterService for sending and recieving data from other parts of the product.

* [bug] Add missing events for folder add/edit

* [refactor] Dont directly change activeFilter in VaultFilterComponent

* [refactor] Move DisplayMode to a dedicated file

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>

* [CL-16 Component Library] Menu Dropdown (#761)

* [bug] Add missing null check in vault filters (#769)

* [bug] Add @Injectable to VaultFilterService (#781)

* [fix] Ran prettier

* [fix] Fix merge issue

I used createUrlTree when merging guards because I knew that was the angular standard, didn't notice that redirect was a helper method from us

* Remove BaseGuard (#791)

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: David Frankel <42774874+frankeld@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>

* [EC-192] Use ts-jest instead of deprecated ts-jest/utils (#792)

* [SG-230] “All Items” and “Trash” missing from Organization Vault (#795)

Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
Co-authored-by: Anthony Garera <gareraanthony@gmail.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Addison Beck <addisonbeck1@gmail.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: David Frankel <42774874+frankeld@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>
MGibson1 added a commit that referenced this pull request May 10, 2022
* Billing Sync Api Keys / Free Bitwarden Families Page updates (#767)

* Work on billing sync api key maintenance

* Add sync status call

* Work on sync status copy

* Return actual model

* Update api calls/models

* Fix linting

* Run linting

* Add in notAllowedValueAsync.validator.ts (#774)

* Add in notAllowedValueAsync.validator.ts

* Fix lint error

* Run prettier

* [PS-248] Feature/manage billing sync connection (#770)

* Define org connection request and responses

* Add organization connection API CRUD

* Linter fixes

* Handle create vs update in component

* PR feedback

* Remove unused import

* Linter fixes

* Use self hosted endpoints for f4e (#779)

* Use self hosted endpoints for f4e

* Call the method

* Chore/merge/self hosted families for enterprise (#778)

* Remove keytar and biometric logic (#706)

* [bug] CL - fix default button display and callout header class (#756)

* [EC-142] Fix error during import of 1pux containing new email field format (#758)

* Add support for complex email field type

* Ensure complex email field type gets imported on identities

* Update introduction for CL (#729)

* Add jsdoc comments for user verification, password reprompt, and appApiAction (#754)

* Rename and add comments to clarify password reprompt classes

* Add comment for appApiAction

* copy default options (#764)

* Update jest configs to remove roots (#766)

* Remove support for alreadyEncrypted (#762)

* Add tests for domain models (#768)

* Fix language always defaulting to english (#765)

* Rename Export DTOs (#763)

* [BEEEP] Allow linking to ciphers (#760)

* Remove userId from data models (#771)

* Add reorganization notice (#776)

* Add reorganization notice

* [BEEEP] Add banner component (#759)

Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>

* Chore/merge/self hosted families for enterprise (#796)

* Remove keytar and biometric logic (#706)

* [bug] CL - fix default button display and callout header class (#756)

* [EC-142] Fix error during import of 1pux containing new email field format (#758)

* Add support for complex email field type

* Ensure complex email field type gets imported on identities

* Update introduction for CL (#729)

* Add jsdoc comments for user verification, password reprompt, and appApiAction (#754)

* Rename and add comments to clarify password reprompt classes

* Add comment for appApiAction

* copy default options (#764)

* Update jest configs to remove roots (#766)

* Remove support for alreadyEncrypted (#762)

* Add tests for domain models (#768)

* Fix language always defaulting to english (#765)

* Rename Export DTOs (#763)

* [BEEEP] Allow linking to ciphers (#760)

* Remove userId from data models (#771)

* Add reorganization notice (#776)

* Add reorganization notice

* [BEEEP] Add banner component (#759)

* [EC-159] [BEEEP] Remove factory providers in Angular DI (#775)

* Forwarded email alias generation (#772)

* generate forwarded alias with SL and AD

* added forwarded email to type list

* add ApiService dep

* ApiServiceAbstraction

* use proper status codes

* only generate on button press

* reset username to `-`

* reset username when forwarded

* Authorization header for anonaddy

* use proper anonaddy json path

* firefox relay support

* update description for firefox

* log username generation errors

* PS-302 Added DeviceId to the 2FA email request and set it when calling the endpoint that's needed to see if it's a 2FA email because of a new device (#782)

* [EC-154] [BEEEP] Add token for localesDirectory (#783)

* Add token for localesDirectory

* Add token for SYSTEM_LANGUAGE

* [PS-74] Fix user authentication state checks (#721)

* Create authService.authStatus, refactor isLocked checks

* Rename authStatus -> getAuthStatus

* [CP-30] Added creditCardNumber pipe for viewing saved card numbers properly (#590)

Co-authored-by: Hinton <oscar@oscarhinton.com>

* Fix linting (#789)

* fix default forwardedService property name (#788)

* Stop clearing list on every reload (#784)

* [EC-151] Hide Subscription/Billing information for Provider-managed organizations (#777)

* add canManageBilling permission and hasProvider helper method

* [feat] End User Vault Refresh (#790)

* Move access logic to org model (#713)

* [feature] Allow for top level groupings to be collapsed (#712)

* [End User Vault Refresh] Refactor route permission checking (#727)

* Update admin access logic

* Centralize route permission handling

* Add permission check for disabled orgs

* [EndUserVaultRefresh] Add base routing guard (#732)

* Add a base class for Angular routing guards

* Update Guard naming convention

* Bump node-forge to 1.2.1 (#722)

* Remove Internet Explorer logic (#723)

* Username generator (#734)

* add support for username generation

* remove unused Router

* pr feedback

* Bump electron and related dependencies (#736)

* PS-91 make isMacAppStore return true/false (#735)

* return false if undefined from isMacAppStore

* PS-91 use strict equality instead of null coalescing

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>

Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>

* [bug] Fix Safari CSV importer for URL and Notes (#730)

* Fix import path for safari importer (#740)

* Force updates to be silent (#739)

* support for username gen website setting (#738)

* Fix jslibModule forms (#742)

* Add DatePipe provider to JslibModule (#741)

* Feature/move to jest (#744)

* Switch to jest

* Fix jslib-angular package name

* Make angular test project

* Split up tests by jslib project

* Remove obsolete node test script

* Use legacy deps with jest-preset-angular

* Move web tests to common

* Remove build from pipeline

This was only being used because we were not using ts runners.
We are now, so build is unnecessary

* Remove the VerifyMasterPasswordComponent from jslib module (#747)

* Add ellipsis pipe to jslib module (#746)

* add ellipsis pipe to jslib module

* Add ellipsis pipe to exports

* Add ColorPasswordCountPipe to JslibModule (#751)

* Generator cleanup (#753)

* type is null by default

* rename generator component

* remove showWebsiteOption

* shorthand if check

* EC-134 Fix api token refresh (#749)

* Fix apikey token refresh

* Refactor: use class for TokenRequestTwoFactor

* Remove keytar and biometric logic (#706)

* [bug] CL - fix default button display and callout header class (#756)

* [EC-142] Fix error during import of 1pux containing new email field format (#758)

* Add support for complex email field type

* Ensure complex email field type gets imported on identities

* [euvr] Separate Billing Payment/History APIs (#750)

* [euvr] Separate Billing Payment/History APIs

* Updated to new accounts billing API

* Removed getUserBilling as it will become obsolete once merged

* [end user vault refresh] Base Changes For Vault Filters (#737)

* [dependency] Update icons

* Avoid duplicate fullSync api calls (#716)

* Tweak component library slightly (#715)

* Check runtime name vs mangled name (#724)

* Add Chromatic (#719)

* Update SECURITY.md (#725)

* Update SECURITY.md

Add link to our HackerOne program for submitting potential security issues.

* Revise language on SECURITY.md

* Remove error Response type check (#731)

* Remove error Response type check

Minimization is impacting type checking in a non-consistent way.
The previous type check works locally,
but not from build artifacts 🤷. We only set `captchaRequired` on
our errors when we want a resubmit with captcha included, so we're safe
keying off that

* linter

* [JslibModule] Add JslibModule (#733)

* Add ellipsis pipe (#728)

* add ellipsis pipe

* run prettier

* Account for ellipsis length in returned string

* Fix complete words case

* Fix another complete words issue

* fix for if there are not spaces in long value

* extract length check to beginning of method

* condense if statements

* remove log

* [refactor] Add optional folders param to folderService.getAllNested()

This will be used later for use cases where the vault filters service needs to build a list of nested folders that have been filtered by organization

* [feature] Add organization filters

This is an MVP implementation of the changes needed for the vault refresh. This includes collapsable top level groupings, and organization based filters that dynamically adjust folders and collections.

* [refactor] Break down vault filter into several components

These changes rename and rewrite the GroupingsComponent into a VaultFiltersModule. The module follows typical angular patterns for structure and purpose, and contain components for each filter type. The mostly communicate via Input and Output, and depend on a VaultFilterService for sending and recieving data from other parts of the product.

* [bug] Add missing events for folder add/edit

* [refactor] Dont directly change activeFilter in VaultFilterComponent

* [refactor] Move DisplayMode to a dedicated file

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>

* [CL-16 Component Library] Menu Dropdown (#761)

* [bug] Add missing null check in vault filters (#769)

* [bug] Add @Injectable to VaultFilterService (#781)

* [fix] Ran prettier

* [fix] Fix merge issue

I used createUrlTree when merging guards because I knew that was the angular standard, didn't notice that redirect was a helper method from us

* Remove BaseGuard (#791)

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: David Frankel <42774874+frankeld@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>

* [EC-192] Use ts-jest instead of deprecated ts-jest/utils (#792)

* [SG-230] “All Items” and “Trash” missing from Organization Vault (#795)

Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
Co-authored-by: Anthony Garera <gareraanthony@gmail.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Addison Beck <addisonbeck1@gmail.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: David Frankel <42774874+frankeld@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>

Co-authored-by: Justin Baur <admin@justinbaur.com>
Co-authored-by: Justin Baur <136baur@gmail.com>
Co-authored-by: Oscar Hinton <oscar@oscarhinton.com>
Co-authored-by: Vincent Salucci <26154748+vincentsalucci@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Federico Maccaroni <fedemkr@gmail.com>
Co-authored-by: Anthony Garera <gareraanthony@gmail.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Addison Beck <addisonbeck1@gmail.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
Co-authored-by: David Frankel <42774874+frankeld@users.noreply.github.com>
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
Co-authored-by: Vincent Salucci <vincesalucci21@gmail.com>
@eliykat eliykat mentioned this pull request May 12, 2022
8 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logged in as _$1_ on bitwarden.com.
4 participants