Credential vault: each agent's and API key's copy of the master key is sealed with AES-256-GCM under a 600,000 round PBKDF2-SHA256 key with its full 256 bits instead of a 64 bit key, old copies still read and moved to the new format at the next sign-in or API call, Admin > Backup lists the copies still in the old format with a button to retire them; sign-in no longer keeps the plain master key in the session between the password and two-step steps, which also fixes the vault being closed after a mistyped two-step code; 26.12.2 changelog entries

This commit is contained in:
johnnyq
2026-11-27 14:17:06 -05:00
parent 370b80a67b
commit eed334aaa4
7 changed files with 222 additions and 80 deletions

View File

@@ -24,6 +24,10 @@ if (isset($_POST['add_api_key'])) {
// Credential decryption password
$apikey_specific_encryption_ciphertext = encryptUserSpecificKey($password);
if ($apikey_specific_encryption_ciphertext === false) {
flashAlert('Your vault session has expired, so the key could not be given access to credentials - sign out and back in, then make it again.', 'error');
redirect();
}
mysqli_query($mysqli, "INSERT INTO api_keys SET api_key_name = '" . escapeSql($fields['name']) . "', api_key_secret = '" . escapeSql($secret) . "',
api_key_decrypt_hash = '$apikey_specific_encryption_ciphertext', api_key_expire = '" . escapeSql($fields['expire']) . "', api_key_user_id = " . intval($fields['user_id']));