diff --git a/docs/_media/tp3_keys_2.png b/docs/_media/tp3_keys_2.png index 747ecd682..a88a74ad8 100644 Binary files a/docs/_media/tp3_keys_2.png and b/docs/_media/tp3_keys_2.png differ diff --git a/docs/_media/tp3_keys_4.png b/docs/_media/tp3_keys_4.png new file mode 100644 index 000000000..a08146bf6 Binary files /dev/null and b/docs/_media/tp3_keys_4.png differ diff --git a/docs/_media/tp3_keys_5.png b/docs/_media/tp3_keys_5.png new file mode 100644 index 000000000..6714cca04 Binary files /dev/null and b/docs/_media/tp3_keys_5.png differ diff --git a/docs/features/keys.md b/docs/features/keys.md index e851532c3..cb7f60b1c 100644 --- a/docs/features/keys.md +++ b/docs/features/keys.md @@ -10,6 +10,22 @@ Such a process ensures a high level of security for all data stored in the datab đź’ˇ [Read more](../install/encryption.md) about this encryption process. +## Store your recovery keys + +For any reason, if your data becomes corrupted, it is requested to recover your personal data using your `recovery keys`. + +When user gets logged in, if the recovery keys has never been downloaded, a warning icon is shown at the left of top user menu button. + +![1](../_media/tp3_keys_4.png) + +By clicking the red bell icon, you will be redirected to your profile page where you will be able to download your recovery keys. + +![1](../_media/tp3_keys_5.png) + +Now click button `Download your recovery keys` and __store the generated file in a safe place__! + +> â›” Without those keys, your personal items password would be lost if you need to regenerate your keys. + ## Regenerate your keys (as a User) For any reason, if you notice that while browsing Teampass's objects, all related passwords are empty then it might be a corruption of your private key is corrupted. @@ -20,7 +36,11 @@ For regenerated all your keys, just follow the next instructions. 1. Select entry `Generate new keys` in personal menu ![1](../_media/tp3_keys_1.png) -2. Ensure that the form contains your login password +2. Ensure that the form contains your login password, and that you have copied the public and private keys + + > đź’ˇ Regenerating the items keys is possible without the public and private recovery keys. You will need to tick the checkbox. + > Remember that without them, your personal items password would be lost. + ![1](../_media/tp3_keys_2.png) 3. Click `Confirm` button diff --git a/includes/config/include.php b/includes/config/include.php index b915f5b3a..32bdfa984 100755 --- a/includes/config/include.php +++ b/includes/config/include.php @@ -16,8 +16,8 @@ * @see http://www.teampass.net */ define('TP_VERSION', '3.0.10'); -define("UPGRADE_MIN_DATE", "1697362566"); -define('TP_VERSION_MINOR', '82'); +define("UPGRADE_MIN_DATE", "1697990713"); +define('TP_VERSION_MINOR', '83'); define('TP_TOOL_NAME', 'Teampass'); define('TP_ONE_DAY_SECONDS', 86400); define('TP_ONE_WEEK_SECONDS', 604800); diff --git a/includes/core/load.js.php b/includes/core/load.js.php index 463781afb..bf526d300 100755 --- a/includes/core/load.js.php +++ b/includes/core/load.js.php @@ -112,7 +112,7 @@ function(data) { // Check if new privatekey needs to be adapted var data = { 'user_id': store.get('teampassUser').user_id, - 'fields' : 'special, auth_type, is_ready_for_usage, ongoing_process_id, otp_provided', + 'fields' : 'special, auth_type, is_ready_for_usage, ongoing_process_id, otp_provided, keys_recovery_time', } $.post( "sources/main.queries.php", { @@ -137,6 +137,7 @@ function(teampassUser) { teampassUser.auth_type = data.queryResults.auth_type; teampassUser.is_ready_for_usage = data.queryResults.is_ready_for_usage; teampassUser.ongoing_process_id = data.queryResults.ongoing_process_id; + teampassUser.keys_recovery_time = data.queryResults.keys_recovery_time; } ); @@ -191,6 +192,21 @@ function(teampassUser) { // Show form $('#dialog-ldap-user-change-password').removeClass('hidden'); + } else if (typeof data.queryResults !== 'undefined' && data.queryResults.keys_recovery_time === null && store.get('teampassUser').user_admin === 0) { + // User has not yet recovered his keys + $('#open_user_keys_management').removeClass('hidden'); + + // if profile page, then show warning + if (window.location.href.indexOf('page=profile') > -1) { + $('#keys_not_recovered').removeClass('hidden'); + $('#profile-keys_download-date').text(''); + } + + // handle button click redirection to profile page + $("#open_user_keys_management").on('click', function(event) { + event.preventDefault(); + document.location.href = "index.php?page=profile&tab=keys"; + }); } } ); @@ -515,13 +531,40 @@ function(data) { '
'+ '' + '
' + - '