* Remove reference cycle between ThemingService and the global window object
* Deregister messageListeners on a safari popup to avoid mem leaks
* Use pagehide event instead of unload
* [PM-2054] Updated Password Generator History to use Component Library
* [PM-2054] Corrected paddings
* [PM-2054] Added missing type to buttons
* [PM-2054] Removed unused imports and run prettier
* [PM-2054] Swap list by bit-table
* PM-1196- First draft of solution for solving SSO login with email 2FA not working; this is a working solution but we need to leverage it to build a better solution with a different server generated token vs a OTP.
* PM-1196 - Swap from OTP to SSO Email 2FA session token. Working now, but going to revisit whether or not email should come down from the server. Need to clean up the commented out items if we decide email stays encrypted in the session token.
* PM-1196 - Email needs to come down from server after SSO in order to flow through to the 2FA comp and be sent to the server
* PM-1196 - For email 2FA, if the email is no longer available due to the auth service 2 min expiration clearing the auth state, then we need to show a message explaining that (same message as when a OTP is submitted after expiration) vs actually sending the request without an email and getting a validation error from the server
* PM-1196 - (1) Make optional properties optional (2) Update tests to pass (3) Add new test for Email 2FA having additional auth result information
* PM-1196 - Remove unnecessary optional chaining operator b/c I go my wires crossed on how it works and the login strategy is not going to be null or undefined...
This PR introduces a generic `DialogService` which can be used by all the clients. This allows us to decouple dialogs from the `PlatformUtilsHelper`.
The `DialogService` provides a new method, `openSimpleDialog` which is the new interface for that type of dialogs.
This gives us 3 different implementations:
- Web: DialogService modern dialogs
- Browser: SweetAlert
- Desktop: Native electron based
* Add disableFavicon$ to stateService
* Change IconComponent's ChangeDetectionStrategy and use disableFavicon$ observable
* Only get first result from disableFavicon observable
* Move disabledFavicon$ to SettingsService
* Update usage of disableFavicon to use SettingsService
* Remove getting and setting of disabledFavicon on login
* Settings service observable adjustments
* Fix for popup initially having a null value for the disableFavicon setting in settingsService
* Move disabledFavicon$ subscription to ngOnInit
* feat: experiment with observables
* Remove SettingsService from browser app component
* Fix storybook changes
* Update apps/web/src/app/vault/components/vault-items/vault-items.stories.ts
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* Fix mock function signature
---------
Co-authored-by: Andreas Coroiu <andreas.coroiu@gmail.com>
Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>
* [PM-1351] Add property to server-config.response. Change config to be able to fetch without being authed.
* [PM-1351] fetch every hour.
* [PM-1351] fetch on vault sync.
* [PM-1351] browser desktop fetch configs on sync complete.
* [PM-1351] Add methods to retrieve feature flags
* [PM-1351] Add enum to use as key to get values feature flag values
* [PM-1351] Remove debug code
* [PM-1351] Get flags when unauthed. Add enums as params. Hourly always fetch.
* [PM-1351] add check for authed user using auth service
* [PM-1351] remove unnecessary timer on account unlock
* [PM-687] refactor observable in base accept component
* [PM-687] add emergency access invitation to global state
* [PM-687] save invite to state and check on login
* [PM-687] move emergency access check above queryParams observable
* [AC-1340] Calling Cipher DeleteAdmin endpoints when user has canEditAnyCollection permission
* [AC-1340] Fixed CLI and Desktop builds
* [AC-1340] Changed CipherService delete methods parameter 'orgAdmin' to 'asAdmin' and to nullable
* [AC-1340] Changed variable names from 'orgAdmin' to 'asAdmin'
* [AC-1340] Reverted change on DeleteCommand
* Create and register new libs/exporter
Create package.json
Create tsconfig
Create jest.config
Extend shared and root tsconfig and jest.configs
Register with eslint
* Migrate exportService to libs/exporter
Move exportService (abstraction and impl) into libs/exporter
Refactored exportService to be split into vault-export and event-export
Created barrel-files for both exports
Moved export.service.spec.ts into vault-export
Created an export-helper, which helps build the filename (extract method refactor from ExportService)
* Move components in libs/angular into tools-subfolder
Moved components
Updated imports in jslib-services.module and jslib.module
* Register libs/exporter with browser and fix imports
Move export.component into tools-subfolder
* Register libs/exporter with cli and fix imports
Move export.command into tools-subfolder
* Register libs/exporter with desktop and fix imports
Move export.component into tools-subfolder
* Move export models to libs/exporter
* Update web imports
* Update package-lock.json
* Move export models back as it would create circular dependency
Reponse models in common rely on export models which are in libs/exporter, which relies on common
* Fix up web for event-export
* Update CODEOWNERS
* Add export-models to team-tools-dev
* Simplify domain import
* Moving EventExport into web
* [EC-1070] Introduce flag for enforcing master password policy on login
* [EC-1070] Update master password policy form
Add the ability to toggle enforceOnLogin flag in web
* [EC-1070] Add API method to retrieve all policies for the current user
* [EC-1070] Refactor forcePasswordReset in state service to support more options
- Use an options class to provide a reason and optional organization id
- Use the OnDiskMemory storage location so the option persists between the same auth session
* [AC-1070] Retrieve single master password policy from identity token response
Additionally, store the policy in the login strategy for future use
* [EC-1070] Introduce master password evaluation in the password login strategy
- If a master password policy is returned from the identity result, evaluate the password.
- If the password does not meet the requirements, save the forcePasswordReset options
- Add support for 2FA by storing the results of the password evaluation on the login strategy instance
- Add unit tests to password login strategy
* [AC-1070] Modify admin password reset component to support update master password on login
- Modify the warning message to depend on the reason
- Use the forcePasswordResetOptions in the update temp password component
* [EC-1070] Require current master password when updating weak mp on login
- Inject user verification service to verify the user
- Conditionally show the current master password field only when updating a weak mp. Admin reset does not require the current master password.
* [EC-1070] Implement password policy check during vault unlock
Checking the master password during unlock is the only applicable place to enforce the master password policy check for SSO users.
* [EC-1070] CLI - Add ability to load MP policies on login
Inject policyApi and organization services into the login command
* [EC-1070] CLI - Refactor update temp password logic to support updating weak passwords
- Introduce new shared method for collecting a valid and confirmed master password from the CLI and generating a new encryption key
- Add separate methods for updating temp passwords and weak passwords.
- Utilize those methods during login flow if not using an API key
* [EC-1070] Add route guard to force password reset when required
* [AC-1070] Use master password policy from verify password response in lock component
* [EC-1070] Update labels in update password component
* [AC-1070] Fix policy service tests
* [AC-1070] CLI - Force sync before any password reset flow
Move up the call to sync the vault before attempting to collect a new master password. Ensures the master password policies are available.
* [AC-1070] Remove unused getAllPolicies method from policy api service
* [AC-1070] Fix missing enforceOnLogin copy in policy service
* [AC-1070] Include current master password on desktop/browser update password page templates
* [AC-1070] Check for forced password reset on account switch in Desktop
* [AC-1070] Rename WeakMasterPasswordOnLogin to WeakMasterPassword
* [AC-1070] Update AuthServiceInitOptions
* [AC-1070] Add None force reset password reason
* [AC-1070] Remove redundant ForcePasswordResetOptions class and replace with ForcePasswordResetReason enum
* [AC-1070] Rename ForceResetPasswordReason file
* [AC-1070] Simplify conditional
* [AC-1070] Refactor logic that saves password reset flag
* [AC-1070] Remove redundant constructors
* [AC-1070] Remove unnecessary state service call
* [AC-1070] Update master password policy component
- Use typed reactive form
- Use CL form components
- Remove bootstrap
- Update error component to support min/max
- Use Utils.minimumPasswordLength value for min value form validation
* [AC-1070] Cleanup leftover html comment
* [AC-1070] Remove overridden default values from MasterPasswordPolicyResponse
* [AC-1070] Hide current master password input in browser for admin password reset
* [AC-1070] Remove clientside user verification
* [AC-1070] Update temp password web component to use CL
- Use CL for form inputs in the Web component template
- Remove most of the bootstrap classes in the Web component template
- Use userVerificationService to build the password request
- Remove redundant current master password null check
* [AC-1070] Replace repeated user inputs email parsing helpers
- Update passwordStrength() method to accept an optional email argument that will be parsed into separate user inputs for use with zxcvbn
- Remove all other repeated getUserInput helper methods that parsed user emails and use the new passwordStrength signature
* [AC-1070] Fix broken login command after forcePasswordReset enum refactor
* [AC-1070] Reduce side effects in base login strategy
- Remove masterPasswordPolicy property from base login.strategy.ts
- Include an IdentityResponse in base startLogin() in addition to AuthResult
- Use the new IdentityResponse to parse the master password policy info only in the PasswordLoginStrategy
* [AC-1070] Cleanup password login strategy tests
* [AC-1070] Remove unused field
* [AC-1070] Strongly type postAccountVerifyPassword API service method
- Remove redundant verify master password response
- Use MasterPasswordPolicyResponse instead
* [AC-1070] Use ForceResetPassword.None during account switch check
* [AC-1070] Fix check for forcePasswordReset reason after addition of None
* [AC-1070] Redirect a user home if on the update temp password page without a reason
* [AC-1070] Use bit-select and bit-option
* [AC-1070] Reduce explicit form control definitions for readability
* [AC-1070] Import SelectModule in Shared web module
* [AC-1070] Add check for missing 'at' symbol
* [AC-1070] Remove redundant unpacking and null coalescing
* [AC-1070] Update passwordStrength signature and add jsdocs
* [AC-1070] Remove variable abbreviation
* [AC-1070] Restore Id attributes on form inputs
* [AC-1070] Clarify input value min/max error messages
* [AC-1070] Add input min/max value example to storybook
* [AC-1070] Add missing spinner to update temp password form
* [AC-1070] Add missing ids to form elements
* [AC-1070] Remove duplicate force sync and update comment
* [AC-1070] Switch backticks to quotation marks
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Move URI matching logic into uriView
* Fix url parsing: always assign default protocol, otherwise no protocol with port is parsed incorrectly
* Codescene: refactor domain matching logic
* Fix encrypted export using fixed PBKDF2 iterations
* Replace hardcoded KdfType in importer
* Clean up kdf handling in password-protected export
* Extract BitwardenPasswordProtectedFileFormat
* Rename bitwarden-json-types
* Move StateService import to fix linting issue
* Make linter happy
* Use abstraction instead of implementation
---------
Co-authored-by: Daniel James Smith <djsmith@web.de>
* Split out api methods into sendApiService
* Move SendService and abstraction
* Libs updates
* Web updates
* CLI updates
* Desktop updates
* libs send service fixes
* browser factory additions
* Browser updates
* Fix service injection for CLI SendReceiveCommand
* Deprecate directly calling send state service methods
* SendService observables updates
* Update components to use new observables
* Modify CLI to use state service instead of observables
* Remove unnecessary await on get()
* Move delete() to InternalSendService
* SendService unit tests
* Split fileUploadService by send and cipher
* send and cipher service factory updates
* Add file upload methods to get around circular dependency issues
* Move api methods from sendService to sendApiService
* Update cipherService to use fileApi methods
* libs service injection and component changes
* browser service injection and component changes
* Desktop component changes
* Web component changes
* cipher service test fix
* Fix file capitalization
* CLI service import and command updates
* Remove extra abstract fileUploadService
* WIP: Condense callbacks for file upload
Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
* Send callbacks for file upload
* Fix circular service dependencies
* Fix response return on upload
* Fix function definitions
* Service injection fixes and bug fixes
* Fix folder casing
* Service injection cleanup
* Remove deleted file from capital letters whitelist
* Create new SendApiService for popup
* Move cipherFileUploadService to vault
* Move SendFileUploadService methods into SendApiService
* Rename methods to remove 'WithServer'
* Properly subscribe to sendViews
* Fix Send serialization
* Implement fromJSON on sendFile and sendText
* [PM-1347] Fix send key serialization (#4989)
* Properly serialize key on send fromJSON
* Remove call that nulled out decrypted sends
* Fix null checks in fromJSON methods for models
* lint fixes
---------
Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
* Added optional chaining to folder view object to handle when the foilder value is null
* Set folder to null during cleanup and added check on the view component to check if the folder is nul before rendering the html
* [PM-108] Fingerprint is calculated based on pubKey
* [PM-108] Change userId to userEmail. Remove fingerprint from AuthResponse
* [PM-130][PM-107] Remove fingerprint from request and clients UI
* [EC-1086] fix: faulty orgId override
When single vault policy was in effect the orgId that the user belongs to was was always set for new ciphers for new ciphers. This was overwriting the client organization's id when a provider was trying to create new items in their clients vault.
* [AC-1086] chore: remove uneccessary assignments
* [EC-1037] Cleanup vault folder filter logic
- "All vaults" and "My vault" should always show all folders
- Organization vault should only show non-empty folders and the "No folder" folder
- Ensures the "Folders" filter section is always visible
* Update apps/web/src/vault/individual-vault/vault-filter/services/vault-filter.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Update libs/angular/src/vault/vault-filter/services/vault-filter.service.ts
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Feature/SG-680 - Create Domain Verification Comp (#4283)
* domain-base.ts - added link to Architectural docs describing domain base class purpose
* SG-680 - (1) Created Org Domain API and observable based data store service (2) Created required response and request models
* SG-680 - Renaming org domain service abstractions to match existing convention
* SG-680 - (1) Updated getByOrgId method to return array of data to match back end + renamed it as such (2) Updated OrgDomainApiService get methods to update the OrgDomainService observables
* Two-factor-setup comp - change "tabbed-header" class to "page-header" to achieve visual consistency with other settings components.
* SG-680 - Refactor Org Domain API & domain services to conform to ADR 0013 - Avoid layered folder structure for request/response models (i.e., put models near "owner" services)
* SG-680 - Update Organization model to include a canManageDomainVerification check
* SG-680 - Created Domain Verification component and started scaffolding out HTML
* SG-680 - New OrgDomain state and API services need to be registered on jslib-services.module in order to be injectable into components for use (this is what maps abstractions to implementation for dependency injection)
* SG-680 - OrgDomainApiServiceAbstraction should be an abstract class
* SG-680 - Update OrgDomainApiService to use ListResponse and map into OrganizationDomainResponse properly
* SG-680 - Moved domain verification comp into subfolder to add clarity in folder structure
* SG-680 - Good start on Domain Add Edit Dialog
* SG-680 - Domain Add Edit Dialog - (1) Random generation of DNS TXT Record now working (2) DNS TXT Record Copyable (3) Additional translations added (4) Info callout added
* SG-680 - Domain Add Edit Dialog - (1) Added custom validator for domain name (2) Disable verify btn if form invalid
* SG-680 - Updated Domain Name custom validator to pass back error message in format the error.component.ts expected so it can be displayed without an untranslated error prefix of "invalidDomainName"
* Form-button - Added useful note regarding use of the bitFormButton directive and how it requires the use of the bitButton directive as well.
* SG-680 - OrgDomain.service - replace delete with splice as delete doesn't actually alter array. Duh.
* SG-680 - Domain verification progress - (1) Table layout + loading working for the most part (more translations needed (2) Add & edit opening dialog (3) Dialog first draft of save and verify
* SG-680 - DomainAddEditDialog - Unique domain name enforcement implemented
* SG-680 - Domain Name Custom Reactive forms validator refactor - swapped to regex to support proper domain format (which now enforces the requirement of a .com or similar)
* SG-680 - OrgDomainApi svc - must await send of delete call otherwise runs synchronously. Duh.
* SG-680 - Domain verification progress - (1) CopyDnsTxt added to state service (2) Refactored dialog to use async actions (3) Dialog form changes now mark form controls as touched for more responsive error handling
* SG-680 - Domain-add-edit-dialog - Confirmation required now for domain deletion
* SG-680 - Domain verification table options now supports removing domains with confirmation prompt
* Shared module - merge conflict resolution + removing unused imports so I can check this in.
* SG-680 - Adding missing translations
* SG-680 - Comment clean up + todo
* Revert "Shared module - merge conflict resolution + removing unused imports so I can check this in."
This reverts commit 98fe346e67.
* SG-680 - DomainAddEditDialog - Replace bitAction with leveraging bitSubmit so that when users hit enter in a field the form gets submitted.
* SG-680 - Added httpStatusCode enum
* SG-680 - OrgDomainAPI - Verify endpoint now returns domain response model so upsert to sync obs state service
* SG-680 - Domain Verification comp - (1) Display last checked date (2) Verify first attempt in place (3) justify options content per design
* SG-680 - DomainAddEditDialog - Validation and error handling overhaul
* SG-680 - DomainAddEditDialog - (1) Autofocus domain name on new domain creation (2) Removed form.invalid == form disabled logic because of accessibility concerns
* SG-680 - OrgDomainResponse model refactor - back end is sending lower cased props
* SG-680 - OrgDomain service refactor - (1) Use proper abstraction for i18n svc (2) Don't make non-async methods async for no reason
* SG-680 - OrgDomainService - Added test suite
* SG-680 - Renaming httpStatusCode.enum to strip off .enum in attempt to pass eslint issue
* SG-680 - Renaming httpStatusCode enum file again to remove all capitalized letters to pass eslint rules.
* SG-680 - Updating HttpStatusCode import b/c auto import update missed it.
* SG-680 - DomainAddEditDialog - Don't show callout if domain is verified
* SG-680 - DomainVerificationComp - Add error handling to verify to handle case where domain isn't available
* SG-680 - OrgDomainApiSvc - svc should use abstractions in constructor
* SG-680 - OrgDomainApiSvc - added full test suite
* SG-680 - OrgDomainSvc test suite - fixing broken test
* SG-680 - Domain Verification Validation Scenario: show form control error when domain verification fails - (1) Enhanced bitSubmit to optionally allowDisabledFormSubmit (2) Enhanced bitInput to optionally allow showErrorsWhenDisabled + added new docs
* SG-680 - Adjusting location & name of the bitInput docs to be in the top level docs section to match historical consensus and existing pattern.
* SG-680 - Removed TODO for adding tests since I've already added tests.
* SG-680 - DomainAddEditDialog - Handle verify domain conflict exceptions just in case
* SG-680 - Adjusting location of Domain verification settings item in the organization settings menu to match figma.
* SG-680 - Removing unnecessary comment
* SG-680 - Domain Verification component - updated svg to not have alt text so it is treated as decorative by screen readers for accessibility.
* SG-680 - Fixing messages.json missing }
* SG-680 - DomainAddEditDialog - Hardcoding inputs to bit-dialog as component vars are not needed for dynamic anything right now.
* SG-680 - Dialog comment refactor
* SG-680 - OrgDomainSvc - comment and console log removals.
* SG-680 - Updating OrgDomain Service test suites to have better test titles.
* Defect/web org domain claiming bugfixes (#4458)
* SG-949 - OrgDomainVerification - Domain name validator now supports n levels of subdomains as well as top level domains.
* SG-955 - On domain verification error or failure, call to update the individual org domain item to get an updated last checked date on the client.
* SG-953 - In domain verification dialog edit, if verify called and failed, then must manually mark domain name as touched for errors to show up.
* SG-954 - Domain Verification edit dialog - Fixing delete button not having trash icon displayed + added i18n translation for title prop.
* SG-956 - Fixing domain claiming event logs so that they show up on the client (more to do as there are some events missing client & member)
* Form button directive comment update
* SG-977 - Event Log improvements: (1) Add new device type of server (2) Add EventSystemUser mapping to translated value. The end result is that both SCIM and Domain verification logs properly show server as the client and SCIM or Domain verification as the member.
* Add comment to clarify use of SCIM in EVENT_SYSTEM_USER_TO_TRANSLATION dict
* DeviceType.Server must be incremented to 22 b/c server master already has a DeviceType.SDK of 21.
* Add SDK w/ value of 21 to DeviceType to match master server
* Defect/web org domain claiming bugfixes the sequel (#4530)
* Update <bit-table> to latest standard so it works again (swap body from ng-container to ng-template)
* Input directive - showErrorsWhenDisabled case doesn't need to care if input isActive or not.
* SG-949 - Update domain name validator regex to prevent http://, https://, and www.
* SG-771 - Added claimed domain logic to web client (#4603)
* SG-771 / SG-772 / SG-743 - Add claimed domain logic which skips entry of Org SSO Id when an org has a claimed and verified domain to web, browser, and desktop.
* Fix lint errors by adding button types
---------
Co-authored-by: SmithThe4th <gsmith@bitwarden.com>
* Move auth service factories to Auth team
* Move authentication componenets to Auth team
* Move auth guard services to Auth team
* Move Duo content script to Auth team
* Move auth CLI commands to Auth team
* Move Desktop Account components to Auth Team
* Move Desktop guards to Auth team
* Move two-factor provider images to Auth team
* Move web Accounts components to Auth Team
* Move web settings components to Auth Team
* Move web two factor images to Auth Team
* Fix missed import changes for Auth Team
* Fix Linting errors
* Fix missed CLI imports
* Fix missed Desktop imports
* Revert images move
* Fix missed imports in Web
* Move angular lib components to Auth Team
* Move angular auth guards to Auth team
* Move strategy specs to Auth team
* Update .eslintignore for new paths
* Move lib common abstractions to Auth team
* Move services to Auth team
* Move common lib enums to Auth team
* Move webauthn iframe to Auth team
* Move lib common domain models to Auth team
* Move common lib requests to Auth team
* Move response models to Auth team
* Clean up whitelist
* Move bit web components to Auth team
* Move SSO and SCIM files to Auth team
* Revert move SCIM to Auth team
SCIM belongs to Admin Console team
* Move captcha to Auth team
* Move key connector to Auth team
* Move emergency access to auth team
* Delete extra file
* linter fixes
* Move kdf config to auth team
* Fix whitelist
* Fix duo autoformat
* Complete two factor provider request move
* Fix whitelist names
* Fix login capitalization
* Revert hint dependency reordering
* Revert hint dependency reordering
* Revert hint component
This components is being picked up as a move between clients
* Move web hint component to Auth team
* Move new files to auth team
* Fix desktop build
* Fix browser build