1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-28 07:49:41 +01:00
Commit Graph

98 Commits

Author SHA1 Message Date
Bernd Schoolmann
e83dca529b
[PM-12607] Move key rotation to km ownership (#11709)
* Move key rotation to km ownership

* Fix build

* Move userkey rotation data provider abstraction to km ownership

* Move userkey rotation data provider abstraction to km ownership

* Fix linting

* Fix CODEOWNERS for key-management web

* Remove incorrect export

* Fix import error
2024-10-26 13:47:40 +02:00
Bernd Schoolmann
b486fcc689
[Pm-13097] Rename cryptoservice to keyservice and move it to km ownership (#11358)
* Rename cryptoservice to keyservice

* Rename cryptoservice to keyservice

* Move key service to key management ownership

* Remove accidentally added file

* Fix cli build

* Fix browser build

* Run prettier

* Fix builds

* Fix cli build

* Fix tests

* Fix incorrect renames

* Rename webauthn-login-crypto-service

* Fix build errors due to merge conflicts

* Fix linting
2024-10-24 19:41:30 +02:00
✨ Audrey ✨
eff9a423da
[PM-8280] email forwarders (#11563)
* forwarder lookup and generation support
* localize algorithm names and descriptions in the credential generator service
* add encryption support to UserStateSubject
* move generic rx utilities to common
* move icon button labels to generator configurations
2024-10-23 18:11:42 +02:00
Jordan Aasen
dab60dbaea
[PM-11926] - send created redirect (#11140)
* send created redirect

* fix test

* fix test

* fix send form save

* return SendData from saveSend

* When saving a Send, bubble up a SendView which can be passed to the SendCreated component

* Use events to initiate navigation and move actual navigation into client-specific component

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-10-01 21:58:00 +02:00
Bernd Schoolmann
d92b2cbea2
[PM-11477] Remove deprecated cryptoservice functions (#10854)
* Remove deprecated cryptoservice functions

* Use getUserkeyWithLegacySupport to get userkey

* Fix tests

* Fix tests

* Fix tests

* Remove unused cryptoservice instances

* Fix build

* Remove unused apiService in constructor

* Fix encryption

* Ensure passed in key is used if present

* Fix sends and folders

* Fix tests

* Remove logged key

* Fix import for account restricted keys
2024-09-24 11:28:33 +02:00
✨ Audrey ✨
cf48db5ed1
[PM-11418] generator policy constraints (#11014)
* add constraint support to UserStateSubject
* add dynamic constraints
* implement password policy constraints
* replace policy evaluator with constraints in credential generation service
* add cascade between minNumber and minSpecial

Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
2024-09-23 11:07:47 +02:00
Jordan Aasen
f8fc6269f2
[PM-11899] - send text details component (#11002)
* Temporary local changes not meant to be merged

* WIP - send text details

* send text details

* remove extraneous code

* create base send details component

* remove file components

* fix send text details form

* remove comments

* fix send text details component

* revert type changes

* send created redirect

* Revert "send created redirect"

This reverts commit 36711d54a3.

* Removed hint under textArea, as per design

* Removed unused message keys

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-09-18 14:04:51 +02:00
✨ Audrey ✨
4128b18b27
[PM-8279] password generation component (#10805) 2024-09-10 12:43:33 -04:00
✨ Audrey ✨
8c4b8d71ea
[PM-5609] passphrase settings component & services (#10535) 2024-08-28 09:26:17 -04:00
Matt Gibson
9459cda304
Pm-10953/add-user-context-to-sync-replaces (#10627)
* Require userId for setting masterKeyEncryptedUserKey

* Replace folders for specified user

* Require userId for collection replace

* Cipher Replace requires userId

* Require UserId to update equivalent domains

* Require userId for policy replace

* sync state updates between fake state for better testing

* Revert to public observable tests

Since they now sync, we can test single-user updates impacting active user observables

* Do not init fake states through sync

Do not sync initial null values, that might wipe out already existing data.

* Require userId for Send replace

* Include userId for organization replace

* Require userId for billing sync data

* Require user Id for key connector sync data

* Allow decode of token by userId

* Require userId for synced key connector updates

* Add userId to policy setting during organization invite accept

* Fix cli

* Handle null userId

---------

Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
2024-08-26 20:44:08 -04:00
Jordan Aasen
199ac3de45
[PM-10045] - SendCreated page (#10331)
* WIP - send created component

* WIP - send created page

* finalize send created component and specs

* add extra padding

* undo browser extension refresh

* fix tests

* fix error
2024-08-15 07:59:00 -07:00
✨ Audrey ✨
f8961e35e7
[PM-10682] introduce user state subject (#10426)
* includes first pass at standardized reactive dependency interfaces
2024-08-07 11:06:28 -04:00
✨ Audrey ✨
d26ea1be5f
[PM-9423] use observable user encryptor in secret state (#10271) 2024-08-01 17:25:10 -04:00
✨ Audrey ✨
cbac5fde11
[PM-10259] improve forwarder rpc error handling (#10330)
* only accept `application/json` responses
2024-07-30 15:39:49 -04:00
✨ Audrey ✨
8c78959aaf
[PM-9613] port forwarders to integrations (#10075)
* introduced forwarder integrations
* simply contexts
* report error and message when both are present in an RPC response
2024-07-30 08:40:52 -04:00
✨ Audrey ✨
bb5f56838a
[PM-8809] delete common generator code (#10218) 2024-07-25 12:08:18 -04:00
Daniel James Smith
92692388cb
Move stranded enum into @bitwarden/vault-export-ui (#10247)
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-07-25 11:17:35 -04:00
renovate[bot]
b9eb4003a1
[deps] Autofill: Update prettier to v3.3.3 (#10228)
* [deps] Autofill: Update prettier to v3.3.3

* prettier formatting changes

* fix SyntaxError for literal @ inline html

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
2024-07-25 11:11:55 -04:00
✨ Audrey ✨
24b84985f5
[PM-9598] Introduce integrations (#10019)
Factor general integration logic out of the forwarder code.

- Integration metadata - information generalized across any integration
- Rpc mechanism - first step towards applying policy to integrations is abstracting their service calls (e.g. static baseUrl)

Email forwarder integrations embedded this metadata. It was extracted to begin the process of making integrations compatible with meta-systems like policy.

This PR consists mostly of interfaces, which are not particularly useful on their own. Examples on how they're used can be found in the readme.
2024-07-09 11:04:40 -04:00
✨ Audrey ✨
cb400a1ba6
[PM-6394] remove policy evaluator cache (#9807) 2024-07-01 10:25:21 -04:00
✨ Audrey ✨
1080d46aaf
[PM-9170] generator library migrations (#9812)
* migrate browser to generator libraries
* migrate cli to generator libraries
* migrate desktop to generator libraries
* migrate angular library to generator libraries
* migrate web to generator libraries
2024-06-27 12:16:04 -04:00
✨ Audrey ✨
a3514001c0
shuffle copied array (#9847) 2024-06-26 15:41:02 -04:00
Jake Fink
b306554675
[PM-6789] finish key rotation distribution and fix legacy user (#9498)
* finish key rotation distribution and fix legacy user

* add ticket to TODO

* PR feedback: docs and renaming

* fix webauthn tests

* add test for send service

* add await to test
2024-06-20 11:36:24 -04:00
✨ Audrey ✨
95554af9e2
[PM-8858] include only 1 digit in passphrase (#9632) 2024-06-17 15:55:18 +01:00
✨ Audrey ✨
44b5971458
[PM-8857] fix passphrase missing number (#9634) 2024-06-14 13:19:51 -04:00
✨ Audrey ✨
882a432ca6
[PM-7289] implement generator libraries (#9549)
This is a copy of the files. The source in `@bitwarden/common` will be deleted once
all of the applications have been ported to the library.
2024-06-11 16:06:37 -04:00
✨ Audrey ✨
3acdd9d8fd
[PM-7290] replace legacy abstraction with generation algorithms (#9435)
* replace legacy abstraction with generation algorithms
* delete mv2-based generator services
2024-06-04 11:26:20 -04:00
Matt Gibson
3e93fc9461
Prefer UserKeyDefinitions for getUser state (#9487) 2024-06-04 11:13:04 -04:00
✨ Audrey ✨
90e7e16df6
move state provider extensions to tools folder (#9436) 2024-05-30 15:37:40 -04:00
✨ Audrey ✨
bb277565df
fix lint failure (#9440) 2024-05-30 14:34:36 -04:00
✨ Audrey ✨
0ef5ab79c6
Revert "Revert "Change website default value to empty string. (#9127)" (#9437)" (#9438)
This reverts commit d0914ac81f.
2024-05-30 18:20:07 +00:00
✨ Audrey ✨
d0914ac81f
Revert "Change website default value to empty string. (#9127)" (#9437)
This reverts commit c37006c564.
2024-05-30 20:16:32 +02:00
pixls
c37006c564
Change website default value to empty string. (#9127)
Fastmail API returns and error when passed a null value in forDomain.
Empty string is the preferred blank option.

Co-authored-by: yara <ybeadenkopf@fastmailteam.com>
2024-05-30 13:32:25 -04:00
✨ Audrey ✨
6ca836f31d
fix clear when account unavailable error (#9299)
* fix clear when account unavailable error
* remove explicit password history clear on logout
2024-05-22 10:03:17 -04:00
✨ Audrey ✨
a16dc84a0a
[PM-6819] Credential generator MV3 integration (#8998)
* replace `PasswordGeneratorService` with `legacyPasswordGenerationServiceFactory`
* replace `UsernameGeneratorService` with `legacyUsernameGenerationServiceFactory`
* migrate generator options and history
* apply policy immediately once available
* suppress duplicate policy emissions
* run password generation response code in `ngZone`
2024-05-20 18:08:49 +01:00
✨ Audrey ✨
4ae208fabc
rotate sends from original key to rotated key (#9130) 2024-05-10 16:08:05 -04:00
Matt Gibson
c70a5aa024
[PM-6688] Use AccountService as account source (#8893)
* Use account service to track accounts and active account

* Remove state service active account Observables.

* Add email verified to account service

* Do not store account info on logged out accounts

* Add account activity tracking to account service

* Use last account activity from account service

* migrate or replicate account service data

* Add `AccountActivityService` that handles storing account last active data

* Move active and next active user to account service

* Remove authenticated accounts from state object

* Fold account activity into account service

* Fix builds

* Fix desktop app switch

* Fix logging out non active user

* Expand helper to handle new authenticated accounts location

* Prefer view observable to tons of async pipes

* Fix `npm run test:types`

* Correct user activity sorting test

* Be more precise about log out messaging

* Fix dev compare errors

All stored values are serializable, the next step wasn't necessary and was erroring on some types that lack `toString`.

* If the account in unlocked on load of lock component, navigate away from lock screen

* Handle no users case for auth service statuses

* Specify account to switch to

* Filter active account out of inactive accounts

* Prefer constructor init

* Improve comparator

* Use helper methods internally

* Fixup component tests

* Clarify name

* Ensure accounts object has only valid userIds

* Capitalize const values

* Prefer descriptive, single-responsibility guards

* Update libs/common/src/state-migrations/migrate.ts

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Fix merge

* Add user Id validation

activity for undefined was being set, which was resulting in requests for the auth status of `"undefined"` (string) userId, due to key enumeration. These changes stop that at both locations, as well as account add for good measure.

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
2024-04-30 09:13:02 -04:00
Ike
1e4158fd87
[PM-5735] Create kdf Service (#8715)
* key connector migration initial

* migrator complete

* fix dependencies

* finalized tests

* fix deps and sync main

* clean up definition file

* fixing tests

* fixed tests

* fixing CLI, Browser, Desktop builds

* fixed factory options

* reverting exports

* implemented UserKeyDefinition clearOn

* Initial Kdf Service Changes

* rename and account setting kdfconfig

* fixing tests and renaming migration

* fixed DI ordering for browser

* rename and fix DI

* Clean up Migrations

* fixing migrations

* begin data structure changes for kdf config

* Make KDF more type safe; co-author: jlf0dev

* fixing tests

* Fixed CLI login and comments

* set now accepts userId and test updates

---------

Co-authored-by: Jake Fink <jfink@bitwarden.com>
2024-04-25 11:26:01 -07:00
✨ Audrey ✨
1e67014158
fix update loop when overwriting state from buffer (#8834) 2024-04-19 13:12:17 -04:00
✨ Audrey ✨
44d59f0d8c
[PM-7419] add buffered state (#8706)
Introduces a state manager that buffers data until an observed dependency signals it should 
overwrite another state manager with the buffered data. It can be used to implement 
migrations of encrypted data, edit-apply loops (such as used for save operations), and to 
map between encryption keys/formats.
2024-04-12 13:31:58 -04:00
Matt Gibson
8d698d9d84
[PM-7169][PM-5267] Remove auth status from account info (#8539)
* remove active account unlocked from state service

* Remove status from account service `AccountInfo`

* Fixup lingering usages of status

Fixup missed factories

* Fixup account info usage

* fixup CLI build

* Fixup current account type

* Add helper for all auth statuses to auth service

* Fix tests

* Uncomment mistakenly commented code

* Rework logged out account exclusion tests

* Correct test description

* Avoid getters returning observables

* fixup type
2024-04-12 09:25:45 +02:00
Matt Gibson
1308b326fd
Tools/specify-clearon-conditions (#8596)
* Specify user clear events for event upload

* Specify generator clear events

* Specify clear events for user send data

* Specify generic clear on logout for encrypted secret state

* Allow `clearOn`event to be passed into secret state

* Match current data persistence rules

* Clear ui memory on lock + logout
2024-04-08 12:26:22 +00:00
✨ Audrey ✨
edf35a9ad1
fix fencepost errors in padded data packer (#8631)
Unit tests trim vertical pipes when appear in the data packer's JSON data, but electron is not as forgiving. It throws errors in this situation. This fixes the error by trimming the pipes before b64 decoding the result.
2024-04-05 13:03:04 -04:00
✨ Audrey ✨
b579bc8f96
[PM-6818] legacy generator service adapter (#8582)
* introduce legacy generators
* introduce generator navigation service
* Introduce default options. These accept a userId so that they can be policy-defined
* replace `GeneratorOptions` with backwards compatible `GeneratorNavigation`
2024-04-03 13:48:33 -04:00
Tom
a6e178f1e6
[PM-5574] sends state provider (#8373)
* Adding the key definitions and tests and initial send state service

* Adding the abstraction and implementing

* Planning comments

* Everything but fixing the send tests

* Moving send tests over to the state provider

* jslib needed name refactor

* removing get/set encrypted sends from web vault state service

* browser send state service factory

* Fixing conflicts

* Removing send service from services module and fixing send service observable

* Commenting the migrator to be clear on why only encrypted

* No need for service factories in browser

* browser send service is no longer needed

* Key def test cases to use toStrictEqual

* Running prettier

* Creating send test data to avoid code duplication

* Adding state provider and account service to send in cli

* Fixing the send service test cases

* Fixing state definition keys

* Moving to observables and implementing encryption service

* Fixing key def tests

* The cli was using the deprecated get method

* The observables init doesn't need to happen in constructor

* Missed commented out code

* If enc key is null get user key

* Service factory fix
2024-04-02 12:39:06 -04:00
✨ Audrey ✨
df058ba399
[PM-6146] generator history (#8497)
* introduce `GeneratorHistoryService` abstraction
* implement generator history service with `LocalGeneratorHistoryService` 
* cache decrypted data using `ReplaySubject` instead of `DerivedState`
* move Jsonification from `DataPacker` to `SecretClassifier` because the classifier 
  is the only component that has full type information. The data packer still handles 
  stringification.
2024-03-28 12:19:12 -04:00
✨ Audrey ✨
d000f081da
[PM-6556] reintroduce policy reduction for multi-org accounts (#8409) 2024-03-26 07:59:45 -04:00
✨ Audrey ✨
05609a814c
[PM-6847] SecretState array and record support (#8378) 2024-03-21 17:44:42 +01:00
Daniel James Smith
ea0035f658
[PM-6755] Fix password generation defaults on CLI (#8308)
* Fix minSpecial for pwd generation being set to 1 instead of zero

* Use less magic numbers

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
2024-03-19 16:20:57 +00:00
✨ Audrey ✨
c7318311af
[PM-5974] introduce ForwarderGeneratorStrategy (#8207)
* update defaults to include `website` parameter
* update utilities tests to include `website` parameter
2024-03-07 12:45:56 -05:00