passbolt-styleguide 3.8.4 → 3.9.0-alpha2
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/build/css/help.min.css +3 -3
- package/build/css/public.min.css +3 -3
- package/build/css/themes/default/api_authentication.min.css +3 -3
- package/build/css/themes/default/api_cloud.min.css +3 -3
- package/build/css/themes/default/api_main.min.css +3 -3
- package/build/css/themes/default/api_reports.min.css +3 -3
- package/build/css/themes/default/api_webinstaller.min.css +3 -3
- package/build/css/themes/default/ext_app.min.css +3 -3
- package/build/css/themes/default/ext_authentication.min.css +3 -3
- package/build/css/themes/default/ext_external.min.css +2 -2
- package/build/css/themes/default/ext_in_form_cta.min.css +3 -3
- package/build/css/themes/default/ext_in_form_menu.min.css +3 -3
- package/build/css/themes/default/ext_quickaccess.min.css +3 -3
- package/build/css/themes/midgar/api_authentication.min.css +3 -3
- package/build/css/themes/midgar/api_main.min.css +3 -3
- package/build/css/themes/midgar/api_reports.min.css +3 -3
- package/build/css/themes/midgar/ext_app.min.css +3 -3
- package/build/css/themes/midgar/ext_authentication.min.css +3 -3
- package/build/css/themes/midgar/ext_in_form_cta.min.css +3 -3
- package/build/css/themes/midgar/ext_in_form_menu.min.css +3 -3
- package/build/css/themes/midgar/ext_quickaccess.min.css +3 -3
- package/build/css/themes/solarized_dark/api_authentication.min.css +1 -1
- package/build/css/themes/solarized_dark/api_main.min.css +1 -1
- package/build/css/themes/solarized_dark/api_reports.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_app.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_authentication.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/solarized_dark/ext_quickaccess.min.css +1 -1
- package/build/css/themes/solarized_light/api_authentication.min.css +1 -1
- package/build/css/themes/solarized_light/api_main.min.css +1 -1
- package/build/css/themes/solarized_light/api_reports.min.css +1 -1
- package/build/css/themes/solarized_light/ext_app.min.css +1 -1
- package/build/css/themes/solarized_light/ext_authentication.min.css +1 -1
- package/build/css/themes/solarized_light/ext_in_form_cta.min.css +1 -1
- package/build/css/themes/solarized_light/ext_in_form_menu.min.css +1 -1
- package/build/css/themes/solarized_light/ext_quickaccess.min.css +1 -1
- package/build/js/dist/api-account-recovery.js +1 -1
- package/build/js/dist/api-app.js +1 -1
- package/build/js/dist/api-app.js.LICENSE.txt +75 -5
- package/build/js/dist/api-feedback.js +2 -0
- package/build/js/dist/api-feedback.js.LICENSE.txt +45 -0
- package/build/js/dist/api-recover.js +1 -1
- package/build/js/dist/api-setup.js +1 -1
- package/build/js/dist/api-triage.js +1 -1
- package/build/js/dist/api-vendors.js +1 -1
- package/build/js/dist/api-vendors.js.LICENSE.txt +19 -9
- package/build/js/dist/src/locales/de-DE/common.json +995 -0
- package/build/js/dist/src/locales/en-UK/common.json +1061 -0
- package/build/js/dist/src/locales/es-ES/common.json +995 -0
- package/build/js/dist/src/locales/fr-FR/common.json +995 -0
- package/build/js/dist/src/locales/ja-JP/common.json +980 -0
- package/build/js/dist/src/locales/lt-LT/common.json +1025 -0
- package/build/js/dist/src/locales/nl-NL/common.json +995 -0
- package/build/js/dist/src/locales/pl-PL/common.json +1025 -0
- package/build/js/dist/src/locales/sv-SE/common.json +995 -0
- package/package.json +18 -1
- package/src/img/controls/attention.svg +1 -0
- package/src/locales/en-UK/common.json +80 -16
- package/src/react-extension/ApiApp.js +17 -5
- package/src/react-extension/ApiFeedback.entry.js +24 -0
- package/src/react-extension/ExtApp.js +12 -5
- package/src/react-extension/ExtAuthenticationLogin.js +17 -15
- package/src/react-extension/ExtAuthenticationLogin.test.stories.js +59 -0
- package/src/react-extension/ExtBootstrapApp.js +1 -0
- package/src/react-extension/components/Administration/AdministrationWorkspace.js +24 -0
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.data.js +3 -3
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.js +13 -1
- package/src/react-extension/components/Administration/AdministrationWorkspace.test.page.js +7 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.js +101 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.test.data.js +23 -0
- package/src/react-extension/components/Administration/ConfirmDeleteSsoSettingsDialog/ConfirmDeleteSsoSettingsDialog.test.stories.js +27 -0
- package/src/react-extension/components/Administration/ConfirmSaveAccountRecoverySettings/ConfirmSaveAccountRecoverySettings.js +1 -1
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.js +78 -2
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.data.js +3 -1
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.js +60 -0
- package/src/react-extension/components/Administration/DisplayAdministrationMenu/DisplayAdministrationMenu.test.page.js +23 -4
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationInternationalisationActions/DisplayAdministrationInternationalisationActions.js +125 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationMfaActions/DisplayAdministrationMfaActions.js +131 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSelfRegistrationActions/DisplayAdministrationSelfRegistrationActions.js +103 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSsoActions/DisplayAdministrationSsoActions.js +91 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationSubscriptionActions/DisplayAdministrationSubscriptionActions.js +85 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationUserDirectoryActions/DisplayAdministrationUserDirectoryActions.js +228 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceBreadcrumb/DisplayAdministrationWorkspaceBreadcrumb.js +4 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceBreadcrumb/DisplayAdministrationWorkspaceBreadcrumb.test.js +9 -0
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.js +3 -3
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.test.data.js +14 -0
- package/src/react-extension/components/Administration/DisplayEmailNotificationsAdministration/DisplayEmailNotificationsAdministration.test.page.js +0 -17
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.js +18 -115
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.data.js +11 -13
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.js +38 -43
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.page.js +47 -10
- package/src/react-extension/components/Administration/DisplayInternationalizationAdministration/DisplayInternationalizationAdministration.test.stories.js +10 -43
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.js +82 -367
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.data.js +128 -42
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.js +75 -121
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.page.js +46 -16
- package/src/react-extension/components/Administration/DisplayMfaAdministration/DisplayMfaAdministration.test.stories.js +18 -14
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.js +103 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.js +53 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.page.js +81 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmDeletionSelfRegistrationSettings/ConfirmDeletionSelfRegistrationSettings.test.stories.js +34 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.js +125 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.data.js +63 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.js +54 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.page.js +88 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/ConfirmSaveSelfRegistrationSettings/ConfirmSaveSelfRegistrationSettings.test.stories.js +35 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.js +381 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.data.js +69 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.js +332 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.page.js +247 -0
- package/src/react-extension/components/Administration/DisplaySelfRegistrationAdministration/DisplaySelfRegistrationAdministration.test.stories.js +72 -0
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.js +19 -19
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.data.js +1717 -1729
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.js +11 -3
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.page.js +4 -1
- package/src/react-extension/components/Administration/DisplaySimulateSynchronizeUserDirectoryAdministration/DisplaySimulateSynchronizeUserDirectoryAdministration.test.stories.js +11 -1784
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.js +41 -140
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.data.js +15 -3
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.js +22 -49
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.page.js +19 -11
- package/src/react-extension/components/Administration/DisplaySubscriptionKey/DisplaySubscriptionKey.test.stories.js +9 -3
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.js +5 -6
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.data.js +1717 -1728
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.js +11 -3
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.page.js +4 -1
- package/src/react-extension/components/Administration/DisplaySynchronizeUserDirectoryAdministration/DisplaySynchronizeUserDirectoryAdministration.test.stories.js +11 -1784
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.js +362 -835
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.data.js +427 -418
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.js +134 -175
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.page.js +108 -11
- package/src/react-extension/components/Administration/DisplayUserDirectoryAdministration/DisplayUserDirectoryAdministration.test.stories.js +17 -25
- package/src/react-extension/components/Administration/EditSubscriptionKey/EditSubscriptionKey.js +4 -2
- package/src/react-extension/components/Administration/ManageAccountRecoveryAdministrationSettings/ManageAccountRecoveryAdministrationSettings.js +3 -3
- package/src/react-extension/components/Administration/ManageAccountRecoveryAdministrationSettings/ManageAccountRecoveryAdministrationSettings.test.js +1 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.js +32 -7
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.data.js +0 -3
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.js +145 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.page.js +52 -1
- package/src/react-extension/components/Administration/ManageSmtpAdministrationSettings/ManageSmtpAdministrationSettings.test.stories.js +15 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.js +340 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.data.js +56 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.js +223 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.page.js +235 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/ManageSsoSettings.test.stories.js +55 -0
- package/src/react-extension/components/Administration/ManageSsoSettings/SsoProviders.data.js +34 -0
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/GenerateOrganizationKey.js +12 -3
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/GenerateOrganizationKey.test.js +27 -0
- package/src/react-extension/components/Administration/SelectAccountRecoveryOrganizationKey/SelectAccountRecoveryOrganizationKey.test.page.js +8 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.js +197 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.data.js +37 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.js +187 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.page.js +120 -0
- package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.test.stories.js +31 -0
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.js +9 -5
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.data.js +4 -0
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.js +11 -42
- package/src/react-extension/components/Authentication/CheckPassphrase/CheckPassphrase.test.page.js +1 -0
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.js +9 -5
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.data.js +4 -0
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.js +16 -2
- package/src/react-extension/components/Authentication/CreateGpgKey/CreateGpgKey.test.page.js +17 -1
- package/src/react-extension/components/AuthenticationLogin/Login/Login.js +159 -61
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.data.js +14 -11
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.js +79 -0
- package/src/react-extension/components/AuthenticationLogin/Login/Login.test.page.js +16 -0
- package/src/react-extension/components/AuthenticationLogin/OrchestrateLogin/OrchestrateLoginBoxMain.js +2 -0
- package/src/react-extension/components/AuthenticationSetup/SetupAuthentication/SetupAuthentication.js +4 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.js +119 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.js +43 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.page.js +108 -0
- package/src/react-extension/components/Common/Error/ApiError/ApiError.test.stories.js +39 -0
- package/src/react-extension/components/Common/Inputs/Autocomplete/Autocomplete.test.js +12 -0
- package/src/react-extension/components/Common/Inputs/Autocomplete/AutocompleteItem.js +2 -2
- package/src/react-extension/components/Common/Legacy/HandleLegacyAppjs.js +1 -1
- package/src/react-extension/components/Common/Navigation/Header/Logo.js +13 -1
- package/src/react-extension/components/Resource/CreateResource/CreateResource.js +103 -30
- package/src/react-extension/components/Resource/CreateResource/CreateResource.test.js +44 -10
- package/src/react-extension/components/Resource/CreateResource/CreateResource.test.page.js +35 -7
- package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesList.js +3 -3
- package/src/react-extension/components/Resource/DisplayResourcesList/DisplayResourcesListContextualMenu.js +6 -5
- package/src/react-extension/components/Resource/DisplayResourcesWorkspace/DisplayResourcesWorkspaceMenu.js +5 -4
- package/src/react-extension/components/Resource/EditResource/EditResource.js +95 -23
- package/src/react-extension/components/Resource/EditResource/EditResource.test.js +45 -13
- package/src/react-extension/components/Resource/EditResource/EditResource.test.page.js +35 -2
- package/src/react-extension/components/ResourceDetails/DisplayResourceDetails/DisplayResourceDetails.js +2 -1
- package/src/react-extension/components/ResourceDetails/DisplayResourceDetails/DisplayResourceDetailsInformation.js +3 -2
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.js +23 -2
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.test.js +8 -0
- package/src/react-extension/components/ResourceFolder/CreateResourceFolder/CreateResourceFolder.test.page.js +26 -2
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.js +22 -1
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.test.js +8 -0
- package/src/react-extension/components/ResourceFolder/RenameResourceFolder/RenameResourceFolder.test.page.js +25 -2
- package/src/react-extension/components/ResourceFolderDetails/DisplayResourceFolderDetails/DisplayResourceFolderDetails.js +2 -1
- package/src/react-extension/components/ResourcePassword/GenerateResourcePassword/GenerateResourcePassword.js +2 -1
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.js +14 -1
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.test.js +8 -0
- package/src/react-extension/components/ResourceTag/EditResourceTag/EditResourceTag.test.page.js +12 -0
- package/src/react-extension/components/User/CreateUser/CreateUser.js +42 -3
- package/src/react-extension/components/User/CreateUser/CreateUser.test.js +16 -0
- package/src/react-extension/components/User/CreateUser/CreateUser.test.page.js +26 -0
- package/src/react-extension/components/User/DisplayUserWorkspaceActions/DisplayUserWorkspaceActions.js +2 -1
- package/src/react-extension/components/User/DisplayUsersContextualMenu/DisplayUsersContextualMenu.js +5 -5
- package/src/react-extension/components/User/EditUser/EditUser.js +29 -2
- package/src/react-extension/components/User/EditUser/EditUser.test.js +12 -0
- package/src/react-extension/components/User/EditUser/EditUser.test.page.js +26 -0
- package/src/react-extension/components/UserDetails/DisplayUserDetails/DisplayUserDetails.js +2 -1
- package/src/react-extension/components/UserDetails/DisplayUserDetails/DisplayUserDetails.test.data.js +1332 -1331
- package/src/react-extension/components/UserDetails/DisplayUserDetailsPublicKey/DisplayUserDetailsPublicKey.js +2 -1
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.js +19 -1
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.test.js +9 -0
- package/src/react-extension/components/UserGroup/CreateUserGroup/CreateUserGroup.test.page.js +12 -0
- package/src/react-extension/components/UserGroup/DisplayUserGroupDetails/DisplayUserGroupDetails.js +2 -1
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.js +16 -1
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.test.js +8 -0
- package/src/react-extension/components/UserGroup/EditUserGroup/EditUserGroup.test.page.js +26 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/ConfirmPassphrase.js +1 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.js +6 -4
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.data.js +4 -1
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.js +21 -11
- package/src/react-extension/components/UserSetting/ChangeUserPassphrase/EnterNewPassphrase.test.page.js +10 -1
- package/src/react-extension/contexts/AdminSmtpSettingsContext.js +2 -0
- package/src/react-extension/contexts/AdminSmtpSettingsContext.test.data.js +13 -0
- package/src/react-extension/contexts/AdminSmtpSettingsContext.test.js +3 -1
- package/src/react-extension/contexts/AdminSsoContext.js +558 -0
- package/src/react-extension/contexts/AdminSsoContext.test.data.js +51 -0
- package/src/react-extension/contexts/Administration/AdministrationInternationalizationContext/AdministrationInternationalizationContext.js +194 -0
- package/src/react-extension/contexts/Administration/AdministrationInternationalizationContext/AdministrationInternationalizationContext.test.js +111 -0
- package/src/react-extension/contexts/Administration/AdministrationMfa/AdministrationMfaContext.js +265 -0
- package/src/react-extension/contexts/Administration/AdministrationMfa/AdministrationMfaContext.test.js +178 -0
- package/src/react-extension/contexts/Administration/AdministrationSelfRegistration/AdministrationSelfRegistrationContext.js +453 -0
- package/src/react-extension/contexts/Administration/AdministrationSelfRegistration/AdministrationSelfRegistrationContext.test.js +218 -0
- package/src/react-extension/contexts/Administration/AdministrationSubscription/AdministrationSubscription.js +168 -0
- package/src/react-extension/contexts/Administration/AdministrationSubscription/AdministrationSubscription.test.js +73 -0
- package/src/react-extension/contexts/Administration/AdministrationUserDirectory/AdministrationUserDirectoryContext.js +353 -0
- package/src/react-extension/contexts/Administration/AdministrationUserDirectory/AdministrationUserDirectoryContext.test.js +220 -0
- package/src/react-extension/contexts/AdministrationWorkspaceContext.js +17 -178
- package/src/react-extension/contexts/AdministrationWorkspaceContext.test.js +0 -26
- package/src/react-extension/contexts/ApiAppContext.test.data.js +4 -2
- package/src/react-extension/contexts/Authentication/AuthenticationLoginContext.js +54 -4
- package/src/react-extension/contexts/Authentication/AuthenticationLoginContext.test.data.js +10 -1
- package/src/react-extension/contexts/Authentication/AuthenticationLoginContext.test.js +92 -14
- package/src/react-extension/contexts/Authentication/AuthenticationSetupContext.js +1 -0
- package/src/react-extension/contexts/NavigationContext.js +34 -0
- package/src/react-extension/contexts/SsoContext.js +151 -0
- package/src/react-extension/contexts/SsoContext.test.data.js +36 -0
- package/src/react-extension/contexts/SsoContext.test.js +104 -0
- package/src/react-extension/lib/Domain/DomainUtil.js +70 -0
- package/src/react-extension/lib/Domain/DomainUtil.test.js +129 -0
- package/src/react-extension/lib/Domain/Domains.js +6113 -0
- package/src/react-extension/lib/Error/InputValidator.js +24 -0
- package/src/react-extension/lib/Map/DynamicRef.js +49 -0
- package/src/react-extension/lib/Map/DynamicRef.test.js +56 -0
- package/src/react-extension/lib/Map/MapObject.js +48 -0
- package/src/react-extension/lib/Map/MapObject.test.js +43 -0
- package/src/react-quickaccess/ExtQuickAccess.js +7 -4
- package/src/react-quickaccess/components/GeneratePasswordPage/GeneratePasswordPage.js +3 -1
- package/src/react-quickaccess/components/GeneratePasswordPage/GeneratePasswordPage.test.data.js +4 -0
- package/src/react-quickaccess/components/LoginPage/LoginPage.js +115 -4
- package/src/react-quickaccess/components/LoginPage/LoginPage.test.data.js +10 -0
- package/src/react-quickaccess/components/LoginPage/LoginPage.test.stories.js +30 -3
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.js +33 -1
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.data.js +25 -0
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.js +60 -0
- package/src/react-quickaccess/components/ResourceAutoSave/SaveResource.test.page.js +60 -0
- package/src/react-quickaccess/components/ResourceCreatePage/ResourceCreatePage.js +33 -1
- package/src/react-quickaccess/components/ResourceCreatePage/ResourceCreatePage.test.js +36 -7
- package/src/react-quickaccess/components/ResourceViewPage/ResourceViewPage.js +3 -2
- package/src/react-quickaccess/contexts/SsoContext.js +150 -0
- package/src/react-web-integration/lib/InForm/InFormFieldSelector.js +5 -0
- package/src/shared/constants/inputs.const.js +30 -0
- package/src/shared/lib/Browser/clipBoard.js +45 -0
- package/src/shared/lib/Browser/clipBoard.test.js +59 -0
- package/src/shared/models/Mfa/Duo.js +36 -0
- package/src/shared/models/Mfa/Duo.test.js +59 -0
- package/src/shared/models/Mfa/MfaDTO.js +51 -0
- package/src/shared/models/Mfa/MfaDTO.test.js +48 -0
- package/src/shared/models/Mfa/MfaEnumeration.js +17 -0
- package/src/shared/models/Mfa/MfaModel.js +48 -0
- package/src/shared/models/Mfa/MfaModel.test.js +37 -0
- package/src/shared/models/Mfa/Yubikey.js +35 -0
- package/src/shared/models/Mfa/Yubikey.test.js +47 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDomainsViewModel.js +55 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDomainsViewModel.test.js +37 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDto.js +42 -0
- package/src/shared/models/selfRegistration/SelfRegistrationDto.test.js +48 -0
- package/src/shared/models/selfRegistration/SelfRegistrationEnumeration.js +17 -0
- package/src/shared/models/subscription/SubscriptionDto.js +34 -0
- package/src/shared/models/subscription/SubscriptionDto.test.js +31 -0
- package/src/shared/models/subscription/SubscriptionModel.js +33 -0
- package/src/shared/models/subscription/SubscriptionModel.test.js +48 -0
- package/src/shared/models/user/UserModel.js +37 -0
- package/src/shared/models/userDirectory/UserDirectoryDTO.js +57 -0
- package/src/shared/models/userDirectory/UserDirectoryDTO.test.js +40 -0
- package/src/shared/models/userDirectory/UserDirectoryEnum.js +22 -0
- package/src/shared/models/userDirectory/UserDirectoryModel.js +64 -0
- package/src/shared/models/userDirectory/UserDirectoryModel.test.js +37 -0
- package/src/shared/services/actions/subscription/SubscriptionActionService.js +69 -0
- package/src/shared/services/actions/subscription/SubscriptionActionService.test.js +73 -0
- package/src/shared/services/api/Internationalisation/InternationalisationService.js +46 -0
- package/src/shared/services/api/Mfa/MfaService.js +54 -0
- package/src/shared/services/{accountRecovery → api/accountRecovery}/ApiAppAccountRecoveryUserService.js +2 -2
- package/src/shared/services/{accountRecovery → api/accountRecovery}/ExtAppAccountRecoveryUserService.js +0 -0
- package/src/shared/services/api/secrets/pownedService.js +64 -0
- package/src/shared/services/api/secrets/pownedService.test.js +63 -0
- package/src/shared/services/api/selfRegistration/selfRegistrationService.js +64 -0
- package/src/shared/services/api/user/UserService.js +45 -0
- package/src/shared/services/api/userDirectory/UserDirectoryService.js +108 -0
- package/src/shared/services/forms/Mfa/MfaFormService.js +195 -0
- package/src/shared/services/forms/Mfa/MfaFormService.test.js +341 -0
- package/src/shared/services/forms/selfRegistration/SelfRegistrationFormService.js +92 -0
- package/src/shared/services/forms/selfRegistration/SelfRegistrationFormService.test.js +101 -0
- package/src/shared/services/forms/userDirectory/UserDirectoryFormService.js +118 -0
- package/src/shared/services/forms/userDirectory/UserDirectoryFormService.test.js +128 -0
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.js +0 -205
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.data.js +0 -37
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.js +0 -197
- package/src/react-extension/components/Administration/DisplayAdministrationWorkspaceActions/DisplayAdministrationWorkspaceActions.test.page.js +0 -133
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) 2022 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) 2022 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 3.9.0
|
|
13
|
+
*/
|
|
14
|
+
import {fireEvent, render, waitFor} from "@testing-library/react";
|
|
15
|
+
import React from "react";
|
|
16
|
+
import ManageSsoSettings from "./ManageSsoSettings";
|
|
17
|
+
import MockTranslationProvider from "../../../test/mock/components/Internationalisation/MockTranslationProvider";
|
|
18
|
+
import AdminSsoContextProvider from "../../../contexts/AdminSsoContext";
|
|
19
|
+
import DisplayAdministrationSsoSettingsActions from "../DisplayAdministrationWorkspaceActions/DisplayAdministrationSsoActions/DisplayAdministrationSsoActions";
|
|
20
|
+
import DialogContextProvider from "../../../contexts/DialogContext";
|
|
21
|
+
import ManageDialogs from "../../Common/Dialog/ManageDialogs/ManageDialogs";
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The ManageSsoSettings component represented as a page
|
|
25
|
+
*/
|
|
26
|
+
export default class ManageSsoSettingsPage {
|
|
27
|
+
/**
|
|
28
|
+
* Default constructor
|
|
29
|
+
* @param appContext An app context
|
|
30
|
+
* @param props Props to attach
|
|
31
|
+
*/
|
|
32
|
+
constructor(props) {
|
|
33
|
+
this.props = props;
|
|
34
|
+
this.render(props);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Do a rendering of the page.
|
|
39
|
+
* If the page already exists, do a rerender instead
|
|
40
|
+
* @param {object} props the props of the components
|
|
41
|
+
*/
|
|
42
|
+
render(props) {
|
|
43
|
+
this._page = render(<MockTranslationProvider>
|
|
44
|
+
<DialogContextProvider>
|
|
45
|
+
<AdminSsoContextProvider {...props}>
|
|
46
|
+
<ManageDialogs/>
|
|
47
|
+
<ManageSsoSettings {...props}/>
|
|
48
|
+
<DisplayAdministrationSsoSettingsActions/>
|
|
49
|
+
</AdminSsoContextProvider>
|
|
50
|
+
</DialogContextProvider>
|
|
51
|
+
</MockTranslationProvider>);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Shortcut method for the container querySelector.
|
|
56
|
+
* @param {string} stringSelector
|
|
57
|
+
* @returns {HTMLElement}
|
|
58
|
+
*/
|
|
59
|
+
select(stringSelector) {
|
|
60
|
+
return this._page.container.querySelector(stringSelector);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Shortcut method for the container querySelectorAll.
|
|
65
|
+
* @param {string} stringSelector
|
|
66
|
+
* @returns {NodeList}
|
|
67
|
+
*/
|
|
68
|
+
selectAll(stringSelector) {
|
|
69
|
+
return this._page.container.querySelectorAll(stringSelector);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Returns true if the page exists.
|
|
74
|
+
* This means that it's loaded and the title text content is non empty.
|
|
75
|
+
* @returns {boolean}
|
|
76
|
+
*/
|
|
77
|
+
exists() {
|
|
78
|
+
const title = this.title;
|
|
79
|
+
return title && title.textContent !== "";
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Simulates a click on the given HTML element.
|
|
84
|
+
* The clicks is consider done when the callback returns {true}.
|
|
85
|
+
* @param {HTMLElement} element The HTML element onto simulate the click
|
|
86
|
+
* @param {function} callback The callback to be used in the waitFor method to ensure the click is done (returns true when it's done)
|
|
87
|
+
* @returns {Promise<void>}
|
|
88
|
+
*/
|
|
89
|
+
async clickOn(element, callback) {
|
|
90
|
+
const leftClick = {button: 0};
|
|
91
|
+
fireEvent.click(element, leftClick);
|
|
92
|
+
await waitFor(() => {
|
|
93
|
+
if (!callback()) {
|
|
94
|
+
throw new Error("Page didn't react yet on the event.");
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Set the current form with the given data (only work with the inputs (not our Select component for instance))
|
|
101
|
+
* @param {object} formData a key value pairs object that contains the field name as a key (must match a getter method on this page) and the desired value
|
|
102
|
+
* @returns {Promise<void>}
|
|
103
|
+
*/
|
|
104
|
+
async setFormWith(formData) {
|
|
105
|
+
let key;
|
|
106
|
+
for (key in formData) {
|
|
107
|
+
fireEvent.input(this[key], {target: {value: formData[key]}});
|
|
108
|
+
}
|
|
109
|
+
await waitFor(() => {
|
|
110
|
+
if (this[key].value !== formData[key].toString()) {
|
|
111
|
+
throw new Error("Form is not udpated yet.");
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Clicks on the Save Settings button and wait for the given callback to return true before continuing.
|
|
118
|
+
* @param {function} readyCheckCallback a callback to tell the caller when the action is considered to be done
|
|
119
|
+
*/
|
|
120
|
+
async saveSettings(readyCheckCallback) {
|
|
121
|
+
await this.clickOn(this.toolbarActionsSaveSettingsButton, readyCheckCallback);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Clicks on SSO Settings feature toggle.
|
|
126
|
+
* @param {function} readyCheckCallback a callback to tell the caller when the action is considered to be done
|
|
127
|
+
*/
|
|
128
|
+
async toggleSsoSettings() {
|
|
129
|
+
const currentState = this.toggleButton.checked;
|
|
130
|
+
await this.clickOn(this.toggleButton, () => this.toggleButton.checked !== currentState);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Simulates a click on the "Delete Settings" button from the dialog
|
|
135
|
+
*/
|
|
136
|
+
async confirmDelete() {
|
|
137
|
+
await this.clickOn(this.deleteSettingsButton, () => this.deleteConfirmationDialog === null);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Returns the title page HTML element
|
|
142
|
+
* @returns {HTMLElement}
|
|
143
|
+
*/
|
|
144
|
+
get title() {
|
|
145
|
+
return this.select(".sso-settings h3");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Returns all the provider buttons from the first screen.
|
|
150
|
+
* @returns {NodeList}
|
|
151
|
+
*/
|
|
152
|
+
get providerButtons() {
|
|
153
|
+
return this.selectAll(".sso-settings .provider-list .provider");
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Returns the url input HTML element
|
|
158
|
+
* @returns {HTMLElement}
|
|
159
|
+
*/
|
|
160
|
+
get url() {
|
|
161
|
+
return this.select(".sso-settings #sso-azure-url-input");
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Returns the redirect_url input HTML element
|
|
166
|
+
* @returns {HTMLElement}
|
|
167
|
+
*/
|
|
168
|
+
get redirect_url() {
|
|
169
|
+
return this.select(".sso-settings #sso-redirect-url-input");
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Returns the tenant_id input HTML element
|
|
174
|
+
* @returns {HTMLElement}
|
|
175
|
+
*/
|
|
176
|
+
get tenant_id() {
|
|
177
|
+
return this.select(".sso-settings #sso-azure-tenant-id-input");
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Returns the client_id input HTML element
|
|
182
|
+
* @returns {HTMLElement}
|
|
183
|
+
*/
|
|
184
|
+
get client_id() {
|
|
185
|
+
return this.select(".sso-settings #sso-azure-client-id-input");
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Returns the client_secret input HTML element
|
|
190
|
+
* @returns {HTMLElement}
|
|
191
|
+
*/
|
|
192
|
+
get client_secret() {
|
|
193
|
+
return this.select(".sso-settings #sso-azure-secret-input");
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Returns the client_secret input HTML element
|
|
198
|
+
* @returns {HTMLElement}
|
|
199
|
+
*/
|
|
200
|
+
get client_secret_expiry() {
|
|
201
|
+
return this.select(".sso-settings #sso-azure-secret-expiry-input");
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Returns the HTMLElement button of the toolbar that is the "Save settings"
|
|
206
|
+
* @returns {HTMLElement}
|
|
207
|
+
*/
|
|
208
|
+
get toolbarActionsSaveSettingsButton() {
|
|
209
|
+
return this.selectAll(".actions-wrapper .actions a")[0];
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* Returns the SSO Settings toggle button HTML element
|
|
214
|
+
* @returns {HTMLElement}
|
|
215
|
+
*/
|
|
216
|
+
get toggleButton() {
|
|
217
|
+
return this.select(".sso-settings .toggle-switch input");
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Returns the delete SSO Settings dialog HTML element
|
|
222
|
+
* @returns {HTMLElement}
|
|
223
|
+
*/
|
|
224
|
+
get deleteConfirmationDialog() {
|
|
225
|
+
return this.select(".delete-sso-settings-dialog");
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Returns the delete SSO Settings dialog HTML element
|
|
230
|
+
* @returns {HTMLElement}
|
|
231
|
+
*/
|
|
232
|
+
get deleteSettingsButton() {
|
|
233
|
+
return this.select(".delete-sso-settings-dialog button[type='submit']");
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) 2022 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) 2022 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 3.9.0
|
|
13
|
+
*/
|
|
14
|
+
import DialogContextProvider from "../../../contexts/DialogContext";
|
|
15
|
+
import ManageDialogs from "../../Common/Dialog/ManageDialogs/ManageDialogs";
|
|
16
|
+
import React from "react";
|
|
17
|
+
import ManageSsoSettings from "./ManageSsoSettings";
|
|
18
|
+
import AdminSsoSettingsContextProvider from "../../../contexts/AdminSsoContext";
|
|
19
|
+
import {defaultProps, disabledSso, azureConfiguredSso} from "./ManageSsoSettings.test.data";
|
|
20
|
+
import DisplayActionFeedbacks from "../../Common/ActionFeedback/DisplayActionFeedbacks";
|
|
21
|
+
import ActionFeedbackContextProvider from "../../../contexts/ActionFeedbackContext";
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
title: 'Components/Administration/ManageSsoSettings',
|
|
25
|
+
component: ManageSsoSettings
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const Template = args =>
|
|
29
|
+
<DialogContextProvider>
|
|
30
|
+
<ManageDialogs/>
|
|
31
|
+
<ActionFeedbackContextProvider>
|
|
32
|
+
<DisplayActionFeedbacks/>
|
|
33
|
+
<AdminSsoSettingsContextProvider {...args}>
|
|
34
|
+
<div className="panel main">
|
|
35
|
+
<div className="panel middle">
|
|
36
|
+
<div className="grid grid-responsive-12">
|
|
37
|
+
<ManageSsoSettings {...args}/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</AdminSsoSettingsContextProvider>
|
|
42
|
+
</ActionFeedbackContextProvider>
|
|
43
|
+
</DialogContextProvider>;
|
|
44
|
+
|
|
45
|
+
export const Default = Template.bind({});
|
|
46
|
+
Default.args = defaultProps();
|
|
47
|
+
Default.args.context.port.addRequestListener("passbolt.sso.get-current", disabledSso);
|
|
48
|
+
|
|
49
|
+
export const Azure = Template.bind({});
|
|
50
|
+
Azure.args = defaultProps();
|
|
51
|
+
Azure.args.context.port.addRequestListener("passbolt.sso.get-current", azureConfiguredSso);
|
|
52
|
+
|
|
53
|
+
export const ErrorFromTheServer = Template.bind({});
|
|
54
|
+
ErrorFromTheServer.args = defaultProps();
|
|
55
|
+
ErrorFromTheServer.args.context.port.addRequestListener("passbolt.sso.get-current", () => { throw new Error("Something went wrong"); });
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) 2022 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) 2022 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 3.9.0
|
|
13
|
+
*/
|
|
14
|
+
import React from "react";
|
|
15
|
+
|
|
16
|
+
const SsoProviders = [
|
|
17
|
+
{
|
|
18
|
+
id: "azure",
|
|
19
|
+
name: "Microsoft",
|
|
20
|
+
icon: (<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M31.3512 3.04762H3.92261V30.4762H31.3512V3.04762Z" fill="#F25022"/><path d="M31.3512 33.5238H3.92261V60.9524H31.3512V33.5238Z" fill="#00A4EF"/><path d="M61.8274 3.04762H34.3988V30.4762H61.8274V3.04762Z" fill="#7FBA00"/><path d="M61.8274 33.5238H34.3988V60.9524H61.8274V33.5238Z" fill="#FFB900"/></svg>),
|
|
21
|
+
defaultConfig: {
|
|
22
|
+
url: "https://login.microsoftonline.com",
|
|
23
|
+
redirect_url: "/sso/azure/redirect",
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: "google",
|
|
28
|
+
name: "Google",
|
|
29
|
+
disabled: true,
|
|
30
|
+
icon: (<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63.9451 32.72C63.9451 30.6133 63.7584 28.6133 63.4384 26.6667H33.3051V38.6933H50.5584C49.7851 42.64 47.5184 45.9733 44.1584 48.24V56.24H54.4517C60.4784 50.6667 63.9451 42.4533 63.9451 32.72Z" fill="#4285F4"/><path d="M33.305 64C41.945 64 49.1717 61.12 54.4517 56.24L44.1583 48.24C41.2783 50.16 37.625 51.3333 33.305 51.3333C24.9583 51.3333 17.8917 45.7067 15.3583 38.1067H4.745V46.3467C9.99833 56.8 20.7983 64 33.305 64Z" fill="#34A853"/><path d="M15.3584 38.1067C14.6917 36.1867 14.3451 34.1333 14.3451 32C14.3451 29.8667 14.7184 27.8133 15.3584 25.8933V17.6533H4.74505C2.55838 21.9733 1.30505 26.8267 1.30505 32C1.30505 37.1733 2.55838 42.0267 4.74505 46.3467L15.3584 38.1067Z" fill="#FBBC05"/><path d="M33.305 12.6667C38.025 12.6667 42.2383 14.2933 45.5717 17.4667L54.6917 8.34667C49.1717 3.17334 41.945 0 33.305 0C20.7983 0 9.99833 7.20001 4.745 17.6533L15.3583 25.8933C17.8917 18.2933 24.9583 12.6667 33.305 12.6667Z" fill="#EA4335"/></svg>)
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export default SsoProviders;
|
|
@@ -26,9 +26,9 @@ import {withAppContext} from "../../../contexts/AppContext";
|
|
|
26
26
|
import {withDialog} from "../../../contexts/DialogContext";
|
|
27
27
|
import Password from "../../../../shared/components/Password/Password";
|
|
28
28
|
import PasswordComplexity from "../../../../shared/components/PasswordComplexity/PasswordComplexity";
|
|
29
|
-
import SecretComplexity from "../../../../shared/lib/Secret/SecretComplexity";
|
|
30
29
|
import ExternalServiceUnavailableError from "../../../../shared/lib/Error/ExternalServiceUnavailableError";
|
|
31
30
|
import ExternalServiceError from "../../../../shared/lib/Error/ExternalServiceError";
|
|
31
|
+
import PownedService from "../../../../shared/services/api/secrets/pownedService";
|
|
32
32
|
|
|
33
33
|
/** Resource password max length */
|
|
34
34
|
const RESOURCE_PASSWORD_MAX_LENGTH = 4096;
|
|
@@ -78,6 +78,12 @@ class GenerateOrganizationKey extends React.Component {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Whenever the component is mounted
|
|
83
|
+
*/
|
|
84
|
+
componentDidMount() {
|
|
85
|
+
this.pownedService = new PownedService(this.props.context.port);
|
|
86
|
+
}
|
|
81
87
|
/**
|
|
82
88
|
* Bind callbacks methods
|
|
83
89
|
*/
|
|
@@ -172,7 +178,6 @@ class GenerateOrganizationKey extends React.Component {
|
|
|
172
178
|
: this.state.passphraseErrorState;
|
|
173
179
|
|
|
174
180
|
this.setState({passphrase, passphraseEntropy, passphraseErrorState});
|
|
175
|
-
|
|
176
181
|
if (passphraseEntropy >= FAIR_STRENGTH_ENTROPY) {
|
|
177
182
|
this.isPwndProcessingPromise = this.evaluatePassphraseIsInDictionaryDebounce();
|
|
178
183
|
}
|
|
@@ -216,7 +221,11 @@ class GenerateOrganizationKey extends React.Component {
|
|
|
216
221
|
|
|
217
222
|
let isPwned;
|
|
218
223
|
try {
|
|
219
|
-
|
|
224
|
+
const result = await this.pownedService.evaluateSecret(this.state.passphrase);
|
|
225
|
+
isPwned = result.inDictionary;
|
|
226
|
+
this.setState({
|
|
227
|
+
isPwnedServiceAvailable: result.isPwnedServiceAvailable
|
|
228
|
+
});
|
|
220
229
|
} catch (error) {
|
|
221
230
|
// If the service is unavailable don't block the user journey.
|
|
222
231
|
if (error instanceof ExternalServiceUnavailableError || error instanceof ExternalServiceError) {
|
|
@@ -24,6 +24,9 @@ import userSettingsFixture from "../../../test/fixture/Settings/userSettings";
|
|
|
24
24
|
function defaultProps() {
|
|
25
25
|
return {
|
|
26
26
|
context: {
|
|
27
|
+
port: {
|
|
28
|
+
request: () => Promise.resolve(0)
|
|
29
|
+
},
|
|
27
30
|
userSettings: new UserSettings(userSettingsFixture)
|
|
28
31
|
},
|
|
29
32
|
dialogContext: {
|
|
@@ -35,8 +38,14 @@ function defaultProps() {
|
|
|
35
38
|
|
|
36
39
|
beforeEach(() => {
|
|
37
40
|
jest.resetModules();
|
|
41
|
+
jest.useFakeTimers();
|
|
38
42
|
});
|
|
39
43
|
|
|
44
|
+
afterEach(() => {
|
|
45
|
+
jest.clearAllTimers();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
|
|
40
49
|
describe('As AD I can generate an ORK', () => {
|
|
41
50
|
/**
|
|
42
51
|
* Given that I am a logged in administrator in the administration workspace
|
|
@@ -222,4 +231,22 @@ describe('As AD I can generate an ORK', () => {
|
|
|
222
231
|
expect(page.passphraseFieldError).not.toBeNull();
|
|
223
232
|
expect(page.passphraseFieldError.textContent).toBe(`A strong passphrase is required. The minimum complexity must be 'fair'`);
|
|
224
233
|
});
|
|
234
|
+
|
|
235
|
+
it('As AD I should be inform about ExternalServiceUnavailableError for powned password service', async() => {
|
|
236
|
+
expect.assertions(1);
|
|
237
|
+
const props = defaultProps();
|
|
238
|
+
jest.spyOn(props.context.port, "request").mockImplementationOnce(() => Promise.reject());
|
|
239
|
+
const page = new SelectAccountRecoveryOrganizationKeyPage(props);
|
|
240
|
+
await waitFor(() => {});
|
|
241
|
+
|
|
242
|
+
await page.clickOnGenerateTab(() => {
|
|
243
|
+
if (!page.isGenerateTabSeletect()) {
|
|
244
|
+
throw new Error("Changes are not available yet");
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
await page.type("This a strong passphrase to test a service not working", page.passphraseField);
|
|
248
|
+
await waitFor(() => {});
|
|
249
|
+
|
|
250
|
+
expect(page.passwordWarningMessage.textContent).toBe("Warning: The pwnedpasswords service is unavailable, your passphrase might be part of an exposed data breach");
|
|
251
|
+
});
|
|
225
252
|
});
|
|
@@ -181,6 +181,13 @@ export default class SelectAccountRecoveryOrganizationKeyPage {
|
|
|
181
181
|
return this._page.container.querySelector('.organization-recover-key-dialog.dialog-wrapper .form-content.generate-organization-key .password.error-message');
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Returns the password warning mesage input element
|
|
186
|
+
*/
|
|
187
|
+
get passwordWarningMessage() {
|
|
188
|
+
return this._page.container.querySelector('.password.warning-message');
|
|
189
|
+
}
|
|
190
|
+
|
|
184
191
|
/**
|
|
185
192
|
* Returns true if the page object exists in the container
|
|
186
193
|
*/
|
|
@@ -272,5 +279,6 @@ export default class SelectAccountRecoveryOrganizationKeyPage {
|
|
|
272
279
|
throw new Error("The field has not changed yet.");
|
|
273
280
|
}
|
|
274
281
|
});
|
|
282
|
+
jest.runAllTimers();
|
|
275
283
|
}
|
|
276
284
|
}
|
package/src/react-extension/components/Administration/TestSsoSettingsDialog/TestSsoSettingsDialog.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) 2022 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) 2022 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 3.9.0
|
|
13
|
+
*/
|
|
14
|
+
import React from "react";
|
|
15
|
+
import PropTypes from "prop-types";
|
|
16
|
+
import {Trans, withTranslation} from "react-i18next";
|
|
17
|
+
import {withAppContext} from "../../../contexts/AppContext";
|
|
18
|
+
import DialogWrapper from "../../Common/Dialog/DialogWrapper/DialogWrapper";
|
|
19
|
+
import {withAdminSso} from "../../../contexts/AdminSsoContext";
|
|
20
|
+
import FormCancelButton from "../../Common/Inputs/FormSubmitButton/FormCancelButton";
|
|
21
|
+
import FormSubmitButton from "../../Common/Inputs/FormSubmitButton/FormSubmitButton";
|
|
22
|
+
import {withActionFeedback} from "../../../contexts/ActionFeedbackContext";
|
|
23
|
+
|
|
24
|
+
const uiStateEnum = {
|
|
25
|
+
FORM: "form",
|
|
26
|
+
SUCCESS: "success"
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
class TestSsoSettingsDialog extends React.Component {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor
|
|
32
|
+
* @param {Object} props
|
|
33
|
+
*/
|
|
34
|
+
constructor(props) {
|
|
35
|
+
super(props);
|
|
36
|
+
this.state = this.defaultState;
|
|
37
|
+
this.bindCallbacks();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get default state
|
|
42
|
+
* @returns {Object}
|
|
43
|
+
*/
|
|
44
|
+
get defaultState() {
|
|
45
|
+
return {
|
|
46
|
+
uiState: uiStateEnum.FORM,
|
|
47
|
+
hasSuccessfullySignedInWithSso: false,
|
|
48
|
+
processing: false,
|
|
49
|
+
ssoToken: null,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Bind callbacks
|
|
55
|
+
*/
|
|
56
|
+
bindCallbacks() {
|
|
57
|
+
this.handleSignInTestClick = this.handleSignInTestClick.bind(this);
|
|
58
|
+
this.handleActivateSsoSettings = this.handleActivateSsoSettings.bind(this);
|
|
59
|
+
this.handleCloseDialog = this.handleCloseDialog.bind(this);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Handles the form submission
|
|
64
|
+
* @param {Event} event
|
|
65
|
+
* @returns {Promise<void>}
|
|
66
|
+
*/
|
|
67
|
+
async handleSignInTestClick(event) {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
try {
|
|
70
|
+
this.setState({processing: true});
|
|
71
|
+
const ssoToken = await this.props.context.port.request(`passbolt.sso.test.${this.props.provider.id}`, this.props.configurationId);
|
|
72
|
+
this.setState({
|
|
73
|
+
uiState: uiStateEnum.SUCCESS,
|
|
74
|
+
hasSuccessfullySignedInWithSso: true,
|
|
75
|
+
ssoToken: ssoToken
|
|
76
|
+
});
|
|
77
|
+
} catch (e) {
|
|
78
|
+
// The user might manually close the popup but other errors than this one are unexpected
|
|
79
|
+
if (e?.name !== "UserClosedSsoPopUpError") {
|
|
80
|
+
this.props.adminSsoContext.handleError(e);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
this.setState({processing: false});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Handle the click on the settings activation button
|
|
88
|
+
* @param {Event} event
|
|
89
|
+
* @returns {Promise<void>}
|
|
90
|
+
*/
|
|
91
|
+
async handleActivateSsoSettings(event) {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
try {
|
|
94
|
+
this.setState({processing: true});
|
|
95
|
+
await this.props.context.port.request("passbolt.sso.activate-settings", this.props.configurationId, this.state.ssoToken);
|
|
96
|
+
await this.props.context.port.request("passbolt.sso.generate-sso-kit", this.props.provider.id);
|
|
97
|
+
this.props.onSuccessfulSettingsActivation();
|
|
98
|
+
this.handleCloseDialog();
|
|
99
|
+
await this.props.actionFeedbackContext.displaySuccess(this.props.t("SSO settings have been registered successfully"));
|
|
100
|
+
} catch (e) {
|
|
101
|
+
this.props.adminSsoContext.handleError(e);
|
|
102
|
+
}
|
|
103
|
+
this.setState({processing: false});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Handles the closing of the dialog and the notification of the dialog opener
|
|
108
|
+
*/
|
|
109
|
+
handleCloseDialog() {
|
|
110
|
+
this.props.onClose();
|
|
111
|
+
this.props.handleClose();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Returns true if the input must be disabled.
|
|
116
|
+
* @returns {boolean}
|
|
117
|
+
*/
|
|
118
|
+
hasAllInputDisabled() {
|
|
119
|
+
return this.state.processing;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Returns true when the AD has successfully tested the current draft SSO settings
|
|
124
|
+
*/
|
|
125
|
+
canSaveSettings() {
|
|
126
|
+
return !this.hasAllInputDisabled() && this.state.hasSuccessfullySignedInWithSso;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Returns the title string to display on the dialog based on the UI state.
|
|
131
|
+
* @returns {string}
|
|
132
|
+
*/
|
|
133
|
+
get title() {
|
|
134
|
+
const stateTitles = {
|
|
135
|
+
form: this.translate("Test Single Sign-On configuration"),
|
|
136
|
+
success: this.translate("Save Single Sign-On configuration"),
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
return stateTitles[this.state.uiState] || "";
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Get the translate function
|
|
144
|
+
* @returns {function(...[*]=)}
|
|
145
|
+
*/
|
|
146
|
+
get translate() {
|
|
147
|
+
return this.props.t;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Render the component
|
|
152
|
+
* @returns {JSX}
|
|
153
|
+
*/
|
|
154
|
+
render() {
|
|
155
|
+
return (
|
|
156
|
+
<DialogWrapper className='test-sso-settings-dialog sso-login-form' title={this.title}
|
|
157
|
+
onClose={this.handleCloseDialog} disabled={this.hasAllInputDisabled()}>
|
|
158
|
+
<form onSubmit={this.handleActivateSsoSettings}>
|
|
159
|
+
<div className="form-content">
|
|
160
|
+
{this.state.uiState === uiStateEnum.FORM &&
|
|
161
|
+
<>
|
|
162
|
+
<p><Trans>Before saving the settings, we need to test if the configuration is working.</Trans></p>
|
|
163
|
+
<a className={`button sso-login-button ${this.hasAllInputDisabled() ? "disabled" : ""} ${this.props.provider.id}`} onClick={this.handleSignInTestClick} disabled={this.hasAllInputDisabled()} >
|
|
164
|
+
<span className="provider-logo">
|
|
165
|
+
{this.props.provider.icon}
|
|
166
|
+
</span>
|
|
167
|
+
{this.translate(`Sign in with {{providerName}}`, {providerName: this.props.provider.name})}
|
|
168
|
+
</a>
|
|
169
|
+
</>
|
|
170
|
+
}
|
|
171
|
+
{this.state.uiState === uiStateEnum.SUCCESS &&
|
|
172
|
+
<p>{this.translate(`You susccessfully signed in with your {{providerName}} account. You can safely save your configuration.`, {providerName: this.props.provider.name})}</p>
|
|
173
|
+
}
|
|
174
|
+
</div>
|
|
175
|
+
<div className="submit-wrapper clearfix">
|
|
176
|
+
<FormCancelButton disabled={this.hasAllInputDisabled()} onClick={this.handleCloseDialog}/>
|
|
177
|
+
<FormSubmitButton disabled={!this.canSaveSettings()} processing={this.state.processing} value={this.translate("Save settings")}/>
|
|
178
|
+
</div>
|
|
179
|
+
</form>
|
|
180
|
+
</DialogWrapper>
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
TestSsoSettingsDialog.propTypes = {
|
|
186
|
+
context: PropTypes.object, // Application context
|
|
187
|
+
adminSsoContext: PropTypes.object, // The administration SSO settings context
|
|
188
|
+
onClose: PropTypes.func, // The close dialog callback
|
|
189
|
+
t: PropTypes.func, // The translation function
|
|
190
|
+
provider: PropTypes.object, // The selected SSO provider to test
|
|
191
|
+
configurationId: PropTypes.string, // the configuration identifier to be tested
|
|
192
|
+
actionFeedbackContext: PropTypes.any, // The action feedback context
|
|
193
|
+
handleClose: PropTypes.func, // handle the closing of the dialog
|
|
194
|
+
onSuccessfulSettingsActivation: PropTypes.func, // callback to notify when the settings hasve been activated successsfully
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export default withAppContext(withAdminSso(withActionFeedback(withTranslation('common')(TestSsoSettingsDialog))));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passbolt ~ Open source password manager for teams
|
|
3
|
+
* Copyright (c) 2022 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) 2022 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 3.9.0
|
|
13
|
+
*/
|
|
14
|
+
import {defaultAppContext} from "../../../contexts/ExtAppContext.test.data";
|
|
15
|
+
import {v4 as uuid} from "uuid";
|
|
16
|
+
import SsoProviders from "../ManageSsoSettings/SsoProviders.data";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Default props.
|
|
20
|
+
* @param {Object} props The props to override
|
|
21
|
+
* @returns {object}
|
|
22
|
+
*/
|
|
23
|
+
export function defaultProps(props = {}) {
|
|
24
|
+
const defaultProps = {
|
|
25
|
+
context: defaultAppContext(props?.context),
|
|
26
|
+
handleClose: jest.fn(),
|
|
27
|
+
onSuccessfulSettingsActivation: jest.fn(),
|
|
28
|
+
provider: SsoProviders.at(0),
|
|
29
|
+
configurationId: uuid(),
|
|
30
|
+
onClose: jest.fn(),
|
|
31
|
+
dialogContext: {
|
|
32
|
+
open: jest.fn(),
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
delete props.context; // Treated in the default
|
|
36
|
+
return Object.assign(defaultProps, props);
|
|
37
|
+
}
|