1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00
The browser extension vault (Chrome, Firefox, Opera, Edge, Safari, & more).
Go to file
Jared Snider f691854387
Auth - PM-7392 & PM-7436 - Token Service - Desktop - Add disk fallback for secure storage failures (#8913)
* 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>
2024-06-03 12:36:45 -04:00
.checkmarx Update SAST preset to query set (#8569) 2024-04-01 16:24:04 -04:00
.codescene disable code duplication check in unit tests (#6773) 2023-11-06 15:48:34 -05:00
.github Upgrade to macos-13 runner (#9457) 2024-05-31 13:58:10 -06:00
.husky Update husky hooks (#7738) 2024-01-30 06:50:54 -08:00
.storybook [PM-7343] AnonLayoutComponent Implementation Groundwork (#8585) 2024-05-06 18:34:40 -07:00
.vscode Add rust analyzer support for desktop-native (#8830) 2024-04-22 18:58:29 +02:00
apps Auth - PM-7392 & PM-7436 - Token Service - Desktop - Add disk fallback for secure storage failures (#8913) 2024-06-03 12:36:45 -04:00
bitwarden_license [AC-1939] Manage provider payment information (#9415) 2024-06-03 11:01:14 -04:00
libs Auth - PM-7392 & PM-7436 - Token Service - Desktop - Add disk fallback for secure storage failures (#8913) 2024-06-03 12:36:45 -04:00
patches Make Argon2 WebAssembly module unload after use (#5072) 2023-07-03 07:12:42 -05:00
scripts [deps] Autofill: Update prettier to v3 (#7014) 2023-11-29 16:15:20 -05:00
.browserslistrc [PM-6788][PM-7755] add babel/preset-env and browserslist (#9383) 2024-05-30 18:42:26 -04:00
.editorconfig
.eslintignore [PM-5539] Migrate ThemingService (#8219) 2024-03-13 15:25:39 +00:00
.eslintrc.json [PM-7289] Create generator libraries (#9432) 2024-05-30 15:38:31 -04:00
.git-blame-ignore-revs add prettier formatting merge commit to .git-blame-ignore-revs (#7037) 2023-11-29 17:53:26 -05:00
.gitattributes
.gitignore Noop notifications for dev (#6671) 2023-10-24 15:18:23 +02:00
.nvmrc [PM-8229] Bump node to 20.13.1-LTS (#8078) 2024-05-30 13:24:06 +02:00
.prettierignore [PM-5551] Removing Autofill v2 and AutofillOverlay Feature Flags (#7642) 2024-01-22 17:11:07 +00:00
.prettierrc.json Update CL documentation (#5379) 2023-05-08 14:46:59 +02:00
angular.json [PS] fix broken local Storybook (#9075) 2024-05-07 14:48:23 -04:00
babel.config.json [PM-6788] enable bugfixes in babel/preset-env (#9465) 2024-05-31 17:59:39 -04:00
clients.code-workspace [AC-2302] Extract device approve/deny logic into a service (#8818) 2024-05-20 11:18:23 +01:00
CONTRIBUTING.md
jest.config.js [PM-7289] Create generator libraries (#9432) 2024-05-30 15:38:31 -04:00
LICENSE_BITWARDEN.txt Update LICENSE_BITWARDEN.txt (#3505) 2022-09-13 09:04:36 -04:00
LICENSE_GPL.txt
LICENSE.txt
package-lock.json Bumped client version(s) (#9464) 2024-05-31 17:36:04 +00:00
package.json [PM-6788][PM-7755] add babel/preset-env and browserslist (#9383) 2024-05-30 18:42:26 -04:00
README.md Fix badge links (#7713) 2024-01-30 20:24:07 +00:00
SECURITY.md
tailwind.config.js create team owned libs for billing, admin-console, platform (#7233) 2023-12-15 09:02:21 -05:00
tsconfig.eslint.json [PM-7289] Create generator libraries (#9432) 2024-05-30 15:38:31 -04:00
tsconfig.json [PM-7289] Create generator libraries (#9432) 2024-05-30 15:38:31 -04:00

Bitwarden

GitHub Workflow browser build on main GitHub Workflow CLI build on main GitHub Workflow desktop build on main GitHub Workflow web build on main gitter chat


Bitwarden Client Applications

This repository houses all Bitwarden client applications except the Mobile application.

Please refer to the Clients section of the Contributing Documentation for build instructions, recommended tooling, code style tips, and lots of other great information to get you started.

We're Hiring!

Interested in contributing in a big way? Consider joining our team! We're hiring for many positions. Please take a look at our Careers page to see what opportunities are currently open as well as what it's like to work at Bitwarden.

Contribute

Code contributions are welcome! Please commit any pull requests against the main branch. Learn more about how to contribute by reading the Contributing Guidelines. Check out the Contributing Documentation for how to get started with your first contribution.

Security audits and feedback are welcome. Please open an issue or email us privately if the report is sensitive in nature. You can read our security policy in the SECURITY.md file.