passbolt-browser-extension 4.12.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci/jobs/build.yml +2 -2
- package/.gitlab-ci/jobs/publish.yml +1 -1
- package/.gitlab-ci/jobs/test.yml +3 -3
- package/CHANGELOG.md +35 -3
- package/Gruntfile.js +9 -22
- package/RELEASE_NOTES.md +33 -30
- package/doc/browser-extension-class-diagram.md +10 -1
- package/jest.config.json +4 -1
- package/package.json +15 -6
- package/src/all/background_page/controller/InformMenuController/InformMenuController.js +1 -1
- package/src/all/background_page/controller/accountRecovery/downloadOrganizationGenerateKeyController.js +58 -0
- package/src/all/background_page/controller/accountRecovery/downloadOrganizationGenerateKeyController.test.js +47 -0
- package/src/all/background_page/controller/auth/getCsrfTokenController.js +53 -0
- package/src/all/background_page/controller/auth/getCsrfTokenController.test.js +42 -0
- package/src/all/background_page/controller/export/exportResourcesFileController.test.js +2 -2
- package/src/all/background_page/controller/resourceGridSetting/getResourceGridUserSettingController.test.js +10 -9
- package/src/all/background_page/controller/resourceGridSetting/resetResourceGridUserSettingController.js +53 -0
- package/src/all/background_page/controller/resourceGridSetting/resetResourceGridUserSettingController.test.js +37 -0
- package/src/all/background_page/controller/resourceGridSetting/setResourceGridUserSettingController.test.js +7 -6
- package/src/all/background_page/controller/share/shareResourcesController.test.js +2 -7
- package/src/all/background_page/event/appEvents.js +19 -9
- package/src/all/background_page/event/resourceEvents.js +13 -0
- package/src/all/background_page/model/entity/resource/external/externalResourceEntity.js +7 -7
- package/src/all/background_page/model/entity/resource/external/externalResourceEntity.test.js +3 -3
- package/src/all/background_page/model/entity/resource/resourceEntity.js +1 -1
- package/src/all/background_page/model/entity/resource/resourceEntity.test.js +2 -2
- package/src/all/background_page/model/entity/resource/resourcesCollection.test.js +1 -1
- package/src/all/background_page/model/entity/totp/{totpEntity.js → externalTotpEntity.js} +8 -70
- package/src/all/background_page/model/entity/totp/totpEntity.test.js +26 -26
- package/src/all/background_page/model/import/resources/csvRowParser/csvKdbxRowParser.js +2 -2
- package/src/all/background_page/model/import/resources/csvRowParser/csvKdbxRowParser.test.js +1 -1
- package/src/all/background_page/model/import/resources/resourcesKdbxImportParser.js +3 -3
- package/src/all/background_page/service/group/groupUpdateService.test.js +2 -2
- package/src/all/background_page/service/local_storage/resourceGridSettingLocalStoratge.test.js +135 -0
- package/src/all/background_page/service/local_storage/ressourceGridSettingLocalStorage.js +33 -3
- package/src/all/background_page/service/resource/export/exportResourcesService.js +2 -2
- package/src/all/background_page/service/resource/export/exportResourcesService.test.js +2 -2
- package/src/all/background_page/service/resource/getOrFindResourcesService.test.js +1 -1
- package/src/all/background_page/service/resource/update/resourceUpdateService.test.js +1 -1
- package/src/all/background_page/service/share/shareResourceService.test.js +8 -11
- package/src/chrome/manifest.json +1 -1
- package/src/chrome-mv3/manifest.json +1 -1
- package/src/firefox/manifest.json +1 -1
- package/src/safari/manifest.json +1 -1
- package/test/mocks/svg.js +2 -0
- package/webpack-data.config.js +34 -0
- package/webpack-data.in-form-call-to-action.config.js +34 -0
- package/webpack-data.in-form-menu.config.js +34 -0
- package/src/all/background_page/model/entity/resource/metadata/resourceMetadataEntity.js +0 -146
- package/src/all/background_page/model/entity/resource/metadata/resourceMetadataEntity.test.js +0 -90
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
build:
|
|
2
2
|
stage: build
|
|
3
|
-
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:
|
|
3
|
+
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:22
|
|
4
4
|
extends: .rules
|
|
5
5
|
artifacts:
|
|
6
6
|
when: always
|
|
@@ -22,7 +22,7 @@ build:
|
|
|
22
22
|
|
|
23
23
|
build_mv3:
|
|
24
24
|
stage: build
|
|
25
|
-
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:
|
|
25
|
+
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:22
|
|
26
26
|
extends: .rules
|
|
27
27
|
artifacts:
|
|
28
28
|
when: always
|
package/.gitlab-ci/jobs/test.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
tester:
|
|
2
2
|
stage: test
|
|
3
|
-
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:
|
|
3
|
+
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:22
|
|
4
4
|
coverage: /Lines\s* [:] ([\d\.]+)%/
|
|
5
5
|
extends: .rules
|
|
6
6
|
script:
|
|
@@ -17,7 +17,7 @@ tester:
|
|
|
17
17
|
|
|
18
18
|
linter:
|
|
19
19
|
stage: test
|
|
20
|
-
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:
|
|
20
|
+
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:22
|
|
21
21
|
extends: .rules
|
|
22
22
|
script:
|
|
23
23
|
- npm ci
|
|
@@ -26,7 +26,7 @@ linter:
|
|
|
26
26
|
audit:
|
|
27
27
|
allow_failure: true
|
|
28
28
|
stage: test
|
|
29
|
-
image: node:
|
|
29
|
+
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/node:22
|
|
30
30
|
extends: .rules
|
|
31
31
|
script:
|
|
32
32
|
- npm audit
|
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,40 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [5.0.0] - 2025-04-09
|
|
8
|
+
### Added
|
|
9
|
+
PB-33425 Allow users to reset resource grid columns to default factory settings through the columns settings dropdown
|
|
10
|
+
PB-35232 Add a resource grid filter to display only private resources
|
|
11
|
+
PB-37332 Rename encrypted description to note and clearly differentiate between the metadata description and the secret note
|
|
12
|
+
PB-37620 Allow users to resize and reorder the users grid
|
|
13
|
+
PB-37638 Add a details sidebar for multiple grid resource selections to allow users to review their selection
|
|
14
|
+
PB-38938 Redirect administrator to a home page instead of the first available settings page
|
|
15
|
+
PB-38940 Organize the administration menu into meaningful sections
|
|
16
|
+
PB-39415 Redesign the application
|
|
17
|
+
PB-39464 Introduce unified and modular resource creation and editing dialogs to support upcoming resource types
|
|
18
|
+
PB-40150 Display a default resource icon in the grid
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
PB-28280 Display the complete resource path in sidebar details
|
|
22
|
+
PB-33618 Disable the "select all" dropdown in the users grid until bulk operations are supported
|
|
23
|
+
PB-39994 Display a pending changes banner after modifying administration email notification settings
|
|
24
|
+
PB-39995 Ease identification of generated organization recovery key file name by including the GPG key identifier
|
|
25
|
+
PB-40268 Display a pending changes banner after modifying administration internationalization settings
|
|
26
|
+
PB-40270 Display a pending changes banner after modifying administration email server settings
|
|
27
|
+
PB-40271 Display a pending changes banner after modifying administration RBAC settings
|
|
28
|
+
PB-40272 Display a pending changes banner after modifying administration users directory settings
|
|
29
|
+
PB-40273 Display a pending changes banner after modifying administration SSO settings
|
|
30
|
+
PB-40669 Display loading feedback in the folder navigation tree during folder loading
|
|
31
|
+
PB-40186 WP6-7.5 Validate the object_type property of v5 secrets to mitigate unwanted content decryption attacks
|
|
32
|
+
PB-40576 Reposition the expiry item in resources grid column settings to reflect its lower display priority in the grid
|
|
33
|
+
PB-41275 Display the complete folder path in sidebar details
|
|
34
|
+
|
|
35
|
+
### Maintenance
|
|
36
|
+
PB-40117 Upgrade browser extensions repositories to node 22
|
|
37
|
+
PB-40687 Upgrade vulnerable library babel and relative
|
|
38
|
+
40688 Upgrade vulnerable library i18next-parser and relative
|
|
8
39
|
|
|
40
|
+
## [4.12.0] - 2024-03-10
|
|
9
41
|
### Added
|
|
10
42
|
PB-38932 WP6-3.1 Implement navigation to content types migrate metadata content administration page
|
|
11
43
|
PB-38915 WP6-3.2 Implement findUpgradeContentDetails function on MetadataMigrateContentServiceWorkerService to retrieve content to upgrade details in the content types migrate metadata administration page
|
|
@@ -36,7 +68,6 @@ PB-39388 Edition and creation of resources now export object_type in metadata pr
|
|
|
36
68
|
PB-39084 When selecting multiple resources, the OS is detected and the right shortcut is used
|
|
37
69
|
|
|
38
70
|
## [4.11.0] - 2024-01-29
|
|
39
|
-
|
|
40
71
|
### Added
|
|
41
72
|
PB-37669: WP5-1.1 Implement save method in ServiceWorker
|
|
42
73
|
PB-37670: WP5-1.2 Implement SaveMetadataSettingsService in the Service Worker to handle saving of metadata types settings
|
|
@@ -2043,7 +2074,8 @@ self registration settings option in the left-side bar
|
|
|
2043
2074
|
- LU: Logged in user
|
|
2044
2075
|
|
|
2045
2076
|
## [4.12.0] - 2024-03-10
|
|
2046
|
-
[Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/
|
|
2077
|
+
[Unreleased]: https://github.com/passbolt/passbolt_browser_extension/compare/v5.0.0...HEAD
|
|
2078
|
+
[5.0.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.12.0...v5.0.0
|
|
2047
2079
|
[4.12.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.11.0...v4.12.0
|
|
2048
2080
|
[4.11.0]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.10.2...v4.11.0
|
|
2049
2081
|
[4.10.2]: https://github.com/passbolt/passbolt_browser_extension/compare/v4.10.0...v4.10.2
|
package/Gruntfile.js
CHANGED
|
@@ -38,7 +38,7 @@ module.exports = function (grunt) {
|
|
|
38
38
|
* Import package.json file content
|
|
39
39
|
*/
|
|
40
40
|
var pkg = grunt.file.readJSON('package.json');
|
|
41
|
-
var manifestVersion = pkg.version.replace(
|
|
41
|
+
var manifestVersion = pkg.version.replace(/-.*(\.\d*)$/,'$1');
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Load and enable Tasks
|
|
@@ -160,28 +160,24 @@ module.exports = function (grunt) {
|
|
|
160
160
|
// Avatar
|
|
161
161
|
nonull: true,
|
|
162
162
|
cwd: path.node_modules + 'passbolt-styleguide/src/img/avatar',
|
|
163
|
-
src: ['
|
|
163
|
+
src: ['group_default.png'],
|
|
164
164
|
dest: path.build_web_accessible_resources + 'img/avatar',
|
|
165
165
|
expand: true
|
|
166
166
|
}, {
|
|
167
167
|
// Controls
|
|
168
168
|
nonull: true,
|
|
169
169
|
cwd: path.node_modules + 'passbolt-styleguide/src/img/controls',
|
|
170
|
-
src: [
|
|
171
|
-
'check_black.svg', 'check_white.svg', 'dot_black.svg', 'dot_white.svg', 'dot_red.svg',
|
|
172
|
-
'infinite-bar.gif', 'loading_dark.svg', 'loading_light.svg', 'chevron-right_black.svg',
|
|
173
|
-
'chevron-right_white.svg', 'chevron-down_black.svg', 'chevron-down_white.svg', 'chevron-down_blue.svg',
|
|
174
|
-
'success.svg', 'fail.svg', 'warning.svg'
|
|
175
|
-
],
|
|
170
|
+
src: ['check_tick.svg'],
|
|
176
171
|
dest: path.build_web_accessible_resources + 'img/controls',
|
|
177
172
|
expand: true
|
|
178
|
-
},
|
|
173
|
+
},
|
|
174
|
+
{
|
|
179
175
|
// Icons / logo
|
|
180
176
|
nonull: true,
|
|
181
177
|
cwd: path.node_modules + 'passbolt-styleguide/src/img/logo',
|
|
182
178
|
src: [
|
|
183
|
-
'icon-
|
|
184
|
-
'logo.svg', 'logo_white.
|
|
179
|
+
'icon-48.png',
|
|
180
|
+
'logo.svg', 'logo_white.svg',
|
|
185
181
|
'icon-without-badge.svg',
|
|
186
182
|
'icon-inactive.svg',
|
|
187
183
|
'icon-badge-1.svg',
|
|
@@ -199,7 +195,6 @@ module.exports = function (grunt) {
|
|
|
199
195
|
cwd: path.node_modules + 'passbolt-styleguide/src/img/logo',
|
|
200
196
|
src: [
|
|
201
197
|
'icon-16.png',
|
|
202
|
-
'icon-19.png',
|
|
203
198
|
'icon-32.png',
|
|
204
199
|
'icon-32-signout.png',
|
|
205
200
|
'icon-32-badge-1.png',
|
|
@@ -209,7 +204,6 @@ module.exports = function (grunt) {
|
|
|
209
204
|
'icon-32-badge-5.png',
|
|
210
205
|
'icon-32-badge-5+.png',
|
|
211
206
|
'icon-48.png',
|
|
212
|
-
'icon-64.png',
|
|
213
207
|
'icon-128.png'],
|
|
214
208
|
dest: path.build_web_accessible_resources + 'img/icons',
|
|
215
209
|
expand: true
|
|
@@ -224,16 +218,9 @@ module.exports = function (grunt) {
|
|
|
224
218
|
// Third party logos
|
|
225
219
|
nonull: true,
|
|
226
220
|
cwd: path.node_modules + 'passbolt-styleguide/src/img/third_party',
|
|
227
|
-
src: ['
|
|
221
|
+
src: ['appstore.svg', 'playstore.svg'],
|
|
228
222
|
dest: path.build_web_accessible_resources + 'img/third_party',
|
|
229
223
|
expand: true
|
|
230
|
-
}, {
|
|
231
|
-
// theme preview images
|
|
232
|
-
nonull: true,
|
|
233
|
-
cwd: path.node_modules + 'passbolt-styleguide/src/img/themes',
|
|
234
|
-
src: ['default.png', 'midgar.png', 'solarized_dark.png', 'solarized_light.png'],
|
|
235
|
-
dest: path.build_web_accessible_resources + 'img/themes',
|
|
236
|
-
expand: true
|
|
237
224
|
}, {
|
|
238
225
|
// CSS files default
|
|
239
226
|
cwd: path.node_modules + 'passbolt-styleguide/build/css/themes/default',
|
|
@@ -274,7 +261,7 @@ module.exports = function (grunt) {
|
|
|
274
261
|
}, {
|
|
275
262
|
// Fonts
|
|
276
263
|
cwd: path.node_modules + 'passbolt-styleguide/src/fonts',
|
|
277
|
-
src: ['opensans-
|
|
264
|
+
src: ['opensans-variable-font.ttf', 'opensans-italic-variable-font.ttf', 'obfuscation-regular.otf', 'inconsolata-regular.ttf'],
|
|
278
265
|
dest: path.build_web_accessible_resources + 'fonts',
|
|
279
266
|
expand: true
|
|
280
267
|
}, {
|
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
Song: https://www.youtube.com/watch?v=
|
|
1
|
+
Song: https://www.youtube.com/watch?v=yf1f8zNvR1I
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
“Even the longest day has its end” goes the old Irish proverb, and here we are at long last announcing the Passbolt 5.x series. This first release v5.0 ships with a complete redesign of the application’s interface, which had remained largely unchanged since Passbolt’s early days and was limiting the addition of new capabilities. The new version offers a more spacious layout that provides room for meaningful information and addresses long-standing ergonomic issues. If you want to know more, check out what changed in this [Passbolt 5, UI Redesign](https://community.passbolt.com/t/passbolt-5-ui-redesign/12717) community post.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Passbolt v5.0 lays the groundwork for the v5.x series, which will expand the software’s capabilities to handle more sensitive data types that the community has requested, such as key-value pairs, SSH keys, and certificates. The blog article about the passbolt v5.0 release is coming soon.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Of course, with each major version come the inevitable breaking changes, which we strive to minimize as much as possible. With this release, the minimum server requirement has changed to PHP 8.2 or greater, so be sure to check out our latest blog article on [how to upgrade to PHP 8.2](https://www.passbolt.com/blog/preparing-for-passbolt-v5-php-8-2-requirement). Additionally this is a perfect moment to back up your server data and prepare for the unexpected.
|
|
8
8
|
|
|
9
|
-
Thank you to the community for your feedback and
|
|
9
|
+
Thank you to the community for all your feedback, testing, and support in making this milestone possible. We hope you’ll enjoy what Passbolt v5.0 has to offer and look forward to hearing from you.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
|
-
PB-
|
|
14
|
-
PB-
|
|
15
|
-
PB-
|
|
16
|
-
PB-
|
|
17
|
-
PB-
|
|
18
|
-
PB-
|
|
19
|
-
PB-
|
|
20
|
-
PB-
|
|
21
|
-
PB-
|
|
22
|
-
PB-
|
|
23
|
-
PB-38998 WP6-4.3 Implements findAllByDeletedAndNonDeleted on FindResourceTypesService to retrieve all deleted and non deleted resources-types
|
|
24
|
-
PB-38999 WP6-4.4 Implements FindAllByDeletedAndNonDeletedResourceTypesContoller to find all available and deleted resources-types
|
|
25
|
-
PB-39000 WP6-4.5 Implements ResourceTypesServiceWorkerService to request the service worker for retrieving the resource types
|
|
26
|
-
PB-39001 WP6-4.6 Implements ResourceTypesFormEntity to handle the data from the form component
|
|
27
|
-
PB-39002 WP6-4.7 Implements navigation to allow content types administration page
|
|
28
|
-
PB-39003 WP6-4.8 Implements DisplayContentTypesAllowedContentTypesAdministration component to display the administration form
|
|
29
|
-
PB-39004 WP6-4.9 Implements ResourceTypesApiService undelete method to process the undelete of the given resources type
|
|
30
|
-
PB-39005 WP6-4.10 Implements ResourceTypesService delete method to request the API for deleted the given resource type
|
|
31
|
-
PB-39006 WP6-4.11 Implements UpdateResourceTypesService undelete method to process the update of the given resources types
|
|
32
|
-
PB-39009 WP6-4.14 Implements UpdateAllResourceTypesDeletedStatusController to update all resource types deleted status
|
|
33
|
-
PB-39010 WP6-4.15 Implements ResourceTypesServiceWorkerService update and delete method to communication with the service worker
|
|
34
|
-
PB-39011 WP5-4.16 Add to DisplayResourceTypes a "Save" button to trigger the update process of the allowed resource types
|
|
13
|
+
PB-33425 Allow users to reset resource grid columns to default factory settings through the columns settings dropdown
|
|
14
|
+
PB-35232 Add a resource grid filter to display only private resources
|
|
15
|
+
PB-37332 Rename encrypted description to note and clearly differentiate between the metadata description and the secret note
|
|
16
|
+
PB-37620 Allow users to resize and reorder the users grid
|
|
17
|
+
PB-37638 Add a details sidebar for multiple grid resource selections to allow users to review their selection
|
|
18
|
+
PB-38938 Redirect administrator to a home page instead of the first available settings page
|
|
19
|
+
PB-38940 Organize the administration menu into meaningful sections
|
|
20
|
+
PB-39415 Redesign the application
|
|
21
|
+
PB-39464 Introduce unified and modular resource creation and editing dialogs to support upcoming resource types
|
|
22
|
+
PB-40150 Display a default resource icon in the grid
|
|
35
23
|
|
|
36
24
|
### Fixed
|
|
37
|
-
PB-
|
|
38
|
-
PB-
|
|
39
|
-
PB-
|
|
25
|
+
PB-28280 Display the complete resource path in sidebar details
|
|
26
|
+
PB-33618 Disable the "select all" dropdown in the users grid until bulk operations are supported
|
|
27
|
+
PB-39994 Display a pending changes banner after modifying administration email notification settings
|
|
28
|
+
PB-39995 Ease identification of generated organization recovery key file name by including the GPG key identifier
|
|
29
|
+
PB-40268 Display a pending changes banner after modifying administration internationalization settings
|
|
30
|
+
PB-40270 Display a pending changes banner after modifying administration email server settings
|
|
31
|
+
PB-40271 Display a pending changes banner after modifying administration RBAC settings
|
|
32
|
+
PB-40272 Display a pending changes banner after modifying administration users directory settings
|
|
33
|
+
PB-40273 Display a pending changes banner after modifying administration SSO settings
|
|
34
|
+
PB-40669 Display loading feedback in the folder navigation tree during folder loading
|
|
35
|
+
PB-40186 WP6-7.5 Validate the object_type property of v5 secrets to mitigate unwanted content decryption attacks
|
|
36
|
+
PB-40576 Reposition the expiry item in resources grid column settings to reflect its lower display priority in the grid
|
|
37
|
+
PB-41275 Display the complete folder path in sidebar details
|
|
38
|
+
|
|
39
|
+
### Maintenance
|
|
40
|
+
PB-40117 Upgrade browser extensions repositories to node 22
|
|
41
|
+
PB-40687 Upgrade vulnerable library babel and relative
|
|
42
|
+
PB-40688 Upgrade vulnerable library i18next-parser and relative
|
|
@@ -421,7 +421,16 @@ classDiagram
|
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
namespace
|
|
424
|
+
namespace AuthNs {
|
|
425
|
+
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
426
|
+
%% Auth controllers
|
|
427
|
+
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
class GetCsrfTokenController{
|
|
431
|
+
event "passbolt.auth.get-csrf-token"
|
|
432
|
+
+exec() Promise
|
|
433
|
+
}
|
|
425
434
|
|
|
426
435
|
%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
427
436
|
%% Auth services
|
package/jest.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passbolt-browser-extension",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
|
-
"copyright": "Copyright
|
|
5
|
+
"copyright": "Copyright 2025 Passbolt SA",
|
|
6
6
|
"description": "Passbolt web extension for the open source password manager for teams",
|
|
7
7
|
"homepage": "https://www.passbolt.com",
|
|
8
8
|
"repository": "https://github.com/passbolt/passbolt_browser_extension",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
11
|
-
"npm": ">=9.
|
|
10
|
+
"node": ">=22.14.0",
|
|
11
|
+
"npm": ">=10.9.2"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"await-lock": "^2.1.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"locutus": "~2.0.9",
|
|
22
22
|
"openpgp": "^5.11.1",
|
|
23
23
|
"papaparse": "^5.2.0",
|
|
24
|
-
"passbolt-styleguide": "^
|
|
24
|
+
"passbolt-styleguide": "^5.0.0",
|
|
25
25
|
"react": "17.0.2",
|
|
26
26
|
"react-dom": "17.0.2",
|
|
27
27
|
"secrets-passbolt": "github:passbolt/secrets.js#v2.0.1",
|
|
@@ -32,9 +32,13 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/core": "^7.23.2",
|
|
34
34
|
"@babel/eslint-parser": "^7.22.9",
|
|
35
|
+
"@babel/helpers": "^7.26.10",
|
|
35
36
|
"@babel/plugin-transform-runtime": "^7.22.9",
|
|
36
37
|
"@babel/preset-env": "^7.22.9",
|
|
37
38
|
"@babel/preset-react": "^7.22.5",
|
|
39
|
+
"@babel/runtime": "^7.27.0",
|
|
40
|
+
"@babel/runtime-corejs3": "^7.26.10",
|
|
41
|
+
"@svgr/webpack": "^8.1.0",
|
|
38
42
|
"babel-jest": "^29.6.2",
|
|
39
43
|
"babel-loader": "^8.2.3",
|
|
40
44
|
"crx": "^5.0.1",
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
"grunt-contrib-clean": "^2.0.0",
|
|
48
52
|
"grunt-contrib-copy": "^1.0.0",
|
|
49
53
|
"grunt-shell": "^4.0.0",
|
|
50
|
-
"i18next-parser": "^9.0
|
|
54
|
+
"i18next-parser": "^9.3.0",
|
|
51
55
|
"jest": "^29.6.2",
|
|
52
56
|
"jest-each": "^29.6.2",
|
|
53
57
|
"jest-environment-jsdom": "^29.6.2",
|
|
@@ -62,6 +66,11 @@
|
|
|
62
66
|
"webpack": "^5.94.0",
|
|
63
67
|
"webpack-cli": "^5.1.4"
|
|
64
68
|
},
|
|
69
|
+
"overrides": {
|
|
70
|
+
"web-ext": {
|
|
71
|
+
"@babel/runtime": "^7.27.0"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
65
74
|
"scripts": {
|
|
66
75
|
"build": "npx grunt build",
|
|
67
76
|
"build:background-page": "webpack --config webpack.background-page.config.js",
|
|
@@ -20,7 +20,7 @@ import ExternalResourceEntity from "../../model/entity/resource/external/externa
|
|
|
20
20
|
import ResourceInProgressCacheService from "../../service/cache/resourceInProgressCache.service";
|
|
21
21
|
import WorkerService from "../../service/worker/workerService";
|
|
22
22
|
import ResourceTypeModel from "../../model/resourceType/resourceTypeModel";
|
|
23
|
-
import ResourceMetadataEntity from "
|
|
23
|
+
import ResourceMetadataEntity from "passbolt-styleguide/src/shared/models/entity/resource/metadata/resourceMetadataEntity";
|
|
24
24
|
import GetOrFindResourcesService from "../../service/resource/getOrFindResourcesService";
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
4
|
+
*
|
|
5
|
+
* Licensed under GNU Affero General Public License version 3 of the or any later version.
|
|
6
|
+
* For full copyright and license information, please see the LICENSE.txt
|
|
7
|
+
* Redistributions of files must retain the above copyright notice.
|
|
8
|
+
*
|
|
9
|
+
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
10
|
+
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
|
|
11
|
+
* @link https://www.passbolt.com Passbolt(tm)
|
|
12
|
+
* @since 5.0.0
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import FileService from "../../service/file/fileService";
|
|
16
|
+
import {OpenpgpAssertion} from "../../utils/openpgp/openpgpAssertions";
|
|
17
|
+
|
|
18
|
+
class DownloadOrganizationGeneratedKey {
|
|
19
|
+
/**
|
|
20
|
+
* Constructor
|
|
21
|
+
* @param {Worker} worker
|
|
22
|
+
* @param {string} requestId uuid
|
|
23
|
+
*/
|
|
24
|
+
constructor(worker, requestId) {
|
|
25
|
+
this.worker = worker;
|
|
26
|
+
this.requestId = requestId;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Wrapper of exec function to run it with worker.
|
|
31
|
+
*
|
|
32
|
+
* @return {Promise<void>}
|
|
33
|
+
*/
|
|
34
|
+
async _exec() {
|
|
35
|
+
try {
|
|
36
|
+
await this.exec.apply(this, arguments);
|
|
37
|
+
this.worker.port.emit(this.requestId, "SUCCESS");
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(error);
|
|
40
|
+
this.worker.port.emit(this.requestId, "ERROR", error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check the user can continue the account recovery process.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} armoredPrivateKey
|
|
48
|
+
* @return {Promise<void>}
|
|
49
|
+
*/
|
|
50
|
+
async exec(armoredPrivateKey) {
|
|
51
|
+
const privateKey = await OpenpgpAssertion.readKeyOrFail(armoredPrivateKey);
|
|
52
|
+
const keyId = privateKey.getKeyID().toHex().slice(8, 16);
|
|
53
|
+
const date = new Date().toISOString().slice(0, 10);
|
|
54
|
+
await FileService.saveFile(`organization-recovery-private-key_${date}_${keyId}.asc`, armoredPrivateKey, "text/plain", this.worker.tab.id);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default DownloadOrganizationGeneratedKey;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
4
|
+
*
|
|
5
|
+
* Licensed under GNU Affero General Public License version 3 of the or any later version.
|
|
6
|
+
* For full copyright and license information, please see the LICENSE.txt
|
|
7
|
+
* Redistributions of files must retain the above copyright notice.
|
|
8
|
+
*
|
|
9
|
+
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
10
|
+
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
|
|
11
|
+
* @link https://www.passbolt.com Passbolt(tm)
|
|
12
|
+
* @since 5.0.0
|
|
13
|
+
*/
|
|
14
|
+
import DownloadOrganizationGeneratedKey from "./downloadOrganizationGenerateKeyController";
|
|
15
|
+
import FileService from "../../service/file/fileService";
|
|
16
|
+
import {pgpKeys} from "passbolt-styleguide/test/fixture/pgpKeys/keys";
|
|
17
|
+
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
jest.useFakeTimers(); //avoid shift of a few seconds crashing the tests.
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe("DownloadOrganizationGeneratedKey", () => {
|
|
23
|
+
describe("::exec", () => {
|
|
24
|
+
it("Should call for file service to trigger a download with the right information.", async() => {
|
|
25
|
+
expect.assertions(2);
|
|
26
|
+
const armoredPrivateKey = pgpKeys.account_recovery_organization.private;
|
|
27
|
+
const now = new Date().toISOString().slice(0, 10);
|
|
28
|
+
const keyId = pgpKeys.account_recovery_organization.key_id;
|
|
29
|
+
const expectedFilename = `organization-recovery-private-key_${now}_${keyId}.asc`;
|
|
30
|
+
|
|
31
|
+
const mockedWorker = {tab: {id: "tabID"}};
|
|
32
|
+
const controller = new DownloadOrganizationGeneratedKey(mockedWorker);
|
|
33
|
+
jest.spyOn(FileService, "saveFile").mockImplementation(() => {});
|
|
34
|
+
|
|
35
|
+
await controller.exec(armoredPrivateKey);
|
|
36
|
+
|
|
37
|
+
expect(FileService.saveFile).toHaveBeenCalledTimes(1);
|
|
38
|
+
expect(FileService.saveFile).toHaveBeenCalledWith(expectedFilename, armoredPrivateKey, "text/plain", mockedWorker.tab.id);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("Should throw an error if the given string is not a valid open pgp key.", async() => {
|
|
42
|
+
expect.assertions(1);
|
|
43
|
+
const controller = new DownloadOrganizationGeneratedKey();
|
|
44
|
+
await expect(() => controller.exec("test")).rejects.toThrowError();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
4
|
+
*
|
|
5
|
+
* Licensed under GNU Affero General Public License version 3 of the or any later version.
|
|
6
|
+
* For full copyright and license information, please see the LICENSE.txt
|
|
7
|
+
* Redistributions of files must retain the above copyright notice.
|
|
8
|
+
*
|
|
9
|
+
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
10
|
+
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
|
|
11
|
+
* @link https://www.passbolt.com Passbolt(tm)
|
|
12
|
+
* @since 5.0.0
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
class GetCsrfTokenController {
|
|
16
|
+
/**
|
|
17
|
+
* Get the csrf token controller constructor
|
|
18
|
+
*
|
|
19
|
+
* @param {Worker} worker
|
|
20
|
+
* @param {string} requestId
|
|
21
|
+
* @param {ApiClientOptions} apiClientOptions the api client options
|
|
22
|
+
*/
|
|
23
|
+
constructor(worker, requestId, apiClientOptions) {
|
|
24
|
+
this.worker = worker;
|
|
25
|
+
this.requestId = requestId;
|
|
26
|
+
this.apiClientOptions = apiClientOptions;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Wrapper of exec function to run it with worker.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
async _exec(resourceId) {
|
|
34
|
+
try {
|
|
35
|
+
const result = await this.exec(resourceId);
|
|
36
|
+
this.worker.port.emit(this.requestId, "SUCCESS", result);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.error(error);
|
|
39
|
+
this.worker.port.emit(this.requestId, 'ERROR', error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Execute the controller
|
|
45
|
+
* @returns {Promise<String>}
|
|
46
|
+
*/
|
|
47
|
+
async exec() {
|
|
48
|
+
const csrf = this.apiClientOptions.getCsrfToken();
|
|
49
|
+
return csrf;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default GetCsrfTokenController;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
4
|
+
*
|
|
5
|
+
* Licensed under GNU Affero General Public License version 3 of the or any later version.
|
|
6
|
+
* For full copyright and license information, please see the LICENSE.txt
|
|
7
|
+
* Redistributions of files must retain the above copyright notice.
|
|
8
|
+
*
|
|
9
|
+
* @copyright Copyright (c) Passbolt SA (https://www.passbolt.com)
|
|
10
|
+
* @license https://opensource.org/licenses/AGPL-3.0 AGPL License
|
|
11
|
+
* @link https://www.passbolt.com Passbolt(tm)
|
|
12
|
+
* @since 5.0.0
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import {enableFetchMocks} from "jest-fetch-mock";
|
|
16
|
+
import GetCsrfTokenController from "./getCsrfTokenController";
|
|
17
|
+
import {defaultApiClientOptions} from "passbolt-styleguide/src/shared/lib/apiClient/apiClientOptions.test.data";
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
enableFetchMocks();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe("GetCsrfTokenController", () => {
|
|
23
|
+
let controller, apiClientOptions;
|
|
24
|
+
|
|
25
|
+
beforeEach(async() => {
|
|
26
|
+
apiClientOptions = defaultApiClientOptions();
|
|
27
|
+
controller = new GetCsrfTokenController(null, null, apiClientOptions);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
describe("::exec", () => {
|
|
32
|
+
it("Should retrieve CSRF token from apiClientOptions.", async() => {
|
|
33
|
+
expect.assertions(1);
|
|
34
|
+
|
|
35
|
+
const csrfToken = "csrf-token";
|
|
36
|
+
jest.spyOn(browser.cookies, "get").mockImplementationOnce(() => ({value: csrfToken}));
|
|
37
|
+
const result = await controller.exec();
|
|
38
|
+
|
|
39
|
+
expect(result).toEqual(csrfToken);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -39,7 +39,7 @@ import FoldersCollection from "../../model/entity/folder/foldersCollection";
|
|
|
39
39
|
import ExternalResourcesCollection from "../../model/entity/resource/external/externalResourcesCollection";
|
|
40
40
|
import ResourcesCollection from "../../model/entity/resource/resourcesCollection";
|
|
41
41
|
import {defaultTotpDto} from "../../model/entity/totp/totpDto.test.data";
|
|
42
|
-
import
|
|
42
|
+
import ExternalTotpEntity from "../../model/entity/totp/externalTotpEntity";
|
|
43
43
|
import {resourceCollectionV4ToExport} from "../../service/resource/export/exportResourcesService.test.data";
|
|
44
44
|
import {defaultDecryptedSharedMetadataKeysDtos} from "passbolt-styleguide/src/shared/models/entity/metadata/metadataKeysCollection.test.data";
|
|
45
45
|
import MetadataKeysCollection from "passbolt-styleguide/src/shared/models/entity/metadata/metadataKeysCollection";
|
|
@@ -129,7 +129,7 @@ describe("ExportResourcesFileController", () => {
|
|
|
129
129
|
exportResourcesFileEntity.exportFolders = exportFoldersCollection;
|
|
130
130
|
exportResourcesFileEntity.exportResources.items[0].secretClear = "Password 1";
|
|
131
131
|
exportResourcesFileEntity.exportResources.items[0].description = "Description 1";
|
|
132
|
-
exportResourcesFileEntity.exportResources.items[0].totp = new
|
|
132
|
+
exportResourcesFileEntity.exportResources.items[0].totp = new ExternalTotpEntity(defaultTotpDto({secret_key: "THISISASECRET"}));
|
|
133
133
|
await kdbxExporter.export(exportResourcesFileEntity);
|
|
134
134
|
}
|
|
135
135
|
each([
|