* PM-7392 - EncryptSvc - add new method for detecting if a simple string is an enc string.
* PM-7392 - TokenSvc - add checks when setting and retrieving the access token to improve handling around the access token encryption.
* PM-7392 - (1) Clean up token svc (2) export access token key type for use in tests.
* PM-7392 - Get token svc tests passing; WIP more tests to come for new scenarios.
* PM-7392 - Access token secure storage to disk fallback WIP but mostly functional besides weird logout behavior.
* PM-7392 - Clean up unnecessary comment
* PM-7392 - TokenSvc - refresh token disk storage fallback
* PM-7392 - Fix token service tests in prep for adding tests for new scenarios.
* PM-7392 - TokenSvc tests - Test new setRefreshToken scenarios
* PM-7392 - TokenSvc - getRefreshToken should return null or a value - not undefined.
* PM-7392 - Fix test name.
* PM-7392 - TokenSvc tests - clean up test names that reference removed refresh token migrated flag.
* PM-7392 - getRefreshToken tests done.
* PM-7392 - Fix error quote
* PM-7392 - TokenSvc tests - setAccessToken new scenarios tested.
* PM-7392 - TokenSvc - getAccessToken - if secure storage errors add error to log.
* PM-7392 - TokenSvc tests - getAccessToken - all new scenarios tested
* PM-7392 - EncryptSvc - test new stringIsEncString method
* PM-7392 - Main.ts - fix circ dep issue.
* PM-7392 - Main.ts - remove comment.
* PM-7392 - Don't re-invent the wheel and simply use existing isSerializedEncString static method.
* PM-7392 - Enc String - (1) Add handling for Nan in parseEncryptedString (2) Added null handling to isSerializedEncString. (3) Plan to remove encrypt service implementation
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* PM-7392 - Remove encrypt service method
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* PM-7392 - Actually fix circ dep issues with Justin. Ty!
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
* PM-7392 - TokenSvc - update to use EncString instead of EncryptSvc + fix tests.
* PM-7392 - TokenSvc - (1) Remove test code (2) Refactor decryptAccessToken method to accept access token key and error on failure to pass required decryption key to method.
* PM-7392 - Per PR feedback and discussion, do not log the user out if hte refresh token cannot be found. This will allow users to continue to use the app until their access token expires and we will error on trying to refresh it. The app will then still work on a fresh login for 55 min.
* PM-7392 - API service - update doAuthRefresh error to clarify which token cannot be refreshed.
* PM-7392 - Fix SetRefreshToken case where a null input would incorrectly trigger a fallback to disk.
* PM-7392 - If the access token cannot be refreshed due to a missing refresh token or API keys, then surface an error to the user and log it so it isn't a silent failure + we get a log.
* PM-7392 - Fix CLI build errors
* PM-7392 - Per PR feedback, add missing tests (thank you Jake for writing these!)
Co-authored-by: Jake Fink <jfink@bitwarden.com>
* PM-7392 - Per PR feedback, update incorrect comment from 3 releases to 3 months.
* PM-7392 - Per PR feedback, remove links.
* PM-7392 - Per PR feedback, move tests to existing describe.
* PM-7392 - Per PR feedback, adjust all test names to match naming convention.
* PM-7392 - ApiService - refreshIdentityToken - log error before swallowing it so we have a record of it.
* PM-7392 - Fix copy for errorRefreshingAccessToken
* PM-7392 - Per PR feedback, move error handling toast responsibility to client specific app component logic reached via messaging.
* PM-7392 - Swap logout reason from enum to type.
* PM-7392 - ApiService - Stop using messaging to trigger toast to let user know about refresh access token errors; replace with client specific callback logic.
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* PM-7392 - Per PR feedback, adjust enc string changes and tests.
* PM-7392 - Rename file to be type from enum
* PM-7392 - ToastService - we need to await the activeToast.onHidden observable so return the activeToast from the showToast.
* PM-7392 - Desktop AppComp - cleanup messaging
* PM-7392 - Move Logout reason custom type to auth/common
* PM-7392 - WIP - Enhancing logout callback to consider the logout reason + move show toast logic into logout callback
* PM-7392 - Logout callback should simply pass along the LogoutReason instead of handling it - let each client's message listener handle it.
* PM-7392 - More replacements of expired with logoutReason
* PM-7392 - More expired to logoutReason replacements
* PM-7392 - Build new handlers for displaying the logout reason for desktop & web.
* PM-7392 - Revert ToastService changes
* PM-7392 - TokenSvc - Replace messageSender with logout callback per PR feedback.
* PM-7392 - Desktop App comp - replace toast usage with simple dialog to guarantee users will see the reason for them being logged out.
* PM-7392 - Web app comp - fix issue
* PM-7392 - Desktop App comp - don't show cancel btn on simple dialogs.
* PM-7392 - Desktop App comp - Don't open n simple dialogs.
* PM-7392 - Fix browser build
* PM-7392 - Remove logout reason from CLI as each logout call handles messaging on its own.
* PM-7392 - Previously, if a security stamp was invalid, the session was marked as expired. Restore that functionality.
* PM-7392 - Update sync service logoutCallback to include optional user id.
* PM-7392 - Clean up web app comp
* PM-7392 - Web - app comp - only handle actually possible web logout scenarios.
* PM-7392 - Browser Popup app comp - restore done logging out message functionality + add new default logout message
* PM-7392 - Add optional user id to logout callbacks.
* PM-7392 - Main.background.ts - add clarifying comment.
* PM-7392 - Per feedback, use danger simple dialog type for error.
* PM-7392 - Browser Popup - add comment clarifying expectation of seeing toasts.
* PM-7392 - Consolidate invalidSecurityStamp error handling
* PM-7392 - Per PR feedback, REFRESH_ACCESS_TOKEN_ERROR_CALLBACK can be completely sync. + Refactor to method in main.background.
* PM-7392 - Per PR feedback, use a named callback for refreshAccessTokenErrorCallback in CLI
* PM-7392 - Add TODO
* PM-7392 - Re-apply bw.ts changes to new service-container.
* PM-7392 - TokenSvc - tweak error message.
* PM-7392 - Fix test
* PM-7392 - Clean up merge conflict where I duplicated dependencies.
* PM-7392 - Per discussion with product, change default logout toast to be info
* PM-7392 - After merge, add new logout reason to sync service.
* PM-7392 - Remove default logout message per discussion with product since it isn't really visible on desktop or browser.
* PM-7392 - address PR feedback.
---------
Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Co-authored-by: Jake Fink <jfink@bitwarden.com>
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* add initial type filter
- use `bit-select` while the chip component is being developed
* get cipherTypes$ from service
- integrate with user settings
* initial add of folder selection
* initial add of vault selection
* initial add of collections filter
* update `VaultPopupListFilterService` to `VaultPopupListFiltersService`
* integrate hasFilterApplied$
* intermediate commit of integration to the filters component
* do not return the tree when the value is null
* return null when the updated option is null
* update vault-popup-list to conform to the chip select structure
* integration of bit-chip-select
* move "no folder" option to the end of the list
* show danger icon for deactivated organizations
* show deactivated warning when the filtered org is disabled
* update documentation
* use pascal case for constants
* store filter values as full objects rather than just id
- This allows secondary logic to be applied when filters are selected
* move filter form into service to be the source of truth
* fix tests after adding "jest-preset-angular/setup-jest"
* remove logic to have dynamic cipher type filters
* use ProductType enum
* invert conditional for less nesting
* prefer `decryptedCollections$` over getAllDecrypted
* update comments
* use a `filterFunction$` observable rather than having to pass filters back to the service
* fix children testing
* remove check for no folder
* reset filter form when filter component is destroyed
* add takeUntilDestroyed for organization valueChanges
* allow takeUntilDestroyed to use internal destroy ref
- The associated unit tests needed to be configured with TestBed rather than just `new Service()` for this to work
* use controls object for type safety
* [PM-6825] Add temporary vault page header
* [PM-6825] Expose cipherViews$ observable
* [PM-6825] Refactor getAllDecryptedForUrl to expose filter functionality for reuse
* [PM-6825] Introduce VaultPopupItemsService
* [PM-6825] Introduce initial VaultListItem and VaultListItemsContainer components
* [PM-6825] Add VaultListItems to VaultV2 component
* [PM-6825] Introduce autofill-vault-list-items.component to encapsulate autofill logic
* [PM-6825] Add temporary Vault icon
* [PM-6825] Add empty and no results states to Vault tab
* [PM-6825] Add unit tests for vault popup items service
* [PM-6825] Negate noFilteredResults placeholder
* [PM-6825] Cleanup new Vault components
* [PM-6825] Move new components into its own module
* [PM-6825] Fix missing button type
* [PM-6825] Add booleanAttribute to showAutofill input
* [PM-6825] Replace empty refresh BehaviorSubject with Subject
* [PM-6825] Combine *ngIfs for vault list items container
* [PM-6825] Use popup-section-header component
* [PM-6825] Use small variant for icon buttons
* [PM-6825] Use anchor tag for vault items
* [PM-6825] Consolidate vault-list-items-container to include list item component functionality directly
* [PM-6825] Add Tailwind classes to new Vault icon
* [PM-6825] Remove temporary header comment
* [PM-6825] Fix auto fill suggestion font size and padding
* [PM-6825] Use tailwind for vault icon styling
* [PM-6825] Add libs/angular to tailwind.config content
* [PM-6825] Cleanup missing i18n
* [PM-6825] Make VaultV2 standalone and cleanup Browser App module
* [PM-6825] Use explicit type annotation
* [PM-6825] Use property binding instead of interpolation
* refactor: move logic for products into a service
- This is in preparation for having having the navigation menu show products based off of the same logic.
* add extra small font size to tailwind config
* remove absolute positioning from toggle width component
- it now sits beneath the product switcher
* update product switcher to have UI details that are only shown in the navigation pane
* add navigation oriented product switcher
* integrate navigation product switcher into secrets manager
* integrate navigation product switcher into provider console
* integrate navigation product switcher into user layout
* integrate navigation product switcher into organizations
* add translation for "switch"
* hide active styles from navigation product switcher
* update storybook for product switcher stories
* remove unneeded full width style
* use protected readonly variable instead of getter
* migrate stories to CSF3
* remove double subscription to `moreProducts$`
* only use wrapping div in navigation switcher story
- less vertical space is taken up
* update to satisfies
* refactor `navigationUI` to `otherProductOverrides`
* move observables to protected readonly
* apply margin-top via class on the host component
* remove switch text from the navigation product switcher
* Allow for the active navigation switcher to be shown
* remove xxs font style
* remove unneeded module
* remove switch from stories
* remove defensive nullish coalescing
* remove merge leftovers
* Defect PM-7899 - show organizations product at the top of the other products list
* Defect PM-7951 use attr.icon to keep the icon as an attribute after prod mode is enabled
* Defect PM-7948 update path based on the current org
* force active styles for navigation items (#9128)
* add horizontal margin to icon
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [PM-2871] Submenu UI elements cannot be navigated through keyboard when screen reader is active
* [PM-2871] Adding an aria-hidden value to menu divider elements
* Require init in i18n service.
this is needed to load translations and set translation locale
* No longer need to cast i18n
* Expose user preferred locale in i18nService
This is for correctly displaying `default` when no locale has been set in preferences components. The `locale$` observable should always resolve to the currently locale currently being translated to.
* Use state provider to store preferred language
* migrate preferred language
* Use new i18n provider to get LOCAL_ID
* Fix preloaded english i18n
This is a mock service that forces english translations, it doesn't need the i18n interface that allows changing of locales.
* PR improvements
* Fixup merge
* setup anon-layout component
* add story with content
* simplify stories and add title input
* add responsiveness
* adjust border styling
* add logo
* add logo
* mock PlatformUtilsService
* more responsivness
* add secondary content
* add stories and clarifying comments
* add more to responsiveness
* Update libs/components/tailwind.config.js
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Update libs/components/tailwind.config.base.js
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* Update libs/auth/src/components/anon-layout.stories.ts
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* refactor: use bit-icon instead of css file, add auth- prefix, adjust tailwind settings
* account for longer content
* allow for adding an icon above logo
* simplify stories by removing unnecessary styling
* delete duplicate logo and minify logo and icon
* remove componentWrapperDecorator
* change subTitle to subtitle
* use bitTypography
* add accessibility title and use tw class for fill color
* add <title> element to SVG
* typography update and minor styling updates for stories
* match breakpoint for logo and h1
* reduce spacing between sections
* move to new folder
* add closing tag
* make fields protected
* use svg directly
* refactor icons
* revert to allow for additional icons in the future
* decouple icon from component
---------
Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
* WIP admin console layout
* Update icons
* Migrate more things
* Migrate the last pages
* Move header to web
* Fix story not working
* Convert header component to standalone
* Migrate org layout to standalone
* Enable org switcher
* Add AC to product switcher
* Migrate provider portal to vertical nav
* Migrate PM
* Prettier fixes
* Change AC and PP to use secondary variant layout & update logos
* Remove full width setting
* Remove commented code
* Add header to report pages
* Add provider portal banner
* Fix banner for billing pages
* Move vault title to header
* Prevent scrollbar jumping
* Move send button to header
* Replace search input with bit-search
* Remove unused files and css
* Add banner
* Tweak storage option
* Fix duplicate nav item after merge
* Migrate banner state to state provider framework
* [AC-2078] Fix device approvals header
* [PM-5861] Hide AC from product switcher for users that do not have access
* [PM-5860] Fix Vault and Send page headers
* [AC-2075] Fix missing link on reporting nav group
* [AC-2079] Hide Payment Method and Billing History pages for self-hosted instances
* [AC-2090] Hide reports/event log nav items for users that do not have permission
* [AC-2092] Fix missing provider portal option in product switcher on page load
* Add null check for organization in org layout component
* [AC-2094] Fix missing page header for new client orgs page
* [AC-2093] Update New client button styling
* Fix failing test after merge
* [PM-2087] Use disk-local for web layout banner
* [PM-6041] Update banner copy to read "web app"
* [PM-6094] Update banner link to marketing URL
* [PM-6114] add CL container component to VVR pages (#7802)
* create bit-container component
* add container to all page components
* Fix linting errors after merge with main
* Fix product switcher stories
* Fix web-header stories
* mock org state properly in product switcher stories (#7956)
* refactor: move web layout migration banner logic into a service (#7958)
* make CL codeowner of web header files
* move migration banner logic to service; update stories
* [PM-5862] Ensure a sync has run before hiding navigation links
* Remove leftover banner global state
* Re-add dropped selfHosted ngIf
* Add rel noreferrer
* Remove comment
---------
Co-authored-by: Shane Melton <smelton@bitwarden.com>
Co-authored-by: Will Martin <contact@willmartian.com>
* PM-5242 - First working draft of copying out web CL implementation of user verification form and dialog components into standalone libs/auth components which could be used in any client.
* PM-5242 - Rename UserVerificationFormComponent to UserVerificationFormInputComponent b/c it doesn't actually have a form and is meant to slot into a form as an input.
* PM-5242 - Update libs/auth angular index to take renamed component into account
* PM-5242 - Clean up UserVerificationDialogComponent as have much cleaner design approach now (maintain existing func while simply adding new requirements for client side validation for passkeys)
* PM-5242 - UserVerificationFormInput component - WIP draft of new client and server split of user verification logic
* PM-5242 - UserVerificationFormInput - WIP - Lots of progress on client side verification layout - more to do
* PM-5242 - UserVerificationFormInputComponent - Add hasMultipleVerificationMethods property so we can only show alternate methods if user has them.
* PM-5242 - UserVerificationFormInputComponent - rename hasMultipleVerificationMethods to hasMultipleClientVerificationOptions
* PM-5242 - Add new user verification biometrics fingerprint icon with proper secondary fill so it displays properly on all themes.
* PM-5242 - Create enum for tracking client user verification states
* PM-5242 - UserVerificationFormInputComponent - WIP - (1) Got biometrics layout working except for error state (2) Emitting active client verification option and biometrics result to dialog (3) Properly identifying if biometrics is enabled in a platform agnostic way (4) Translations TODO
* PM-5242 - UserVerificationDialogComponent - (1) Wire up new inputs and outputs for UserVerificationFormInput (2) Don't show submit button when clientside biometrics verification active
* PM-5242 - UserVerificationFormInputComponent - wired up biometrics failure and retry handling + re-arranged comp properties to put inputs & outputs at the top
* PM-5242 - UserVerificationFormInput component - Add logic to prevent currently active client verification method from being shown an option
* PM-5242 - UserVerificationFormInput - adjust margins
* PM-5242 - User verification dialog and form input comps - replace Verification with VerificationWithSecret type where applicable
* PM-5242 - UserVerificationFormComp - Default to server for backwards compatibility and to avoid requiring the input at all
* PM-5242 - UserVerificationFormInputComp - (1) Rename processChanges to processSecretChanges (2) Short circuit processSecretChanges when biometrics is active (3) Add new function for determining type of verification that has a secret.
* PM-5242 - UserVerificationDialog - Support custom, optional callout in dialog body.
* PM-5242 - UserVerificationDialogComp - support custom confirm button text and type.
* PM-5242 - UserVerificationDialog - Add user verification dialog result type to allow for handling all possible verification scenarios
* PM-5242 - UserVerificationFormInputComp - tweak comment
* PM-5242 - UserVerificationFormInput comp html - add placeholder text for no client verifications found scenario
* PM-5242 - UserVerificationDialogComponent - (1) Add confirm & cancel to dialog result (2) Add cancel method vs using bitDialogClose for specificity (3) Adjust naming of output property to properly specify that it is scoped to client verification (4) Adjust layout of dialog html to handle when no client side verification methods are found.
* PM-5242 - UserVerificationFormInput - Clean up test code
* PM-5242 - UserVerificationFormInput - For server verification, we don't need to check if the user has a local master key hash as we will generate a hash to send to the server for comparison.
* PM-5242 - UserVerificationFormInput html - Remove now unnecessary dev warning as I've provided a default
* PM-5242 - UserVerification Dialog & Form Input - add translations on all clients for all visible text.
* PM-5242 - UserVerificationFormInput html - remove no active client verification handling from form input comp as it is instead emitted upwards to parent dialog component to be handled there.
* PM-5242 - UserVerificationDialogComp - (1) Make UserVerificationDialogResult.noAvailableClientVerificationMethods optional because it isn't needed in cancel flows (thanks Will) (2) Modify static open to intercept closed observable event in order to always return a UserVerificationDialogResult as BitDialog returns empty string when the user clicks the x
* PM-5242 - UserVerificationDialogComp - Simplify dialog param names to remove redundant dialog
* PM-5242 - UserVerificationDialogParams - update comments to match new names
* PM-5242 - UserVerificationDialog Storybook - WIP first draft
* PM-5242 - UserVerificationDialogStoryComponent - WIP - try out having imports the same as the standalone component
* PM-5242 - UserVerificationDialogStoryComponent - more WIP - building now - some stuff displaying
* PM-5242 - UserVerificationDialogStoryComponent - some progress on providers setup
* PM-5242 - Not going to use storybook for user verification dialog
* PM-5242 - UserVerificationDialogComp - move types into own file + add docs
* PM-5242 - Update auth index to export user-verification-dialog.types
* PM-5242 - UserVerificationFormInput & UserVerificationService - Extract out getAvailableVerificationOptions logic into service
* PM-5242 -UserVerificationDialogComponent - Update close logic to handle escape key undefined scenario
* PM-5242 - UserVerificationFormInput - add getInvalidSecretErrorMessage for properly determining invalid secret translation
* PM-5242 - UserVerificationDialogComp - Refactor submit logic to handle different return methodologies in existing MP and OTP user verification service code vs new PIN flow (e.g., throwing an error instead of returning false)
* PM-5242 - PinCryptoService - change error logs to warnings per discussion with Justin
* PM-5242 - UserVerificationFormInput - Biometrics flow on desktop - remove accidentally added period in couldNotCompleteBiometrics translation key.
* PM-5242 - UserVerificationFormInput HTML - Re-arrange order of other client verification options to match design
* PM-5242 - UserVerificationFormInputComponent - Reset inputs as untouched on change of client verification method.
* PM-5242 - UserVerificationDialogComponent - Remove TODO as existing secret change logic turns invalidSecret false when biometrics is swapped to.
* PM-5242 - UserVerificationFormInputComponent - getInvalidSecretErrorMessage - fix PIN error message not being returned.
* PM-5242 - UserVerificationDialogComponent - Add documentation and examples to open method.
* PM-5242 - UserVerificationDialogComponent - tweak open docs
* PM-5242 - Remove accidental period from translation keys on browser & web
* PM-5242 - UserVerificationFormInputComponent - OTP flow needed button module to work
* PM-5242 - UserVerificationDialogParams - Add docs explaining that noAvailableClientVerificationMethods is only for desktop & browser.
* PM-5242 - User-verification-form-input - Adjust layout to meet new design requirements - (1) On load, send OTP without user clicking a button (2) Allow resending of the codes (3) show a code sent message for 3 seconds
* PM-5242 - Browser User Verification - Instantiate PinCryptoService and UserVerification service AFTER instantiating vaultTimeoutSettingsService so that it isn't undefined at run time.
* PM-5242 - JslibServices Module - UserVerificationService - add missing PlatformUtilsServiceAbstraction dependency.
* PM-5242 - Desktop Native Messaging Service - Wrap biometric getUserKeyFromStorage call in try catch because it throws an error if the user cancels the biometrics prompt and doesn't send a response to the browser extension when using the biometrics unlock bridge to the desktop app and OS.
* PM-5242 - Browser Extension - NativeMessagingBackground - if the desktop biometricUnlock command is executed with a canceled (not adjusting misspelling to keep side effects at a min) response, don't bother continuing.
* PM-5242 - BrowserCryptoService - When retrieving the user key via desktop biometrics, return null for user key if the user fails or cancels the biometrics prompt. Otherwise, if there is a user key in memory after unlock, biometrics user verification will always just return the user key from state regardless of if the user has successfully passed the biometrics prompt or not.
* PM-5242 - BrowserCryptoService - extra comments
* PM-5242 - Clean up translations - (1) Remove unused defaultUserVerificationDialogConfirmBtnText (2) Refactor name of defaultUserVerificationDialogTitle to just be verificationRequired which matches existing naming conventions.
* PM-5242 - CLI - fix order of service instantiations to ensure that vaultTimeoutSettingsService isn't undefined for PinCryptoService and UserVerificationService
* PM-5242 - Rename UserVerificationDialogParams to UserVerificationDialogOptions to match existing naming conventions of other CL comps.
* PM-5242 - UserVerificationDialogComponent - dialogParams renamed to dialogOptions
* PM-5242 - UserVerificationService Abstraction - Per PR feedback, use keyof for verificationType
* PM-5242 - UserVerificationBiometricsIcon - Per PR feedback, use https://jakearchibald.github.io/svgomg/ to optimize SVG by 50%.
* PM-5242 - Per PR feedback, clarify UserVerificationDialogOptions.clientSideOnlyVerification comment.
* PM-5242 - UserVerificationTypes - Add comments clarifying all text passed to the UserVerificationDialog are translation keys
* PM-5242 - UserVerificationDialogComp - fix extra new line per PR feedback
* PM-5242 - UserVerificationDialogTypes - per PR feedback and discussion with Will M., export ButtonType from CL so we (and consumers of the dialog) can properly import it via standard CL import.
* PM-5242 - BrowserCryptoService - Adjust comments per PR feedback.
* PM-5242 - UserVerificationDialogComponent - make ActiveClientVerificationOption readonly as it only for component html
* PM-5242 - UserVerificationDialogComp html - finish comment
* PM-5242 - BrowserCryptoService - add returns js doc per PR feedback.
* PM-5242 - UserVerificationDialogComponent - per PR feedback, add unexpected error toast.
* PM-5242 - UserVerificationService - getAvailableVerificationOptions - update params to use keyof like abstraction
* PM-5242 - Mark all existing client specific implemetations of user verification as deprecated.