Added public/private keypairs for user (and hid from logging)

This commit is contained in:
Nathan Byrd 2023-01-05 22:33:03 -06:00
parent dc7f902182
commit 9f33c8b21d
3 changed files with 952 additions and 925 deletions

View File

@ -32,7 +32,7 @@ module.exports = class Log {
};
// try to remove sensitive info by default, e.g. 'password' fields
['formData', 'formValue'].forEach(keyName => {
['formData', 'formValue', 'user'].forEach(keyName => {
serializers[keyName] = fd => Log.hideSensitive(fd);
});
@ -65,7 +65,7 @@ module.exports = class Log {
//
return JSON.parse(
JSON.stringify(obj).replace(
/"(password|passwordConfirm|key|authCode)"\s?:\s?"([^"]+)"/,
/"(password|passwordConfirm|key|authCode|private_key_main)"\s?:\s?"([^"]+)"/,
(match, valueName) => {
return `"${valueName}":"********"`;
}

File diff suppressed because it is too large Load Diff

View File

@ -66,4 +66,6 @@ module.exports = {
AuthFactor2OTP: 'auth_factor2_otp', // If present, OTP type for 2FA. See OTPTypes
AuthFactor2OTPSecret: 'auth_factor2_otp_secret', // Secret used in conjunction with OTP 2FA
AuthFactor2OTPBackupCodes: 'auth_factor2_otp_backup', // JSON array of backup codes
PublicKeyMain: 'public_key_main', // RSA public key for user
PrivateKeyMain: 'private_key_main', // RSA private key (corresponding to PublicKeyMain)
};