Commit Graph

320 Commits

Author SHA1 Message Date
Will Martin 375c552623
[SM-455] add projects and secrets to dashboard page (#4722)
* add projects and secrets to dashboard

* add header title

* add section component

* only show latest projects and secrets

* reorganize view model; all view all link

* fix i18n; update table styles; add bitSortable to secrets table

* apply code reviews

* remove basePath input; add viewProjectEvent output

* fix style and merge issue

* fix route

* use absolute route with org id
2023-02-16 09:18:17 -05:00
Thomas Rittson d269439391
Add whitespace to color-password stories (#4757) 2023-02-16 10:49:04 +01:00
Shane Melton 99e0ead5fd
[EC-1037] [EC-742] Cleanup vault folder filter logic (#4700)
* [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>
2023-02-15 12:55:25 -08:00
Jared Snider 36633bcb04
[SG-147] - Feature/web-organization-domain-claiming (#4734)
* 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>
2023-02-15 15:50:39 -05:00
Oscar Hinton 24fa521b17
[SM-469] Change sortable to be bold (#4768) 2023-02-15 21:39:40 +01:00
Oscar Hinton 5dc1775cfc
[SM-478] Resolve introduced eslint errors for button type (#4612) 2023-02-14 18:13:53 +01:00
Oscar Hinton 42ba475c37
[SM-497] Add filtering capabilities to the table datasource (#4717)
* Add filtering capabilities to the table datasource
2023-02-14 11:38:53 +01:00
Colton Hurst 63563bd87d
SM-365: Add SM Import & Export (#4323)
* SM-365: Add scaffolding for settings, import, and export components

* SM-365: Build out SM export component and retrieve org name

* Add password verification

* Add SMExportService

* SM-365: Add full export functionality for client side

* SM-365: Add SM Import UI, combine import & export services, general cleanup

* SM-365: Small updates, fix settings navigation for SM

* SM-365: Refactorings based on PR comments, part 1

* SM-365: Refactorings based on PR comments, part 2

* SM-365: remove unneeded import file parsing code

* Attempt New SM Export Auth Flow (#4596)

* Attempt new sm-export auth flow

* Fix component

* SM-365: Add error messaging for failed import

* SM-365: Fix import error dialog

* SM-365: Fix layout of pages, title, and success messaging

* SM-365: Address majority of PR comments, clear import form on success

* SM-365: Refactor error handling, refactor date formatting

* SM-365: Refactored names, logic, added SM porting api service, added needed error checking, etc.

* SM-365: Refactor fileContents to pastedContents to be more clear

* SM-365: Refactoring based on PR comments

* SM-365: Update based on PR comments, refactoring ngOnInit for sm-import

* SM-365: Fix wrong type on choose import file button
2023-02-13 10:52:47 -05:00
Andreas Coroiu d65acc3bad
[EC-1028] [Design feedback] There is no way to close the multi-select with the keyboard when it is in a modal (#4627)
* [EC-1028] feat: close dropdown on `enter`

* [EC-1028] fix: form submitting on enter

* [EC-1028] feat: close dropdown on escape

Close dropdown on escape, otherwise allow propagation so that modals can be closed with another escape click.

* [EC-1028] feat: allow submit form using enter when dropdown is closed
2023-02-13 13:10:53 +01:00
Matt Gibson 13746c1840
PS-2450 EC-1073 Do not decode and normalize query (#4708)
Co-authored-by: Jake Fink <jfink@bitwarden.com>
2023-02-10 11:34:19 -06:00
Carlos Gonçalves d27ef74fe1
SG-1047 Fix remember me on web (#4706) 2023-02-09 16:53:05 -05:00
Will Martin de5ef14dda
[SM-411] rename bwi-chevron-up; add new sort icons; update bitSortable icons (#4676) 2023-02-09 14:55:05 -05:00
Matt Gibson 1f3017214e
Auth/reorg auth (#4694)
* PM-74 move desktop hint component

* PM-60 move update temp password to auth team

* PS-2298 Add auth code owners file
2023-02-08 13:57:41 -06:00
Andreas Coroiu 67aad0c5b7
[EC-489] chore: remove obsolete `identifier` field (#4575)
* [EC-489] chore: remove obsolete `identifier` field

* [EC-489] chore: remove identifier from org response
2023-02-08 16:33:41 +01:00
Todd Martin 987c9db8b0
Set checkForBreaches to true (checked) by default. (#4686) 2023-02-07 12:54:01 -05:00
Will Martin 40e6471070
[SM-73] fix defects (#4572)
* [SM-431] fix project name overflow

* [SM-432] sort project list alphabetically

* [SM-458] add delete button

* [SM-430] misc UI fixes

* override tw-break-words in table cell

* update copy

* remove unused copy
2023-02-06 22:41:08 -05:00
Andreas Coroiu d42d626154
[EC-1060] feat: center align table cell content (#4618) 2023-02-06 18:08:20 -05:00
Matt Gibson cf972e784c
Auth/ps 2298 reorg auth (#4564)
* 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
2023-02-06 15:53:37 -06:00
Robyn MacCallum 4f7bd77560
[SG-900] Implement auto-fill callout (#4670)
* Implement autofill callouts

* Fix copy for dismissed callout

* Delay closing popup after using callout auto-fill
2023-02-06 13:04:11 -05:00
Brandon Maharaj bbc709d74e
fix: change to 10 (#4662) 2023-02-06 11:36:09 -05:00
Andreas Coroiu 68331f061e
[EC-861] Add external id to member modal (#4504)
* [EC-861] feat: add `externalId` field to ui

* [EC-861] feat: add `externalId` to services and data classes
2023-02-06 15:54:59 +01:00
Andreas Coroiu 55d9ee22ab
[EC-667] Collection modal add search function (#4291)
* [EC-667] feat: scaffold new select component

* [EC-667] feat: sort of working implementation

* [EC-667] feat: support for using in forms

* [EC-667] feat: add bit-select example to full form

* [EC-667] fix: broken aria label connetion

* [EC-667] fix: web not building

* [EC-667] fix: dropdown getting trapped in dialog

* [EC-667] fix: select not emitting correct value

* [EC-667] feat: add collection icon to options

* [EC-667] feat: add default select placeholder translation

* [EC-667] fix: undefined handling

* [EC-667] fix: value vs options race condition

* [EC-667] feat: remove x and add "no collection" option

* [EC-667] chore: add country list disclaimer

* chore: clean up comments

* [EC-667] chore: cleanup commented import

* [EC-667] fix: input text color not applying to single-select
2023-02-06 15:54:23 +01:00
Thomas Rittson e62d0b2987
Fix race condition when adding item from collections list (#4639) 2023-02-06 11:53:14 +10:00
Robyn MacCallum 8a9e59094a
Login Flows (#4411)
* [SG-171] Login with a device request: Desktop (#3999)

* Move LoginWithDeviceComponent to libs

* Create login module

* Remove login component from previous location

* Move startPasswordlessLogin method to base class

* Register route for login with device component

* Add new localizations

* Add Login with Device page styles

* Add desktop login with device component

* Spacing fix

* Add content box around page

* Update wording of helper text

* Make resend timeout a class variable

* SG-173 - Login device approval desktop (#4232)

* SG-173 Implemented UI and login for login approval request

* SG-173 - Show login approval after login

* SG-173 Fetch login requests if the setting is true

* SG-173 Add subheading to new setting

* SG-173 Handle modal dismiss denying login request

* SG-173 Fix pr comments

* SG-173 Implemented desktop alerts

* SG-173 Replicated behaviour of openViewRef

* SG-173 Fixed previous commit

* SG-173 PR fix

* SG-173 Fix PR comment

* SG-173 Added missing service injection

* SG-173 Added logo to notifications

* SG-173 Fix PR comments

* [SG-910] Override self hosted check for desktop (#4405)

* Override base component self hosted check

* Add selfhost check to environment service

* [SG-170] Login with Device Request - Browser (#4198)

* work: ui stuff

* fix: use parent

* fix: words

* [SG-987] [SG-988] [SG-989] Fix passwordless login request (#4573)

* SG-987 Fix notification text and button options

* SG-988 Fix approval and decline confirmation toasts

* SG-989 Fix methods called

* SG-988 Undo previous commit

* [SG-1034] [Defect] - Vault is empty upon login confirmation (#4646)

* fix: sync after login

* undo: whoops

---------

Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
Co-authored-by: Brandon Maharaj <bmaharaj@bitwarden.com>
Co-authored-by: Todd Martin <106564991+trmartin4@users.noreply.github.com>
2023-02-05 10:57:21 -05:00
Matt Bishop dcc7846138
[CSA-27] Use new dependency-free locale service for WebAuthN translations (#4557) 2023-02-04 09:23:42 -05:00
Matt Bishop 6df37dd715
[CSA-28] Use path normalization in API requests (#4580)
* Use path normalization in API requests

* Remove CLI webpack config change that's unneeded

* Add additional tests
2023-02-03 14:24:49 -05:00
Oscar Hinton 2edbba8a2c
[CL-41] Typography directive (#3741) 2023-02-03 10:32:29 +01:00
Bernd Schoolmann fa231499d6
Fix missing kdf parameters in connector code (#4638) 2023-02-02 20:21:56 -05:00
Thomas Rittson cc5c753e30
[EC-1051] Add TailwindCSS linting rules (#4605) 2023-02-03 07:27:08 +10:00
Robyn MacCallum 7ebedbecfb
[SG-998] and [SG-999] Vault and Autofill team refactor (#4542)
* Move DeprecatedVaultFilterService to vault folder

* [libs] move VaultItemsComponent

* [libs] move AddEditComponent

* [libs] move AddEditCustomFields

* [libs] move attachmentsComponent

* [libs] folderAddEditComponent

* [libs] IconComponent

* [libs] PasswordRepormptComponent

* [libs] PremiumComponent

* [libs] ViewCustomFieldsComponent

* [libs] ViewComponent

* [libs] PasswordRepromptService

* [libs] Move FolderService and FolderApiService abstractions

* [libs] FolderService imports

* [libs] PasswordHistoryComponent

* [libs] move Sync and SyncNotifier abstractions

* [libs] SyncService imports

* [libs] fix file casing for passwordReprompt abstraction

* [libs] SyncNotifier import fix

* [libs] CipherServiceAbstraction

* [libs] PasswordRepromptService abstraction

* [libs] Fix file casing for angular passwordReprompt service

* [libs] fix file casing for SyncNotifierService

* [libs] CipherRepromptType

* [libs] rename CipherRepromptType

* [libs] CipherType

* [libs] Rename CipherType

* [libs] CipherData

* [libs] FolderData

* [libs] PasswordHistoryData

* [libs] AttachmentData

* [libs] CardData

* [libs] FieldData

* [libs] IdentityData

* [libs] LocalData

* [libs] LoginData

* [libs] SecureNoteData

* [libs] LoginUriData

* [libs] Domain classes

* [libs] SecureNote

* [libs] Request models

* [libs] Response models

* [libs] View part 1

* [libs] Views part 2

* [libs] Move folder services

* [libs] Views fixes

* [libs] Move sync services

* [libs] cipher service

* [libs] Types

* [libs] Sync file casing

* [libs] Fix folder service import

* [libs] Move spec files

* [libs] casing fixes on spec files

* [browser] Autofill background, clipboard, commands

* [browser] Fix ContextMenusBackground casing

* [browser] Rename fix

* [browser] Autofill content

* [browser] autofill.js

* [libs] enpass importer spec fix

* [browser] autofill models

* [browser] autofill manifest path updates

* [browser] Autofill notification files

* [browser] autofill services

* [browser] Fix file casing

* [browser] Vault popup loose components

* [browser] Vault components

* [browser] Manifest fixes

* [browser] Vault services

* [cli] vault commands and models

* [browser] File capitilization fixes

* [desktop] Vault components and services

* [web] vault loose components

* [web] Vault components

* [browser] Fix misc-utils import

* [libs] Fix psono spec imports

* [fix] Add comments to address lint rules
2023-01-31 16:08:37 -05:00
Oscar Hinton 2757fcee86
[SM-378] Enable SM on a user basis (#4497)
* Add support for giving individual users access to secrets manager
2023-01-31 19:03:27 +01:00
Oscar Hinton 4d6e333d8d
[SM-468] Add eslint rule for forcing type to buttons (#4576)
* Add eslint rule for forcing type to buttons

* Fix eslint js errors
2023-01-31 18:39:10 +01:00
Thomas Rittson e622d7431f
[EC-826] Merge license sync feature branch to master (#4503)
* [EC-816] Separate cloud and selfhosted subscription components (#4383)

* [EC-636] Add license sync to web vault (#4441)

* [EC-1036] Show correct last license sync date (#4558)

* [EC-1044] Fix: accidentally changed shared i18n string
2023-01-31 07:41:23 +10:00
Matt Gibson b208866109
[PS-1854] Split folder service back/foreground (#4209)
* Split folder service back/foreground

Also splits for folderApiService, since that depends on folderService.

TODO: this split will need to be done for any dependents of a split
service.

* Prefer popup-specific services VaultFilterService

* Prefer popup-specific services i18n

* Prefer popup-specific services configService

* StateService is required for browserSync

* Add Policy Api Service

* Remove unused orgService from PolicyApiService

* Fixup missed dependency

* Attach cryptography services in popup context

* Improve session syncer initialization
2023-01-30 13:04:22 -06:00
Daniel James Smith b7d38f0f72
[PS-2320] Import API service refactor (#4529)
* Extract import methods from ApiService

Removed methods from ApiService impl and abstraction
Create import-api.service impl and abstraction
Moved import.service into abstractions/import/import.service.abstraction
Moved import.service into services/import/import.service
Change imports to use new services

* Fix import for tests

* Fix imports for CLI

* Fix imports for web

* Fix ModuleImports and dependencies

* Mark ImportApiService methods as async
2023-01-30 20:03:12 +01:00
Will Martin 62986be1a2
[SM-325] update header layout to support projected content (#4509)
* expose breadcrumbs to shared module; remove extra whitespace from breadcrumb

* update sm-header to accept projected content; update layout style & semantics

* remove searchTitle route data; change title to titleId

* update styles

* update SM pages to use new header

* add button slot to header

* remove breadcrumbs from shared module

* update project tabs

* update content projection to use slot attribute

* hide tabs container

* add icon input to header

* add breadcrumbs to service account page

* update padding

* update styles

* code style changes

* create access token button component

* simplify access token logic

* add create access token button to header

* update sm-no-items content projection

* revert irrelevant commits

* add header title slot; rename template vars for clarity

* add storybook stories

* remove sm-new-menu from default view; refactor search/button content projection

* remove unused styles; fix title truncate

* remove unnecessary classes

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

---------

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-01-30 10:58:40 -05:00
Bernd Schoolmann 01091fe260
[PS-2365] Kdf Configuration Options for Argon2 (#4578)
* Implement argon2 config

* Remove argon2 webassembly warning

* Replace magic numbers by enum

* Implement kdf configuration

* Update UI according to design feedback

* Further updates to follow design feedback

* Add oxford comma in argon2 description

* Fix typos in argon2 descriptions

* move key creation into promise with API call

* change casing on PBKDF2

* general improvements

* kdf config on set pin component

* SHA-256 hash argon2 salt

* Change argon2 defaults

* Change argon2 salt hash to cryptoFunctionService

* Fix isLowKdfIteration check

---------

Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2023-01-30 09:07:51 -05:00
Daniel James Smith b1a1068906
[PS-2096] BEEEEP: Add Psono importer (#4286)
* Add psono json importer

Create types for psono export format
Add test files
Write tests for psono-json-importer
Write importer for psono export
Register 'psonojson' with `importOptions`
Import/register psono-json-importer with import.service
Add instructions on how to export from Psono

* Retain all imported data

Ensure all data is retained by adding unmapped properties into custom fields
Each item type has a set of mapped properties, anything not matching will be created as a custom field
Write extensive tests to ensure data is present

* Skipping GPG

We currently cannot import GPG Keys into notes or custom fields

* Add organizational test

Verify that folders get converted to collections when imported by an org

* Remove combined test-file (whole export)

* Remove redundant null type
2023-01-30 13:56:49 +01:00
Bernd Schoolmann e055e68991
[PS-2251] Implement argon2 kdf (#4468)
* Implement argon2

* Remove argon2 webassembly warning

* Replace magic numbers by enum

* move packages

* cleanup call to argon2

* update call to node argon2

* don't need  wasm-eval

* revert config changes

* Update libs/common/src/enums/kdfType.ts

Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>

* Update kdfType.ts

* apply DEFAULT_PBKDF2_ITERATIONS

* checkIfWasmSupported

Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
Co-authored-by: Martin Weinelt <mweinelt@users.noreply.github.com>
2023-01-26 09:20:12 -05:00
Jake Fink d8689a20b5
[EC-1016][EC-1017][EC-1018] add validation to collection dialog (#4528)
* [EC-1016] add validation to collection dialog

* [EC-1017] add validation to members dialog

* [EC-1017] remove unused imports from members tab

* [EC-1017] move validator out of shared module

* [EC-1018] add validation to group modal
2023-01-25 11:03:09 -05:00
Rui Tomé 4a3bb4b241
[EC-639] Replacing apostrophe char for email values in Policies API request (#4390)
* [EC-639] Replacing single quote char for email values in Policies API request

* [EC-639] Added Utils.encodeRFC3986URIComponent and used in PolicyApiService and TwoFactorAuthenticatorComponent

* [EC-639] Added unit tests for Utils.encodeRFC3986URIComponent
2023-01-25 14:00:46 +00:00
Jared Snider d40a891f71
Feature/SG-878 - Add open simple dialog method on dialog service (#4425)
* SG-878 - First draft - Dialog service now has backwards compatible method for opening a configurable simple dialog.

* SG-878 - People comp - test cases for simple dialog method - more testing required

* SG-878 - Much more simple dialog work - investigating different approaches to see what will work best. Lots of WIP on this one. Includes first draft but working solution for solving placeholder support for non-localized strings.

* SG-878 - (1) Broke out enums and types into separate files for better single responsibility (2) Allow null cancelButtonText for single accept button support

* SG-878 - Configurable simple dialog - removed separate comp approach as it is a maint problem to have simple dialog implemented in two places.

* SG-878 - Added js doc comments for dialog service openSimpleDialog method

* SG-878 - Don't export ConfigurableSimpleDialogComp as only dialogService should use it

* SG-878 - (1) Refactor configurable simple dialog to reduce icon class repetition in html (2) Update simple dialog options to use new Translation interface and update comp to properly process placeholders again

* SG-878 - Reverting all simple dialog changes as, per discussion with Oscar, going to use composition and go with configurable-simple-dialog comp for use in the dialog service

* SG-878 - Testing latest simple dialog changes

* SG-878 - Update simple-dialog-options

* SG-878 - (1) People & collections component now use dialogService.openSimpleDialog vs custom org upgrade dialog comp (2) Rename configurable-simple-dialog to simple-configurable-dialog for better folder placement

* SG-878 - Update formatting of Simple dialog options js doc comments

* SG-878 - Remove test code

* SG-878 -Remove org upgrade dialog component as it has been replaced with dialog service openSimpleDialog method call

* SG-878 - Move models to be near where they are used which is in the simple-configurable-dialog folder.

* SG-878 - Refactor icon classes into simple getter per Oscar's suggestions

* SG-878 - Refactor Translation placeholderValues to be just placeholders

* SG-878 - Refactor Simple Dialog Options to remove isLocalized as it doesn't buy us that much to have it. We can just check if a passed in value is a string or a Translation object to determine if we need to translate it.

* SG-878 - Dialog Svc - remove backdrop classes from openSimpleDialog method as standard open method applies them

* SG-878 - (1) Refactor simple configurable dialog to use comp properties instead of re-using option props (2) Reduce html complexity  (3) Create translate func for code simplification (4)  Remove isTranslation type guard as simple object check is sufficient

* SG-668 - Refactoring collections & people comps use of dialog service openSimpleDialog to condense options per PR feedback

* SG-878 - SimpleConfigDialog - (1) Footer classes were missing so btns were not spaced out properly (2) cancel btn text fixed to reference component property

* SG-878 - First pass at creating a storybook example for the new openSimpleDialog method on the dialogService.

* SG-878 - SimpleConfigurableDialog storybook - now displays callout with dialog results for better example

* SG-878 - SimpleConfigurableDialog - use text-main tailwind class for h2s so that text is colored properly on black background

* SG-878 - SimpleConfigurableDialog - Remove unstyled buttons and colored text and replace with plain secondary buttons to fix visibility issues on dark background.

* Update libs/components/src/dialog/simple-configurable-dialog/models/simple-dialog-type.enum.ts

SG-878 - Remove early commentary about use of simple-dialog-type enum

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.html

SG-878 - SimpleConfigurableDialog html - consolidate title html to 1 line

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts

SG-878 - SimpleConfigurableDialog comp ts - remove unnecessary comment.

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.service.stories.ts

SG-878 - SimpleConfigDialog storybook fixes

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.service.stories.ts

SG-878 - SimpleConfigDialog storybook fixes

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* Update libs/components/src/dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts

SG-878 - SimpleConfigDialog comp - remove unnecessary comment

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>

* SG-668 / SG-878 - Migrate Free Org Upgrade Flows logic from deprecated collections component to vault component

* SG-878 - Refactor the free org upgrade dialog to leverage separate methods to improve code and decrease cyclomatic complexity

Co-authored-by: Oscar Hinton <Hinton@users.noreply.github.com>
2023-01-24 16:38:14 -05:00
Brandon Maharaj 497b08df44
[SG-458] Master Password security checks (browser) (#4502)
* work: add base logic for password lookup

* work: added browser support for hibp

* work: SG-558 combine weak + leak warning

* fix: language stuff

* fix: form values are neater tho :(

* fix: no cast
2023-01-24 16:04:01 -05:00
Daniel James Smith ae3edcc34d
[PS-2108] Enpass importer add support for androidurl's (#4314)
* Move and rename importers ater new naming convention

Create a subfolder to hold all enpass-importers
Change names to new naming convention
Fix imports
Remove entries from whitelist

* Added types for exported enpass json file

* Add unit tests to verify for current behaviour

* Prefer types over enums

* Replace `any` types with defined Enpass types

* Add support for parsing Android urls

Fixes #2831
Added test-file with several combinations
Wrote test cases to verify
2023-01-24 21:03:11 +01:00
rr-bw 9e1e1ba4eb
add progress component, template, and stories (#4437) 2023-01-24 08:23:22 -08:00
rr-bw b27e2605d5
add button disabled state: cursor-not-allowed (#4436) 2023-01-24 08:22:10 -08:00
Daniel James Smith 5907ebad3f
[PS-2323] Add honorific title mx (#4533) 2023-01-24 16:54:52 +01:00
Andreas Coroiu 2376632603
[EC-822] fix: filter provider orgs (#4489) 2023-01-24 14:29:29 +01:00
Kyle Spearrin 2563fbd57d
update to 600k per latest owasp (#4546) 2023-01-24 06:34:09 -05:00
Robyn MacCallum afcedbaf25
Add variable defining default locale as english (#4406) 2023-01-23 10:39:44 -05:00